licensee 9.3.0 → 9.3.1

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: 7b197d0a8c72ae6b9e0ebf6efb916dd21122bec0
4
- data.tar.gz: 52798f462821dcb9df5fbdf3f5915413320231a5
3
+ metadata.gz: 686c1d6bcdeb0ba5e6ea53812e3e264926c71cdd
4
+ data.tar.gz: f252392d65e2e9ec2af84850558bc7c583e1b5c5
5
5
  SHA512:
6
- metadata.gz: e8d631034f15606955ecc4280dea23b8a50574bef9a141dd9b50236aa7f1cf03477ef3363091b43980c5c0cdd47d56da9dd3d7d27c10b9cbad69f287ee988c14
7
- data.tar.gz: 9983c80e0767ccbf73b32f66156747abe5cd0ae36bcbacfd6f97d2a3fe7001a94f77600f874e75e759b5052f33cbfc393bc836383375f4f078a17ea9f650128b
6
+ metadata.gz: 74d3e52865c1cc086f8c8bdc16e9ad66c0722f40d73ef0d1a00abddce3e5a1df7cfd2798699ee2f1f6f52889700e007269bdd245fc7d1172593015e85969a3f7
7
+ data.tar.gz: ad46ba133915e82c14ce7ac1909abca10794b30e535da4e2b233b4c57ba9cbc6762d92dfd6ac211458b5740ac5088ea6074c7640dc01c6192d48a3eadce9eb70
@@ -38,6 +38,7 @@ module Licensee
38
38
 
39
39
  # Given a license body, returns an array of included LicneseFields
40
40
  def from_content(content)
41
+ return [] unless content
41
42
  LicenseField.from_array content.scan(FIELD_REGEX).flatten
42
43
  end
43
44
  end
@@ -1,3 +1,3 @@
1
1
  module Licensee
2
- VERSION = '9.3.0'.freeze
2
+ VERSION = '9.3.1'.freeze
3
3
  end
@@ -55,4 +55,9 @@ RSpec.describe Licensee::LicenseField do
55
55
  expect(field.name).to eql('foo')
56
56
  expect(field.description).to eql('bar')
57
57
  end
58
+
59
+ it "doesn't error for licenses without bodies" do
60
+ other = Licensee::License.find('other')
61
+ expect(other.fields).to be_empty
62
+ end
58
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: licensee
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.3.0
4
+ version: 9.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter