licensee 6.1.1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/bin/licensee +7 -4
  4. data/lib/licensee.rb +25 -22
  5. data/lib/licensee/content_helper.rb +5 -4
  6. data/lib/licensee/license.rb +56 -45
  7. data/lib/licensee/matchers/copyright_matcher.rb +2 -2
  8. data/lib/licensee/matchers/dice_matcher.rb +7 -4
  9. data/lib/licensee/matchers/exact_matcher.rb +2 -2
  10. data/lib/licensee/matchers/gemspec_matcher.rb +5 -2
  11. data/lib/licensee/matchers/npm_bower_matcher.rb +5 -2
  12. data/lib/licensee/matchers/package_matcher.rb +2 -2
  13. data/lib/licensee/project.rb +21 -96
  14. data/lib/licensee/project_file.rb +6 -7
  15. data/lib/licensee/project_files/license_file.rb +3 -3
  16. data/lib/licensee/project_files/package_info.rb +7 -7
  17. data/lib/licensee/project_files/readme.rb +24 -0
  18. data/lib/licensee/projects/fs_project.rb +32 -0
  19. data/lib/licensee/projects/git_project.rb +55 -0
  20. data/lib/licensee/version.rb +2 -2
  21. data/test/fixtures/bower-with-readme/README.md +1 -0
  22. data/test/fixtures/bower-with-readme/bower.json +3 -0
  23. data/test/functions.rb +23 -12
  24. data/test/helper.rb +5 -0
  25. data/test/test_licensee.rb +9 -8
  26. data/test/test_licensee_bin.rb +11 -5
  27. data/test/test_licensee_copyright_matcher.rb +23 -23
  28. data/test/test_licensee_dice_matcher.rb +5 -5
  29. data/test/test_licensee_exact_matcher.rb +4 -4
  30. data/test/test_licensee_gemspec_matcher.rb +4 -4
  31. data/test/test_licensee_license.rb +82 -70
  32. data/test/test_licensee_license_file.rb +30 -28
  33. data/test/test_licensee_npm_bower_matcher.rb +11 -11
  34. data/test/test_licensee_package_info.rb +8 -7
  35. data/test/test_licensee_project.rb +45 -37
  36. data/test/test_licensee_project_file.rb +9 -9
  37. data/test/test_licensee_readme.rb +47 -0
  38. data/test/test_licensee_vendor.rb +10 -7
  39. data/vendor/choosealicense.com/_licenses/afl-3.0.txt +0 -3
  40. data/vendor/choosealicense.com/_licenses/agpl-3.0.txt +5 -5
  41. data/vendor/choosealicense.com/_licenses/apache-2.0.txt +1 -2
  42. data/vendor/choosealicense.com/_licenses/artistic-2.0.txt +14 -13
  43. data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +2 -3
  44. data/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +0 -6
  45. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +2 -4
  46. data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +2 -1
  47. data/vendor/choosealicense.com/_licenses/epl-1.0.txt +2 -1
  48. data/vendor/choosealicense.com/_licenses/eupl-1.1.txt +345 -0
  49. data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +5 -5
  50. data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +5 -4
  51. data/vendor/choosealicense.com/_licenses/isc.txt +1 -2
  52. data/vendor/choosealicense.com/_licenses/lgpl-2.1.txt +5 -6
  53. data/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +8 -8
  54. data/vendor/choosealicense.com/_licenses/lppl-1.3c.txt +445 -0
  55. data/vendor/choosealicense.com/_licenses/mit.txt +1 -1
  56. data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +2 -1
  57. data/vendor/choosealicense.com/_licenses/ms-pl.txt +0 -1
  58. data/vendor/choosealicense.com/_licenses/ms-rl.txt +1 -1
  59. data/vendor/choosealicense.com/_licenses/ofl-1.1.txt +1 -2
  60. data/vendor/choosealicense.com/_licenses/osl-3.0.txt +1 -3
  61. data/vendor/choosealicense.com/_licenses/unlicense.txt +1 -2
  62. data/vendor/choosealicense.com/_licenses/wtfpl.txt +0 -2
  63. metadata +33 -11
  64. data/vendor/choosealicense.com/_licenses/no-license.txt +0 -25
@@ -14,12 +14,12 @@ permitted:
14
14
  - commercial-use
15
15
  - modifications
16
16
  - distribution
