papers 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b479439cba7ef8f166e55d48d8b93ff23c03163
4
- data.tar.gz: 17e3b3b2ce0e29fdb3374d1204915ff5bb1df325
3
+ metadata.gz: 853ae8cf71390d0158e03316b260bfe0cdb6c0ca
4
+ data.tar.gz: 71dcbec230a9bb2363eeb02dea72e3b961f591a4
5
5
  SHA512:
6
- metadata.gz: 936e52964c04812d06e480f6bd17be2b177acf37be576eba220481f64cd457c69ad10929b42ea05b4bec207135e093e428622a96af5336896508884bade0a366
7
- data.tar.gz: 195bcdbba896629fda6d65c0763b5a696f9e5eb489610b2a87e1db2d9cfa8d33b7d0955d274752ced76265549faeac42932da71e8ca1d7ae25ab2d1c59cd6d16
6
+ metadata.gz: da08736d68659f2b5929ca8fe0c58a5deaca3f7e73490fa334c3fd5b8878deeed6d687c31d54b7f29026077d1220a6b3ac26727215f139c031884c9a5f23f6a4
7
+ data.tar.gz: 2faa06656c4dfc338d7ef6758a0079fb370fbde4cd3b2ce0a6266c99c22e7ba699d5ac6cf4e75352124c7f1083b270e935ae25b89c4217da4dc8f917b07c2cfd
data/README.md CHANGED
@@ -78,10 +78,10 @@ Papers.configure do |config|
78
78
  # Configures Papers to validate licenses for bundled gems. Defaults to true.
79
79
  config.validate_gems = true
80
80
 
81
- # Configures Papers to validate licenses for included JavaScript files. Defaults to true.
81
+ # Configures Papers to validate licenses for included JavaScript and CoffeScript files. Defaults to true.
82
82
  config.validate_javascript = true
83
83
 
84
- # A list of paths where you have included JavaScript files. Defaults to:
84
+ # A list of paths where you have included JavaScript and CoffeeScript files. Defaults to:
85
85
  #
86
86
  # %w[app/assets/javascripts lib/assets/javascripts vendor/assets/javascripts]
87
87
  config.javascript_paths << File.join('public', 'javascripts')
@@ -14,7 +14,7 @@ module Papers
14
14
 
15
15
  # TODO: add logic for determining rails. Is Rails.root better than Dir.pwd for such a case?
16
16
  root_regexp = /^#{Regexp.escape Dir.pwd.to_s}\//
17
- dirs.map { |dir| Dir["#{dir}/**/*.js"] }.flatten.map { |name| name.sub(root_regexp, '') }
17
+ dirs.map { |dir| Dir["#{dir}/**/*.{js,coffee}"] }.flatten.map { |name| name.sub(root_regexp, '') }
18
18
  end
19
19
 
20
20
  def self.manifest_key
@@ -35,6 +35,8 @@ module Papers
35
35
  def self.package
36
36
  pkg = File.read(Papers.config.npm_package_json_path)
37
37
  JSON.parse(pkg)
38
+ rescue Errno::ENOENT
39
+ {}
38
40
  end
39
41
  end
40
42
  end
@@ -41,7 +41,7 @@ module Papers
41
41
  "gems" => get_installed_gems,
42
42
  "javascripts" => get_installed_javascripts,
43
43
  "bower_components" => get_installed_bower_components,
44
- "npm_packages" => get_npm_packages
44
+ "npm_packages" => get_installed_npm_packages
45
45
  }
46
46
  return manifest
47
47
  end
@@ -92,7 +92,7 @@ module Papers
92
92
  components.empty? ? nil : components
93
93
  end
94
94
 
95
- def get_npm_packages
95
+ def get_installed_npm_packages
96
96
  packages = {}
97
97
  NpmPackage.full_introspected_entries.each do |entry|
98
98
  packages[entry['name']] = {
@@ -101,6 +101,7 @@ module Papers
101
101
  'project_url' => nil
102
102
  }
103
103
  end
104
+ packages.empty? ? nil : packages
104
105
  end
105
106
 
106
107
  def manifest_exists?
@@ -2,7 +2,7 @@ module Papers
2
2
  class Version
3
3
  MAJOR = 1
4
4
  MINOR = 3
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].join('.')
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.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ralph Bodenner
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-06-17 00:00:00.000000000 Z
15
+ date: 2014-07-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.2.2
99
+ rubygems_version: 2.3.0
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Validate the licenses of software dependencies you use