licensee 4.0.1 → 4.1.0

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: 9fa5b959342b847dd4c55eff65bf5d466042edba
4
- data.tar.gz: 6b125065762166d0b0fc53d5a1db53e01af2cf2e
3
+ metadata.gz: 5222de4fdd764de0105fdaafe36cef8c2c8b2b0c
4
+ data.tar.gz: 2955d94214e96c50829decbdb1b2bb1dfb49371a
5
5
  SHA512:
6
- metadata.gz: 363008842caa6f04d24cbe2f73400d11ee9279d6c052b8588bf0030d723fb2c5684316a8a7b17aef23e6931e8afa52e2a87ccc87d9f7693acef6ddf4c66ca355
7
- data.tar.gz: 2dcc097077a44525ccc2a266291305c9ef6333e012ce60366571306bdb440d70bb9ce9c323340ddba086e5cb5a6bf28f8dea30e6ca7c2e12c9008e71aa96cbea
6
+ metadata.gz: 89b208f5829262ba09bdd506237a763d045370853f0ef0dc8a19416cd1001a39576adb707b4eefcbd9c1cdf5a9bc0e132ffce14f5f35bc46817da97a52eb1a83
7
+ data.tar.gz: 0454cf6944bda0265c27a447eb8c2f55609ac7d15c692951b6fe4b3b76fdd3fde30d8d028ac9a8749971e844ab823d6acc01ead8b279c087126d8e66c0a6dea6
@@ -11,12 +11,6 @@ class Licensee
11
11
  end
12
12
  end
13
13
 
14
- def sorted_list
15
- list.sort { |a,b| a.name <=> b.name }.
16
- partition { |license| license.featured? }.
17
- flatten
18
- end
19
-
20
14
  # Given a license key, attempt to return a matching Licensee::License instance
21
15
  def find(key)
22
16
  list.find { |l| l.key.downcase == key.downcase }
@@ -28,8 +22,6 @@ class Licensee
28
22
  @base ||= File.expand_path "../../vendor/choosealicense.com/_licenses", File.dirname(__FILE__)
29
23
  end
30
24
 
31
- private
32
-
33
25
  # Returns a list of potential license keys, as vendored
34
26
  def keys
35
27
  @keys ||= begin
@@ -39,7 +31,6 @@ class Licensee
39
31
  keyes
40
32
  end
41
33
  end
42
-
43
34
  end
44
35
  end
45
36
  end
@@ -1,3 +1,3 @@
1
1
  class Licensee
2
- VERSION = "4.0.1"
2
+ VERSION = "4.1.0"
3
3
  end
@@ -3,8 +3,8 @@ require 'helper'
3
3
  class TestLicenseeLicenses < Minitest::Test
4
4
 
5
5
  should "know license names" do
6
- assert_equal Array, Licensee::Licenses.send(:keys).class
7
- assert_equal 15, Licensee::Licenses.send(:keys).size
6
+ assert_equal Array, Licensee::Licenses.keys.class
7
+ assert_equal 15, Licensee::Licenses.keys.size
8
8
  end
9
9
 
10
10
  should "load the licenses" do
@@ -18,9 +18,4 @@ class TestLicenseeLicenses < Minitest::Test
18
18
  assert_equal "mit", Licensee::Licenses.find("MIT").key
19
19
  assert_equal "mit", Licensee::Licenses["mit"].key
20
20
  end
21
-
22
- should "sort the licenses" do
23
- assert_equal "apache-2.0", Licensee::Licenses.sorted_list.first.key
24
- assert_equal "bsd-2-clause", Licensee::Licenses.sorted_list.last.key
25
- end
26
21
  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: 4.0.1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter