planvine 0.0.12 → 0.0.13

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: a943b083005e4fdf31f7c6ebc4c89b1d970b9006
4
- data.tar.gz: 185e402109c060b9c068087d81b2526ed4815766
3
+ metadata.gz: 6547d51f290be1c452bc78f4467fd924a950cdf5
4
+ data.tar.gz: c8996cdc7663759b04e4a19a7fb0e3a867e1e9e3
5
5
  SHA512:
6
- metadata.gz: 700fb3ac05aaf99105b37d3636dea88143d18d8164c92c27ea2b20dbc0ec0d1b56350653d3f2fe0265daded496472117da895702dc436328fd8ee25fa051e69b
7
- data.tar.gz: 1cc40bc23735726d415b3de303caac26fd635324d9e100c1facfdc6f3244fe3795a1dae5c16e8141646da6cf8f5dfca718531600cdaf94963b5865ac9856951e
6
+ metadata.gz: 36b82188885489677c799e7a2626ab537f2235267319cd90af6572ac9787194eb56c98756277e8041a7876c5ae606c90c13dace4385cc72ff0bae2f2a0ca67d0
7
+ data.tar.gz: c7dc49b648fa4308acc5252ffb861ee1c506109d8c3d89814f01b1218ff823aad05107fb050c644223ba2aaa1dd42392ef84eadc4a90a339bb225fc702cb12b8
@@ -18,15 +18,10 @@ module Planvine
18
18
 
19
19
  def events
20
20
  return [] if api.category_events(id).nil?
21
- api.category_events(id).map do |event|
22
- begin
21
+ api.category_events(id).map do |events|
22
+ events.map do |event|
23
23
  full_event = api.event(event["id"])
24
24
  EventsBuilder.build(full_event)
25
- rescue
26
- event.map do |event|
27
- full_event = api.event(event["id"])
28
- EventsBuilder.build(full_event)
29
- end
30
25
  end
31
26
  end.flatten
32
27
  end
@@ -32,9 +32,11 @@ module Planvine
32
32
 
33
33
  self.class.get("/category/#{id}/events?api_key=#{@api_key}")["_metadata"]["total_pages"].times do |i|
34
34
  next if (i+1) == 1
35
- events << self.class.get("/category/#{id}/events?api_key=#{@api_key}&page=#{i + 1}")["data"]
35
+ page = self.class.get("/category/#{id}/events?api_key=#{@api_key}&page=#{i + 1}")["data"]
36
+
37
+ events << page
36
38
  end
37
- events.flatten
39
+ events
38
40
  end
39
41
 
40
42
  def event(id)
@@ -1,3 +1,3 @@
1
1
  module Planvine
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: planvine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Patching
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-22 00:00:00.000000000 Z
11
+ date: 2013-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty