papers 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 602d2e8efd00f7bda59f79de438fa79552e746ca
4
- data.tar.gz: 1f129b2abe8801b64282b66737335f57bc94d198
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjQ2MjU3NGM4OTljMjA2MGVlYjhiNzg5ZTk5YzZjOWM3NDZlMTBhMQ==
5
+ data.tar.gz: !binary |-
6
+ OWQ1OGJkY2FlMzQ0OTJmZDNkMGM1Y2FiZDE4M2JhYjc5MTY0ZDk3Mw==
5
7
  SHA512:
6
- metadata.gz: 41ed2f34f0bfb9fa62e2641be4db5f81fba749f00473449ffd2df6d7c126a94d93b53a51e47d27b97d986c8456845b705d46e95ad6c4a217c9da094243abcf3e
7
- data.tar.gz: 6952d6905f4f021906cb994de7e010cc655fee265a96ec32b94a545d99004a011cbc510a18eb34c01a8b82bd476dc2f752300ee3223b810b96bb756770fae8f8
8
+ metadata.gz: !binary |-
9
+ MzA3ZWM0ZWRlOGZlYTE2MTVkMjA3YTc3ZDNhODI1ZDY0NDk4M2UxN2E5OGM5
10
+ MjUwNDU1ZjA0ZTZiMzVmMDUxZGU0NjQ5ZGNiYmE1ZmNhMzIxYzMxYTA1NjBm
11
+ YzJiZWIxMDFlNzMzMmMwYzdlOGQyYWFlZmMyODJmMzU4NzFiOTE=
12
+ data.tar.gz: !binary |-
13
+ MDNiMjVjNjc2OTAwZjlmOTQ3OTk1MzJhOTRmZDY1OTY0ZDRjNjVjNDBjZDAw
14
+ MzgwYmRlNDYxYjk0N2E4ZWMyYjIwZmQwNzM1YTc2YjAyNDdiODE3ZDgwODNi
15
+ YWZjY2NhYTE5MTlhOWU4MWJlNDg1M2YyNjUxNmM0OTQ0ZGM4MDE=
@@ -1,6 +1,45 @@
1
1
  # Changelog
2
2
 
3
- ## 1.1.0 (Current release)
3
+ ## 2.0.0 (current release)
4
+
5
+ * Make the `version_whitelisted_license` option to apply to Bower components.
6
+ This is a breaking change since current manifests with whitelisted licenses
7
+ need to be updated to remove the version from their name in the manifest.
8
+
9
+ ## 1.4.0
10
+
11
+ * Add `config.whitelist_javascript_paths`, a list of paths to exclude from
12
+ JavaScript/CoffeeScript license validation. This is useful if you have
13
+ subdirectories that include build dependencies that won't get shipped to your
14
+ production environment. For example:
15
+
16
+ ```ruby
17
+ config.whitelist_javascript_paths << File.join('public', 'javascripts', 'node_modules')
18
+ ```
19
+
20
+ ### 1.3.2
21
+
22
+ * Add support for CoffeeScript files in your manifest (simply add them to the javascripts list)
23
+ * Fix an issue with `papers --generate` erroring out
24
+
25
+ ### 1.3.1
26
+
27
+ * The previous gem binary was accidentally built without the NPM dependency
28
+ management that was supposed to be included in 1.3.0. Sorry.
29
+
30
+ ## 1.3.0
31
+
32
+ * Papers now validates NPM packages. This is useful if, for example, you have a
33
+ Rails application that includes a JavaScript app (Ember.js, Angular.js, etc.)
34
+
35
+ ## 1.2.0
36
+
37
+ * Add a configuration option, `version_whitelisted_license`. When used, it will
38
+ cause gems with a specific license to _ignore versions_. This means that, for
39
+ internally written gems, you don't have to specify a version and repeatedly
40
+ update the license manifest as the gem updates.
41
+
42
+ ## 1.1.0
4
43
 
5
44
  * Add support for validating the licenses of Bower components (thanks to [@Aughr](https://github.com/aughr))
6
45
 
data/README.md CHANGED
@@ -86,6 +86,12 @@ Papers.configure do |config|
86
86
  # %w[app/assets/javascripts lib/assets/javascripts vendor/assets/javascripts]
87
87
  config.javascript_paths << File.join('public', 'javascripts')
88
88
 
89
+ # A list of paths to exclude from JavaScript/CoffeeScript license validation.
90
+ # This is useful if you have subdirectories that include build dependencies
91
+ # that won't get shipped to your production environment.
92
+ #
93
+ # config.whitelist_javascript_paths << File.join('public', 'javascripts', 'node_modules')
94
+
89
95
  # Configures Papers to validate licenses for bower components. Defaults to false.
90
96
  config.validate_bower_components = false
91
97
 
@@ -16,9 +16,16 @@ module Papers
16
16
  end
17
17
 
18
18
  def self.full_introspected_entries
19
+ whitelisted_license = Papers.config.version_whitelisted_license
19
20
  bower_json_entries.map do |entry|
21
+ name =
22
+ if whitelisted_license != nil && whitelisted_license == entry['license']
23
+ entry['name']
24
+ else
25
+ "#{entry['name']}-#{entry['_release']}"
26
+ end
20
27
  {
21
- 'name' => "#{entry['name']}-#{entry['_release']}",
28
+ 'name' => name,
22
29
  'homepage' => entry['homepage']
23
30
  }
24
31
  end
@@ -1,7 +1,7 @@
1
1
  module Papers
2
2
  class Version
3
- MAJOR = 1
4
- MINOR = 4
3
+ MAJOR = 2
4
+ MINOR = 0
5
5
  PATCH = 0
6
6
 
7
7
  def self.to_s
@@ -28,5 +28,5 @@ caught flat-footed by the GPL.
28
28
 
29
29
  # dependencies
30
30
  s.add_development_dependency 'rake'
31
- s.add_development_dependency 'rspec', '~> 2.14'
31
+ s.add_development_dependency 'rspec', '~> 3.1.0'
32
32
  end
@@ -256,6 +256,35 @@ describe 'Papers' do
256
256
  ])
