Skip to content

Commit e1091df

Browse files
authored
Merge branch 'gh-pages' into patch-1
2 parents 804e34b + 0c7f3da commit e1091df

File tree

14 files changed

+84
-105
lines changed

14 files changed

+84
-105
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Build and Test
2+
permissions:
3+
contents: read
24

35
on:
46
push:
@@ -12,14 +14,14 @@ jobs:
1214
runs-on: ubuntu-latest
1315

1416
steps:
15-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1618
with:
1719
submodules: true
1820

1921
- name: Set up Ruby
20-
uses: ruby/setup-ruby@v1
22+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
2123
with:
22-
ruby-version: 2.7.4
24+
ruby-version: 3.3.4
2325
bundler-cache: true
2426

2527
- name: Run tests

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AllCops:
22
NewCops: enable
3-
TargetRubyVersion: 2.7
3+
TargetRubyVersion: 3.3
44
Exclude:
55
- _site/**/*
66
- vendor/**/*

CODE_OF_CONDUCT.md

Lines changed: 43 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,51 @@
1-
Contributor Covenant Code of Conduct
1+
# Contributor Covenant Code of Conduct
22

3-
Our Pledge
3+
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, gender identity and expression, level of experience,
9-
nationality, personal appearance, race, religion, or sexual identity and
10-
orientation.
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
116

12-
Our Standards
137

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
8+
## Our Standards
169

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
10+
Examples of behavior that contributes to creating a positive environment include:
11+
12+
- Using welcoming and inclusive language
13+
- Being respectful of differing viewpoints and experiences
14+
- Gracefully accepting constructive criticism
15+
- Focusing on what is best for the community
16+
- Showing empathy towards other community members
17+
18+
19+
## Unacceptable Behavior
2220

2321
Examples of unacceptable behavior by participants include:
2422

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
33-
34-
Our Responsibilities
35-
36-
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
39-
40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
45-
46-
Scope
47-
48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
54-
55-
Enforcement
56-
57-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at [email protected]. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
63-
64-
Project maintainers who do not follow or enforce the Code of Conduct in good
65-
faith may face temporary or permanent repercussions as determined by other
66-
members of the project's leadership.
67-
68-
Attribution
69-
70-
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
71-
available at http://contributor-covenant.org/version/1/4/
23+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
24+
- Trolling, insults, derogatory remarks, or personal/political attacks
25+
- Public or private harassment
26+
- Disclosure of private information (such as physical or electronic addresses) without explicit permission
27+
- Other conduct which could reasonably be considered inappropriate in a professional setting
28+
29+
30+
## Our Responsibilities
31+
32+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
33+
34+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
35+
36+
37+
## Scope
38+
39+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
40+
41+
42+
## Enforcement
43+
44+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
45+
46+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
47+
48+
49+
## Attribution
50+
51+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://contributor-covenant.org/version/1/4/

_licenses/cern-ohl-p-2.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: A permissive license for hardware designs, with conditions only req
77

88
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
99

10-
note: 'CERN <a href="https://ohwr.org/project/cernohl/wikis/uploads/8a6b5d01f71c207c49493e4d114d61e6/cern_ohl_p_v2_howto.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
10+
note: 'CERN <a href="https://gitlab.com/ohwr/project/cernohl/-/wikis/uploads/8a6b5d01f71c207c49493e4d114d61e6/cern_ohl_p_v2_howto.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
1111

1212
using:
1313
tedium: https://github.com/jboone/tedium/blob/master/LICENSE-CERN-OHL-P-v2

_licenses/cern-ohl-s-2.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Permissions of this strongly reciprocal license for hardware design
77

88
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
99

10-
note: 'CERN <a href="https://ohwr.org/project/cernohl/wikis/uploads/cf37727497ca2b5295a7ab83a40fcf5a/cern_ohl_s_v2_user_guide.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
10+
note: 'CERN <a href="https://gitlab.com/ohwr/project/cernohl/-/wikis/uploads/cf37727497ca2b5295a7ab83a40fcf5a/cern_ohl_s_v2_user_guide.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
1111

1212
using:
1313
USB Armory: https://github.com/f-secure-foundry/usbarmory/blob/master/hardware/mark-two/LICENSE

_licenses/cern-ohl-w-2.0.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ description: Permissions of this weakly-reciprocal license are conditioned on ma
77

88
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
99

10-
note: 'CERN <a href="https://ohwr.org/project/cernohl/wikis/uploads/c2e5e9d297949b5c2d324a6cbf6adda0/cern_ohl_w_v2_howto.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
10+
note: 'CERN <a href="https://gitlab.com/ohwr/project/cernohl/-/wikis/uploads/c2e5e9d297949b5c2d324a6cbf6adda0/cern_ohl_w_v2_howto.pdf">recommends</a> adding the following information in the source files: copyright and license notice, a disclaimer of warranties and a source location. You can also include the source location in a part of the design which will be visible in the end product.'
1111

1212
using:
13-
Simple PCIe FMC carrier: https://ohwr.org/project/spec/blob/master/LICENSES/CERN-OHL-W-2.0.txt
13+
Simple PCIe FMC carrier: https://gitlab.com/ohwr/project/spec/blob/master/LICENSES/CERN-OHL-W-2.0.txt
1414
GProcessor8Bits: https://github.com/JonathSpirit/GP8B/blob/master/LICENSE
1515
FPGA Cores: https://github.com/suoto/fpga_cores/blob/master/LICENSE
1616