17
- - sublicense
18
17
  - private-use
19
18
 
20
19
  forbidden:
21
20
  - no-liability
22
21
 
22
+ hidden: false
23
23
  ---
24
24
 
25
25
  The MIT License (MIT)
@@ -10,12 +10,12 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
10
10
  required:
11
11
  - disclose-source
12
12
  - include-copyright
13
+ - same-license
13
14
 
14
15
  permitted:
15
16
  - commercial-use
16
17
  - modifications
17
18
  - distribution
18
- - sublicense
19
19
  - patent-use
20
20
  - private-use
21
21
 
@@ -23,6 +23,7 @@ forbidden:
23
23
  - no-liability
24
24
  - trademark-use
25
25
 
26
+ hidden: false
26
27
  ---
27
28
 
28
29
  Mozilla Public License Version 2.0
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  title: Microsoft Public License
3
- hidden: true
4
3
 
5
4
  source: http://opensource.org/licenses/ms-pl
6
5
 
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  title: Microsoft Reciprocal License
3
- hidden: true
4
3
 
5
4
  source: http://opensource.org/licenses/ms-pl
6
5
 
@@ -10,6 +9,7 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
10
9
 
11
10
  required:
12
11
  - include-copyright
12
+ - same-license
13
13
 
14
14
  permitted:
15
15
  - commercial-use
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  title: SIL Open Font License 1.1
3
3
  redirect_from: /licenses/ofl/
4
- hidden: true
5
4
  source: http://scripts.sil.org/OFL_web
6
5
 
7
6
  description: The Open Font License (OFL) is maintained by SIL International. It attempts to be a compromise between the values of the free software and typeface design communities. It is used for almost all open source font projects, including those by Adobe, Google and Mozilla.
@@ -12,6 +11,7 @@ note: This license doesn't require source provision, but recommends it. All file
12
11
 
13
12
  required:
14
13
  - include-copyright
14
+ - same-license
15
15
 
16
16
  permitted:
17
17
  - private-use
@@ -21,7 +21,6 @@ permitted:
21
21
 
22
22
  forbidden:
23
23
  - no-liability
24
- - trademark-use
25
24
 
26
25
  ---
27
26
 
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  title: Open Software License 3.0
3
- hidden: true
4
3
  source: http://opensource.org/licenses/OSL-3.0
5
4
 
6
5
  description: OSL 3.0 is a copyleft license that does not require reciprocal licensing on linked works. It also provides an express grant of patent rights from contributors to users, with a termination clause triggered if a user files a patent infringement lawsuit.
@@ -19,6 +18,7 @@ using:
19
18
  required:
20
19
  - include-copyright
21
20
  - disclose-source
21
+ - same-license
22
22
 
23
23
  permitted:
24
24
  - commercial-use
@@ -26,8 +26,6 @@ permitted:
26
26
  - modifications
27
27
  - patent-use
28
28
  - private-use
29
- - sublicense
30
-
31
29
 
32
30
  forbidden:
33
31
  - trademark-use
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  title: The Unlicense
3
- tab-slug: unlicense
4
3
  family: Public Domain Dedication
5
4
  source: http://unlicense.org/UNLICENSE
6
5
 
@@ -15,13 +14,13 @@ permitted:
15
14
  - commercial-use
16
15
  - modifications
17
16
  - distribution
18
- - sublicense
19
17
 
20
18
  forbidden:
21
19
  - no-liability
22
20
 
23
21
  required: []
24
22
 
23
+ hidden: false
25
24
  ---
26
25
 
27
26
  This is free and unencumbered software released into the public domain.
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  title: "Do What The F*ck You Want To Public License"
3
- hidden: true
4
3
  source: http://www.wtfpl.net/
5
4
 
6
5
  description: The easiest licence out there. It gives the user permissions to do whatever they want with your code.
@@ -13,7 +12,6 @@ permitted:
13
12
  - commercial-use
14
13
  - modifications
15
14
  - distribution
16
- - sublicense
17
15
  - private-use
18
16
 
19
17
  forbidden: []
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: licensee
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.24b
19
+ version: '0.23'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.24b
26
+ version: '0.23'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,8 +80,23 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.15'
83
- description: Licensee automates the process of reading LICENSE files and compares
84
- their contents to known licenses using a fancy math thing called Rabin-Karp rolling-hashes.
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.35'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.35'
97
+ description: |2
98
+ Licensee automates the process of reading LICENSE files and
99
+ compares their contents to known licenses using a fancy maths.
85
100
  email: ben.balter@github.com
86
101
  executables:
87
102
  - licensee
@@ -105,7 +120,12 @@ files:
105
120
  - lib/licensee/project_file.rb
106
121
  - lib/licensee/project_files/license_file.rb
107
122
  - lib/licensee/project_files/package_info.rb
123
+ - lib/licensee/project_files/readme.rb
124
+ - lib/licensee/projects/fs_project.rb
125
+ - lib/licensee/projects/git_project.rb
108
126
  - lib/licensee/version.rb
127
+ - test/fixtures/bower-with-readme/README.md
128
+ - test/fixtures/bower-with-readme/bower.json
109
129
  - test/fixtures/bower/bower.json
110
130
  - test/fixtures/case-sensitive.git/HEAD
111
131
  - test/fixtures/case-sensitive.git/config
@@ -181,6 +201,7 @@ files:
181
201
  - test/test_licensee_package_info.rb
182
202
  - test/test_licensee_project.rb
183
203
  - test/test_licensee_project_file.rb
204
+ - test/test_licensee_readme.rb
184
205
  - test/test_licensee_vendor.rb
185
206
  - vendor/choosealicense.com/_licenses/afl-3.0.txt
186
207
  - vendor/choosealicense.com/_licenses/agpl-3.0.txt
@@ -191,16 +212,17 @@ files:
191
212
  - vendor/choosealicense.com/_licenses/bsd-3-clause.txt
192
213
  - vendor/choosealicense.com/_licenses/cc0-1.0.txt
193
214
  - vendor/choosealicense.com/_licenses/epl-1.0.txt
215
+ - vendor/choosealicense.com/_licenses/eupl-1.1.txt
194
216
  - vendor/choosealicense.com/_licenses/gpl-2.0.txt
195
217
  - vendor/choosealicense.com/_licenses/gpl-3.0.txt
196
218
  - vendor/choosealicense.com/_licenses/isc.txt
197
219
  - vendor/choosealicense.com/_licenses/lgpl-2.1.txt
198
220
  - vendor/choosealicense.com/_licenses/lgpl-3.0.txt
221
+ - vendor/choosealicense.com/_licenses/lppl-1.3c.txt
199
222
  - vendor/choosealicense.com/_licenses/mit.txt
200
223
  - vendor/choosealicense.com/_licenses/mpl-2.0.txt
201
224
  - vendor/choosealicense.com/_licenses/ms-pl.txt
202
225
  - vendor/choosealicense.com/_licenses/ms-rl.txt
203
- - vendor/choosealicense.com/_licenses/no-license.txt
204
226
  - vendor/choosealicense.com/_licenses/ofl-1.1.txt
205
227
  - vendor/choosealicense.com/_licenses/osl-3.0.txt
206
228
  - vendor/choosealicense.com/_licenses/unlicense.txt
@@ -225,9 +247,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
247
  version: '0'
226
248
  requirements: []
227
249
  rubyforge_project:
228
- rubygems_version: 2.6.1
250
+ rubygems_version: 2.5.2
229
251
  signing_key:
230
252
  specification_version: 4
231
- summary: A Ruby Gem to detect under what license a project is distributed
253
+ summary: A Ruby Gem to detect open source project licenses
232
254
  test_files: []
233
255
  has_rdoc:
@@ -1,25 +0,0 @@
1
- ---
2
- title: No License
3
- source: "http://choosealicense.com/no-license/"
4
-
5
- description: You retain all rights and do not permit distribution, reproduction, or derivative works. You may grant some rights in cases where you publish your source code to a site that requires accepting terms of service. For example, publishing code in a public repository on GitHub requires that you allow others to view and fork your code.
6
-
7
- how: Simply do nothing, though including a copyright notice is recommended.
8
-
9
- note: This option may be subject to the Terms Of Use of the site where you publish your source code.
10
-
11
- required:
12
- - include-copyright
13
-
14
- permitted:
15
- - commercial-use
16
- - private-use
17
-
18
- forbidden:
19
- - modifications
20
- - distribution
21
- - sublicense
22
-
23
- ---
24
-
25
- Copyright [year] [fullname]