nearfine-catalogs 0.1.1 → 0.1.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: c4b985154418b7275a902e1babffbace41ea2ac3
4
- data.tar.gz: 23438461803f77325afd5221b9444009cc9a00ff
3
+ metadata.gz: fce50099263ab4e13e6044d609b61e463f06c5cd
4
+ data.tar.gz: 91c873a2337d643138b2919ce06a836ba1c91db3
5
5
  SHA512:
6
- metadata.gz: db903095fb6abc38b3481a39edfec39837a270f08605f760bd309134bbb71272d09011ca2619c97053dda2077a7e677c6618396921b23c74eed1cecce5459500
7
- data.tar.gz: a98668518a506c31e4899b4b3b4677b3589c163f4a3f2b93bd1acc10054fc790bb9a9004dbf557de7254a206e60ea2d4b4a16d5c9e1c2417a8a369796ec29868
6
+ metadata.gz: 6f8c6ed556e7787ebb618241c6fffda2e22423849cd99a07143cd8c39e91bb712182b751b9b6b795c4012b72ac020934d81d7ebcff435d6e38611c17f0ec180a
7
+ data.tar.gz: 1298e8248f4f0b1ee9159f538f1f56ffc9f4b675da5e670aa9f4e361cc2be583f30b5170094b5d6e9077ec0a4b4c0ed84463d74095233ce25bde78f6806a508a
data/lib/catalog.rb CHANGED
@@ -17,7 +17,11 @@ class Catalog
17
17
 
18
18
  def_delegator :@data, :each
19
19
  alias :all :to_a
20
+
21
+ def load
22
+ @data = Doorkeeper.fetch_data.map { |hsh| new(hsh) }
23
+ end
20
24
  end
21
25
 
22
- @data = Doorkeeper.fetch_data.map { |hsh| new(hsh) }
26
+ load
23
27
  end
data/test/test_catalog.rb CHANGED
@@ -3,8 +3,7 @@ require 'catalog'
3
3
 
4
4
  class TestCatalog < Minitest::Test
5
5
  def test_returns_all
6
- catalogs = Catalog.all
7
- refute_empty catalogs
8
- catalogs.each { |catalog| assert_kind_of Catalog, catalog }
6
+ refute_empty Catalog.all
7
+ Catalog.all.each { |catalog| assert_kind_of Catalog, catalog }
9
8
  end
10
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nearfine-catalogs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paper Cavalier