license_finder 1.1.0 → 1.1.1

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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6965ddeb70d6a9462f426dd9314a07920e83e953
4
- data.tar.gz: 197642f07c0032fe03328103cdd7e6f7c4845640
3
+ metadata.gz: 8030930924c96e92dfe411bfc46702e5c8091e32
4
+ data.tar.gz: bdb0ead96b41b5e814508ba38107e4fd624e4e50
5
5
  SHA512:
6
- metadata.gz: 978887a4a20f652a84f8af8347cc03764b23c8c487b5a8ca266bd578a8e3ee43c5b323f652bd7238b9ca915f01b676d66a0a12ea9681b8bfc93551ca9d17cd2d
7
- data.tar.gz: 8fc6ec156a538862da5790caef509802d6f740c1d2257c37e1e1bc17d9c67beddaeb648f058e0d36bc9bbaeab1d4e0b05aa3ac13c51625c60d4a56a00243ba69
6
+ metadata.gz: c3ec0bfb8ef542b5494e884dfeb28d42959ce5349bdc74fb0884526ab6deb977fb8b81a6a2bc67025fc18f41222aeab073a30c95a822f55f7cb4211f85db7ce8
7
+ data.tar.gz: 54061bd80b908ee4973c6a283a82f0462d0e5e70da6b6a84649d9a7c201286deafdc270ef42849eca6c3973113b291b97535cb557a532af4c15fccc446bcc480
@@ -1,3 +1,11 @@
1
+ === 1.1.1 / 2014-07-29
2
+
3
+ * Bugfixes
4
+
5
+ * Process incorrectly-defined dependencies.
6
+ [Original issue.](https://github.com/pivotal/LicenseFinder/issues/108)
7
+ * Allow license_finder to process incorrectly-defined dependencies.
8
+
1
9
  === 1.0.1 / 2014-05-28
2
10
 
3
11
  * Features
@@ -17,7 +17,7 @@ end
17
17
 
18
18
  Then(/^I should see that gem approved in dependencies\.html$/) do
19
19
  @user.in_gem_html("gpl_gem") do |gpl_gem|
20
- gpl_gem[:class].should == "approved"
20
+ gpl_gem[:class].split(' ').should include "approved"
21
21
  gpl_gem.should have_content "Julian"
22
22
  gpl_gem.should have_content "We really need this"
23
23
  end
@@ -55,6 +55,6 @@ end
55
55
 
56
56
  def is_html_status?(gem, approval)
57
57
  @user.in_gem_html(gem) do |gpl_gem|
58
- gpl_gem[:class].should == approval
58
+ gpl_gem[:class].split(' ').should include approval
59
59
  end
60
60
  end
@@ -8,6 +8,7 @@ module LicenseFinder
8
8
  class Package
9
9
  def self.license_names_from_standard_spec(spec)
10
10
  licenses = spec["licenses"] || [spec["license"]].compact
11
+ licenses = [licenses] unless licenses.is_a?(Array)
11
12
  licenses.map do |license|
12
13
  if license.is_a? Hash
13
14
  license["type"]
@@ -62,7 +62,7 @@
62
62
  </div>
63
63
  <div class="dependencies">
64
64
  <% sorted_dependencies.each do |dependency| -%>
65
- <div id="<%= dependency.name %>" class="<%= dependency.approved? ? "approved" : "unapproved" %>">
65
+ <div id="<%= dependency.name %>" class="clearfix <%= dependency.approved? ? "approved" : "unapproved" %>">
66
66
  <blockquote class="pull-right">
67
67
  <% if dependency.approved_manually? -%>
68
68
  <p>
@@ -3,7 +3,7 @@ require './lib/license_finder/platform'
3
3
  Gem::Specification.new do |s|
4
4
  s.required_ruby_version = '>= 1.9.3'
5
5
  s.name = "license_finder"
6
- s.version = "1.1.0"
6
+ s.version = "1.1.1"
7
7
  s.authors = ["Jacob Maine", "Matthew Kane Parker", "Ian Lesperance", "David Edwards", "Paul Meskers", "Brent Wheeldon", "Trevor John", "David Tengdin", "William Ramsey", "David Dening", "Geoff Pleiss", "Mike Chinigo"]
8
8
  s.email = ["commoncode@pivotalabs.com"]
9
9
  s.homepage = "https://github.com/pivotal/LicenseFinder"
@@ -32,12 +32,14 @@ module LicenseFinder
32
32
  let(:node_module2) { {"licenses" => [{"type" => "BSD"}], "path" => "/some/path"} }
33
33
  let(:node_module3) { {"license" => {"type" => "PSF"}, "path" => "/some/path"} }
34
34
  let(:node_module4) { {"licenses" => ["MIT"], "path" => "/some/path"} }
35
+ let(:misdeclared_node_module) { {"licenses" => {"type" => "MIT"}} }
35
36
 
36
37
  it 'finds the license for both license structures' do
37
38
  NpmPackage.new(node_module1).license.name.should eq("MIT")
38
39
  NpmPackage.new(node_module2).license.name.should eq("BSD")
39
40
  NpmPackage.new(node_module3).license.name.should eq("Python Software Foundation License")
40
41
  NpmPackage.new(node_module4).license.name.should eq("MIT")
42
+ NpmPackage.new(misdeclared_node_module).license.name.should eq("MIT")
41
43
  end
42
44
 
43
45
  context "regardless of whether there are licenses in files" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: license_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Maine
@@ -19,7 +19,7 @@ authors:
19
19
  autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
- date: 2014-06-09 00:00:00.000000000 Z
22
+ date: 2014-07-29 00:00:00.000000000 Z
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: bundler