_licenses/mit-0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: A short and simple permissive license with no conditions, not even
77
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
88

99
using:
10-
rssfs: https://github.com/dertuxmalwieder/rssfs/blob/master/LICENSE
10+
Reactive Streams: https://github.com/reactive-streams/reactive-streams-jvm/blob/master/LICENSE
1111
SOIL2: https://github.com/SpartanJ/SOIL2/blob/master/LICENSE
1212
Units.NET: https://github.com/angularsen/UnitsNet/blob/master/LICENSE
1313

appendix.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
1111

1212
<table border style="font-size: xx-small; position: relative">
1313
{% assign types = "permissions|conditions|limitations" | split: "|" %}
14-
<tr style="position: sticky; top: 0">
14+
<tr style="position: sticky; top: 0; z-index: 1000001; background: color-mix(in srgb, var(--backgroundColor) 70%, transparent);">
1515
<th scope="col" style="text-align: center">License</th>
1616
{% assign seen_tags = '' %}
1717
{% for type in types %}
@@ -72,25 +72,24 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
7272

7373
<p>Most open source licenses also have <span class="license-limitations"><span class="license-sprite"></span></span> <b>limitations</b> that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.</p>
7474

75-
<dl>
76-
{% assign seen_tags = '' %}
7775
{% for type in types %}
76+
### {% if type == "permissions" %}Permissions{% elsif type == "conditions" %}Conditions{% else %}Limitations{% endif %}
77+
<dl>
7878
{% assign rules = site.data.rules[type] | sort: "label" %}
7979
{% for rule_obj in rules %}
8080
{% assign req = rule_obj.tag %}
81-
{% if seen_tags contains req %}
82-
{% continue %}
83-
{% endif %}
8481
<dt id="{{ req }}">{{ rule_obj.label }}</dt>
85-
{% capture seen_tags %}{{ seen_tags | append:req }}{% endcapture %}
86-
{% for t in types %}
87-
{% assign rs = site.data.rules[t] | sort: "label" %}
88-
{% for r in rs %}
89-
{% if r.tag == req %}
90-
<dd class="license-{{t}}"><span class="license-sprite"></span> {{ r.description }}</dd>
91-
{% endif %}
92-
{% endfor %}
93-
{% endfor %}
82+
<dd class="license-{{ type }}">
83+
{% if req contains "--" %}
84+
{% assign lite = " lite" %}
85+
{% else %}
86+
{% assign lite = "" %}
87+
{% endif %}
88+
<span class="{{ req | append: lite }}">
89+
<span class="license-sprite {{ req }}"></span>
90+
</span>
91+
{{ rule_obj.description }}
92+
</dd>
9493
{% endfor %}
94+
</dl>
9595
{% endfor %}
96-
</dl>

assets/css/application.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
body {
88
background: #fafafa;
9+
--backgroundColor: #fafafa;
910
color: #5c5855;
1011
font: 0.875rem/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
1112
}
1213

1314
@media (prefers-color-scheme: dark) {
1415
body {
1516
background: #212121;
17+
--backgroundColor: #212121;
1618
color: #d0c8c1;
1719
}
1820

@@ -462,7 +464,7 @@ strong {
462464

463465

464466
/* Hint.css Overide */
465-
.orverride-hint-inline {
467+
.override-hint-inline {
466468
display: block;
467469
}
468470

assets/js/app.coffee

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ class Choosealicense
4040
# Dynamically add annotations as title attribute to rule list items
4141
for ruletype, rules of window.annotations
4242
for rule in rules
43-
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}")
43+
# Exclude license elements in the legend
44+
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}")
4445
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
45-
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
46+
licenseLiElement.attr "aria-label", "#{rule.label} #{tooltipAttr.heading.toLowerCase()}: #{rule.description}"
4647
licenseLiElement.addClass("hint--bottom
4748
hint--large
4849
hint--no-animate
4950
#{tooltipAttr.color}
50-
orverride-hint-inline")
51+
override-hint-inline")
5152

5253
# Initializes Clipboard.js
5354
initClipboard: ->
@@ -111,14 +112,9 @@ class LicenseSuggestion
111112

112113
# Try to extract the repository full name from the user input
113114
parseUserInput: (userInput) ->
114-
repository = /https?:\/\/github\.com\/(.*?)\/(.+)(\.git)?$/.exec userInput
115+
repository = /https?:\/\/github\.com\/([^\/]+)\/([^\/\?#]+)/.exec userInput
115116
[_, username, project] = repository
116-
project = project
117-
.split /\/|\.git/
118-
.filter (str) -> str
119-
.slice 0, 1
120-
.join ""
121-
return username + '/' + project
117+
return username + '/' + project.replace /(\.git)$/, ''
122118

123119
# Displays an indicator and tooltips to the user about the current status
124120
setStatus: (status="", message="") =>
@@ -143,9 +139,9 @@ class LicenseSuggestion
143139
callback null, info
144140
.fail (e) ->
145141
if e.status == 404
146-
callback new Error "Repository <b>#{repositoryFullName}</b> not found."
142+
callback new Error "Repository #{repositoryFullName} not found."
147143
else
148-
callback new Error "Network error when trying to get information about <b>#{repositoryFullName}</b>."
144+
callback new Error "Network error when trying to get information about #{repositoryFullName}."
149145

150146
# Generates a message showing that a repository is already licensed
151147
repositoryLicense: (repositoryFullName, license) ->

0 commit comments

Comments
 (0)