From 22cc77f12bbf593f0a24559421d7f4218973536b Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 31 Jul 2014 12:36:56 -0400 Subject: [PATCH 1/6] first pass at jekyll2ification --- Gemfile.lock | 126 +++++++++++++--------- _config.yml | 75 +++---------- _data/rules.yml | 59 ++++++++++ _includes/footer.html | 7 +- _includes/js/annotations.js | 9 -- _includes/js/app.js | 132 ----------------------- _includes/license-overview.html | 24 +++-- _includes/sidebar.html | 2 +- {licenses => _licenses}/AGPL-3.0.txt | 0 {licenses => _licenses}/Apache-2.0.txt | 0 {licenses => _licenses}/Artistic-2.0.txt | 0 {licenses => _licenses}/BSD-2-Clause.txt | 0 {licenses => _licenses}/BSD-3-Clause.txt | 0 {licenses => _licenses}/EPL-1.0.txt | 0 {licenses => _licenses}/GPL-2.0.txt | 0 {licenses => _licenses}/GPL-3.0.txt | 0 {licenses => _licenses}/LGPL-2.1.txt | 0 {licenses => _licenses}/LGPL-3.0.txt | 0 {licenses => _licenses}/MIT.txt | 0 {licenses => _licenses}/MPL-2.0.txt | 0 {licenses => _licenses}/cc0.txt | 0 {licenses => _licenses}/isc.txt | 0 {licenses => _licenses}/no-license.html | 0 {licenses => _licenses}/unlicense.txt | 0 {_includes => assets}/js/app.coffee | 5 +- assets/js/javascript.js | 6 -- licenses.html | 21 ++-- script/bootstrap | 5 +- script/cibuild | 3 - script/server | 5 +- 30 files changed, 178 insertions(+), 301 deletions(-) create mode 100644 _data/rules.yml delete mode 100644 _includes/js/annotations.js delete mode 100644 _includes/js/app.js rename {licenses => _licenses}/AGPL-3.0.txt (100%) rename {licenses => _licenses}/Apache-2.0.txt (100%) rename {licenses => _licenses}/Artistic-2.0.txt (100%) rename {licenses => _licenses}/BSD-2-Clause.txt (100%) rename {licenses => _licenses}/BSD-3-Clause.txt (100%) rename {licenses => _licenses}/EPL-1.0.txt (100%) rename {licenses => _licenses}/GPL-2.0.txt (100%) rename {licenses => _licenses}/GPL-3.0.txt (100%) rename {licenses => _licenses}/LGPL-2.1.txt (100%) rename {licenses => _licenses}/LGPL-3.0.txt (100%) rename {licenses => _licenses}/MIT.txt (100%) rename {licenses => _licenses}/MPL-2.0.txt (100%) rename {licenses => _licenses}/cc0.txt (100%) rename {licenses => _licenses}/isc.txt (100%) rename {licenses => _licenses}/no-license.html (100%) rename {licenses => _licenses}/unlicense.txt (100%) rename {_includes => assets}/js/app.coffee (98%) delete mode 100644 assets/js/javascript.js diff --git a/Gemfile.lock b/Gemfile.lock index 4f548b4..ddbcb5c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,104 +2,124 @@ GEM remote: https://rubygems.org/ specs: RedCloth (4.2.9) - activesupport (4.1.1) + activesupport (4.1.4) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) blankslate (2.1.2.4) + celluloid (0.15.2) + timers (~> 1.1.0) classifier (1.3.4) fast-stemmer (>= 1.0.0) + coffee-script (2.3.0) + coffee-script-source + execjs + coffee-script-source (1.7.1) colorator (0.1) colored (1.2) - commander (4.1.6) - highline (~> 1.6.11) - ethon (0.7.0) + ethon (0.7.1) ffi (>= 1.3.0) + execjs (2.2.1) fast-stemmer (1.0.2) ffi (1.9.3) - gemoji (1.5.0) - github-pages (18) + gemoji (2.0.0) + github-pages (21) RedCloth (= 4.2.9) - jekyll (= 1.5.1) - jekyll-mentions (= 0.0.6) - jekyll-redirect-from (= 0.3.1) - jekyll-sitemap (= 0.2.0) - jemoji (= 0.1.0) + jekyll (= 2.2.0) + jekyll-coffeescript (= 1.0.0) + jekyll-mentions (= 0.1.3) + jekyll-redirect-from (= 0.4.0) + jekyll-sass-converter (= 1.1.0) + jekyll-sitemap (= 0.5.0) + jemoji (= 0.3.0) kramdown (= 1.3.1) - liquid (= 2.5.5) + liquid (= 2.6.1) maruku (= 0.7.0) + pygments.rb (= 0.6.0) rdiscount (= 2.1.7) - redcarpet (= 2.3.0) - highline (1.6.21) - html-pipeline (1.5.0) + redcarpet (= 3.1.2) + html-pipeline (1.9.0) activesupport (>= 2) nokogiri (~> 1.4) - html-proofer (0.6.7) + html-proofer (1.1.4) colored (~> 1.2) mercenary (~> 0.3.2) nokogiri (~> 1.6.0) typhoeus (~> 0.6.7) - i18n (0.6.9) - jekyll (1.5.1) + yell (~> 2.0) + i18n (0.6.11) + jekyll (2.2.0) classifier (~> 1.3) colorator (~> 0.1) - commander (~> 4.1.3) - liquid (~> 2.5.5) - listen (~> 1.3) - maruku (= 0.7.0) - pygments.rb (~> 0.5.0) - redcarpet (~> 2.3.0) + jekyll-coffeescript (~> 1.0) + jekyll-gist (~> 1.0) + jekyll-paginate (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.0) + kramdown (~> 1.3) + liquid (~> 2.6.1) + mercenary (~> 0.3.3) + pygments.rb (~> 0.6.0) + redcarpet (~> 3.1) safe_yaml (~> 1.0) toml (~> 0.1.0) - jekyll-mentions (0.0.6) - html-pipeline (~> 1.5.0) - jekyll (~> 1.4) - jekyll-redirect-from (0.3.1) - jekyll (~> 1.4) - jekyll-sitemap (0.2.0) - jekyll (~> 1.4) - jemoji (0.1.0) - gemoji (~> 1.5.0) - html-pipeline (~> 1.5.0) - jekyll (~> 1.4) + jekyll-coffeescript (1.0.0) + coffee-script (~> 2.2) + jekyll-gist (1.1.0) + jekyll-mentions (0.1.3) + html-pipeline (~> 1.9.0) + jekyll (~> 2.0) + jekyll-paginate (1.0.0) + jekyll-redirect-from (0.4.0) + jekyll (~> 2.0) + jekyll-sass-converter (1.1.0) + sass (~> 3.2) + jekyll-sitemap (0.5.0) + jekyll-watch (1.0.0) + listen (~> 2.7) + jemoji (0.3.0) + gemoji (~> 2.0) + html-pipeline (~> 1.9) + jekyll (~> 2.0) json (1.8.1) kramdown (1.3.1) - liquid (2.5.5) - listen (1.3.1) + liquid (2.6.1) + listen (2.7.9) + celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - rb-kqueue (>= 0.2) maruku (0.7.0) - mercenary (0.3.3) - mini_portile (0.5.3) - minitest (5.3.3) - nokogiri (1.6.1) - mini_portile (~> 0.5.0) + mercenary (0.3.4) + mini_portile (0.6.0) + minitest (5.4.0) + nokogiri (1.6.3.1) + mini_portile (= 0.6.0) parslet (1.5.0) blankslate (~> 2.0) posix-spawn (0.3.8) - pygments.rb (0.5.4) + pygments.rb (0.6.0) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) - rake (10.3.1) + rake (10.3.2) rb-fsevent (0.9.4) - rb-inotify (0.9.4) - ffi (>= 0.5.0) - rb-kqueue (0.2.2) + rb-inotify (0.9.5) ffi (>= 0.5.0) rdiscount (2.1.7) - redcarpet (2.3.0) + redcarpet (3.1.2) safe_yaml (1.0.3) - thread_safe (0.3.3) + sass (3.3.12) + thread_safe (0.3.4) + timers (1.1.0) toml (0.1.1) parslet (~> 1.5.0) - typhoeus (0.6.8) - ethon (>= 0.7.0) - tzinfo (1.1.0) + typhoeus (0.6.9) + ethon (>= 0.7.1) + tzinfo (1.2.1) thread_safe (~> 0.1) yajl-ruby (1.1.0) + yell (2.0.4) PLATFORMS ruby diff --git a/_config.yml b/_config.yml index 2430a28..20cb8b0 100644 --- a/_config.yml +++ b/_config.yml @@ -4,67 +4,20 @@ relative_permalinks: false markdown: kramdown url: "http://choosealicense.com" -rules: +collections: + licenses: + output: true + permalink: /licenses/:path/ - required: - - description: Include a copy of the license and copyright notice with the code. - label: License and copyright notice - tag: include-copyright - - description: Indicate significant changes made to the code. - label: State Changes - tag: document-changes - - description: Source code must be made available when distributing the software. In the case of LGPL, the source for the library (and not the entire program) must be made available. - label: Disclose Source - tag: disclose-source - - description: Users who interact with the software via network are given the right to receive a copy of the corresponding source code. - label: Network Use is Distribution - tag: network-use-disclose - - description: The library may be used within a non-open-source application. - label: Library usage - tag: library-usage - - description: You must change the name of the software if you modify it. - label: Rename - tag: rename - - permitted: - - description: This software and derivatives may be used for commercial purposes. - label: Commercial Use - tag: commercial-use - - description: This software may be modified. - label: Modification - tag: modifications - - description: You may distribute this software. - label: Distribution - tag: distribution - - description: You may grant a sublicense to modify and distribute this software to third parties not included in the license. - label: Sublicensing - tag: sublicense - - description: You may use and modify the software without distributing it. - label: Private Use - tag: private-use - - description: This license provides an express grant of patent rights from the contributor to the recipient. - label: Patent Grant - tag: patent-grant - - forbidden: - - description: While this may be implicitly true of all licenses, this license explicitly states that you may NOT use the names, logos, or trademarks of contributors. - label: Use Trademark - tag: trademark-use - - description: Software is provided without warranty and the software author/license owner cannot be held liable for damages. - label: Hold Liable - tag: no-liability - - description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license. - label: Sublicensing - tag: no-sublicense - - description: This software may not be modified. - label: Modification - tag: modifications - - description: You may not distribute this software. - label: Distribution - tag: distribution - - description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license. - label: Sublicensing - tag: sublicense +defaults: + - + scope: + path: "" + type: "licenses" + values: + layout: license + featured: false + "hide-from-license-list": false exclude: - app.coffee @@ -76,7 +29,7 @@ exclude: - Rakefile - README.md - script - - bundle + - vendor/bundle - test - tests diff --git a/_data/rules.yml b/_data/rules.yml new file mode 100644 index 0000000..5bd9c57 --- /dev/null +++ b/_data/rules.yml @@ -0,0 +1,59 @@ +required: +- description: Include a copy of the license and copyright notice with the code. + label: License and copyright notice + tag: include-copyright +- description: Indicate significant changes made to the code. + label: State Changes + tag: document-changes +- description: Source code must be made available when distributing the software. In the case of LGPL, the source for the library (and not the entire program) must be made available. + label: Disclose Source + tag: disclose-source +- description: Users who interact with the software via network are given the right to receive a copy of the corresponding source code. + label: Network Use is Distribution + tag: network-use-disclose +- description: The library may be used within a non-open-source application. + label: Library usage + tag: library-usage +- description: You must change the name of the software if you modify it. + label: Rename + tag: rename + +permitted: +- description: This software and derivatives may be used for commercial purposes. + label: Commercial Use + tag: commercial-use +- description: This software may be modified. + label: Modification + tag: modifications +- description: You may distribute this software. + label: Distribution + tag: distribution +- description: You may grant a sublicense to modify and distribute this software to third parties not included in the license. + label: Sublicensing + tag: sublicense +- description: You may use and modify the software without distributing it. + label: Private Use + tag: private-use +- description: This license provides an express grant of patent rights from the contributor to the recipient. + label: Patent Grant + tag: patent-grant + +forbidden: +- description: While this may be implicitly true of all licenses, this license explicitly states that you may NOT use the names, logos, or trademarks of contributors. + label: Use Trademark + tag: trademark-use +- description: Software is provided without warranty and the software author/license owner cannot be held liable for damages. + label: Hold Liable + tag: no-liability +- description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license. + label: Sublicensing + tag: no-sublicense +- description: This software may not be modified. + label: Modification + tag: modifications +- description: You may not distribute this software. + label: Distribution + tag: distribution +- description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license. + label: Sublicensing + tag: sublicense diff --git a/_includes/footer.html b/_includes/footer.html index c9c56c2..20bf657 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -15,11 +15,14 @@ - {% if page.layout == "license" or page.class == "license-types" %} + {% if page.collection == "licenses" or page.class == "license-types" %} - + + {% endif %} {% endif %} diff --git a/assets/js/app.coffee b/assets/js/app.coffee index faeae57..7b47065 100644 --- a/assets/js/app.coffee +++ b/assets/js/app.coffee @@ -46,8 +46,8 @@ class Choosealicense # Dynamically add annotations as title attribute to rule list items for category, rules of window.annotations - for label, text of rules - $(".license-rules ul.license-#{category} li.#{label}").attr "title", text + for rule in rules + $(".license-rules ul.license-#{category} li.#{rule["tag"]}").attr "title", rule["description"] # Init tooltips on all rule list items for category, label of @categories From 4ec63be9448c6fe412c048130d5c6a29c6ccfc4f Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 5 Sep 2014 11:32:41 -0400 Subject: [PATCH 6/6] exclude vendored tests from proofer --- _config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 20cb8b0..1f6bd7d 100644 --- a/_config.yml +++ b/_config.yml @@ -32,7 +32,9 @@ exclude: - vendor/bundle - test - tests - + - assets/vendor/selectivizr/tests + - assets/vendor/zeroclipboard/test + gems: - jekyll-sitemap - jekyll-redirect-from