257
257
  end
258
258
 
259
+ it 'skips bower versions for whitelisted licenses' do
260
+ Papers::Configuration.any_instance.stub(:version_whitelisted_license).and_return('Whitelist')
261
+
262
+ Papers::BowerComponent.stub(:bower_json_entries).and_return([
263
+ {
264
+ 'name' => 'foo',
265
+ '_release' => '1.2',
266
+ 'license' => 'MIT',
267
+ },
268
+ {
269
+ 'name' => 'baz',
270
+ '_release' => '1.3',
271
+ 'license' => 'BSD',
272
+ },
273
+ {
274
+ 'name' => 'internal-thing',
275
+ '_release' => '1.5',
276
+ 'license' => 'Whitelist',
277
+ },
278
+ ])
279
+
280
+ names = Papers::BowerComponent.introspected
281
+ expect(names).to eq([
282
+ 'foo-1.2',
283
+ 'baz-1.3',
284
+ 'internal-thing'
285
+ ])
286
+ end
287
+
259
288
  it 'displays npm package licenses in a pretty format without versions' do
260
289
  Papers::Configuration.any_instance.stub(:validate_npm_packages?).and_return(true)
261
290
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ralph Bodenner
@@ -12,48 +12,52 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-08-12 00:00:00.000000000 Z
15
+ date: 2014-10-07 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ prerelease: false
18
24
  name: rake
19
25
  requirement: !ruby/object:Gem::Requirement
20
26
  requirements:
21
- - - ">="
27
+ - - ! '>='
22
28
  - !ruby/object:Gem::Version
23
29
  version: '0'
24
30
  type: :development
25
- prerelease: false
31
+ - !ruby/object:Gem::Dependency
26
32
  version_requirements: !ruby/object:Gem::Requirement
27
33
  requirements:
28
- - - ">="
34
+ - - ~>
29
35
  - !ruby/object:Gem::Version
30
- version: '0'
31
- - !ruby/object:Gem::Dependency
36
+ version: 3.1.0
37
+ prerelease: false
32
38
  name: rspec
33
39
  requirement: !ruby/object:Gem::Requirement
34
40
  requirements:
35
- - - "~>"
41
+ - - ~>
36
42
  - !ruby/object:Gem::Version
37
- version: '2.14'
43
+ version: 3.1.0
38
44
  type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- requirements:
42
- - - "~>"
43
- - !ruby/object:Gem::Version
44
- version: '2.14'
45
- description: |
46
- Validate that the licenses used by your Ruby project's dependencies (both gems
47
- and javascript libraries) conform to a software license whitelist. Don't get
45
+ description: ! 'Validate that the licenses used by your Ruby project''s dependencies
46
+ (both gems
47
+
48
+ and javascript libraries) conform to a software license whitelist. Don''t get
49
+
48
50
  caught flat-footed by the GPL.
51
+
52
+ '
49
53
  email: support@newrelic.com
50
54
  executables:
51
55
  - papers
52
56
  extensions: []
53
57
  extra_rdoc_files: []
54
58
  files:
55
- - ".gitignore"
56
- - ".travis.yml"
59
+ - .gitignore
60
+ - .travis.yml
57
61
  - CHANGELOG.md
58
62
  - Gemfile
59
63
  - MIT-LICENSE
@@ -86,17 +90,17 @@ require_paths:
86
90
  - lib
87
91
  required_ruby_version: !ruby/object:Gem::Requirement
88
92
  requirements:
89
- - - ">="
93
+ - - ! '>='
90
94
  - !ruby/object:Gem::Version
91
95
  version: '0'
92
96
  required_rubygems_version: !ruby/object:Gem::Requirement
93
97
  requirements:
94
- - - ">="
98
+ - - ! '>='
95
99
  - !ruby/object:Gem::Version
96
100
  version: '0'
97
101
  requirements: []
98
102
  rubyforge_project:
99
- rubygems_version: 2.3.0
103
+ rubygems_version: 2.2.1
100
104
  signing_key:
101
105
  specification_version: 4
102
106
  summary: Validate the licenses of software dependencies you use
@@ -105,4 +109,3 @@ test_files:
105
109
  - spec/papers_spec.rb
106
110
  - spec/support/package.json
107
111
  - spec/support/package_with_error.json
108
- has_rdoc: