lipseys 4.0.0 → 5.0.0

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: f73cbca0a5026fabdaec1be6e1f42c4f435cd2b2
4
- data.tar.gz: 242eda1d474849388c705993c6fbe37621184a99
3
+ metadata.gz: b2460ca1c5b0b67878b1fb5c190014058d335c9e
4
+ data.tar.gz: c51c96c8c1d3fa5569b41edc2283f385ce7be85b
5
5
  SHA512:
6
- metadata.gz: 2d48f5a68bb4f2d048b47da66ec71caa50b9f929af977f1c7080bf1f2771bba7abc457e0edac4d89278b07f71092fb58e1a53175a2b30205168fd1448ce426af
7
- data.tar.gz: ff4c8c1c24fdb68d928ae43fb13e5846da1c26707371200e6406f232fd76b49c818de9996da8e55c413bbe66f770f3798c7f7733c46186d8192b3d407f107759
6
+ metadata.gz: cae758114f8d1cc21abbfb3c86e6d027ff971e07e3a9f7d17530747d2a74677160741169781ac1f1aef20977ef0562cae5f88da20f7a7d28d77f9d1ac6ef506f
7
+ data.tar.gz: 0b36b5ac6dc4b4e2a826957eb267915b16c06945a3522d8c4e3e8066bce19ff91bd8020c7232b92242ce4e71d0db7033e78758f29f5d765e0c81efdf426bfec5
@@ -9,26 +9,31 @@ module Lipseys
9
9
  @options = options
10
10
  end
11
11
 
12
- def self.all(options = {}, &block)
13
- new(options).all &block
12
+ def self.all(options = {})
13
+ new(options).all
14
14
  end
15
15
 
16
- def self.quantity(options = {}, &block)
17
- new(options).all &block
16
+ def self.quantity(options = {})
17
+ new(options).all
18
18
  end
19
19
 
20
20
  def self.get_quantity_file(options = {})
21
21
  new(options).get_quantity_file
22
22
  end
23
23
 
24
- def all(&block)
24
+ def all
25
+ items = []
25
26
  tempfile = stream_to_tempfile(API_URL, @options)
26
27
 
27
28
  Lipseys::Parser.parse(tempfile, 'Item') do |node|
28
- yield map_hash(node)
29
+ _map_hash = map_hash(node)
30
+
31
+ items << _map_hash unless _map_hash.nil?
29
32
  end
30
33
 
31
34
  tempfile.unlink
35
+
36
+ items
32
37
  end
33
38
 
34
39
  def get_quantity_file
@@ -1,3 +1,3 @@
1
1
  module Lipseys
2
- VERSION = '4.0.0'.freeze
2
+ VERSION = '5.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipseys
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-05 00:00:00.000000000 Z
11
+ date: 2019-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 2.6.12
161
+ rubygems_version: 2.6.14
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Ruby library for Lipsey's API.