fanforce 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YThmODJmMjE2M2EzZDRmYTBmNjY0YmJlNjM5MmU0MTg3YzA1YTBlOA==
4
+ NThhNzJhZDI1ZWMyYjllMWUzYTkwNmIwOWY5NzdmNzNhOWMyZWVhNw==
5
5
  data.tar.gz: !binary |-
6
- YzJlZTljMTZkOWI3YzA3ZDgxNjlkYTM3NjEzOTdlYzNlNjVhODk5YQ==
6
+ MzM2YzU2Y2M3YWFiYmNhNDYxN2FkMTRiZWYwOTUxMjE5ZTlhZmFlZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTcxMmM5NWQ4NzNkZDZkMTM4YTAxYTVmYTU3YTMxODQzM2JlYTZkZmY0Mzc3
10
- MDVhYjI1NjliOTA5YmQxNGZiYzc0YTI2MzEyMDJhMTlhYTYzMzg3NDc3MDAw
11
- YjJhZjkwNmI0M2MwMzBhN2E5ZmYxMGYyNWQ5M2I1YTU0NGY3ZGM=
9
+ M2ZjOGEzZTg5ZjBiZjBlYTYxMGZjNzhkZDM1MmNjOTA0MTRkZmVhZThhZGM2
10
+ ZDUxZjhiMDZiY2MxNzA0N2E3OTBhMDI2MzFjNzFlZTA1NDIzMWJmN2MwMjdj
11
+ MDFhZmFlM2RjNDI1MWYwMWQ5MmUyZWI0MmI2OTZiZWI3YmMwNjk=
12
12
  data.tar.gz: !binary |-
13
- ZDA4NGQxZjRmNDdlMzMzYWE3NmE1OTUyMGIwNzAyYTA5NjJkZTkzNTY5ZTFh
14
- MjlhNDc0YmUwYTkwNzQ5YzA1MDYxNDA3MTg2MTM4ZDFjYTYwZjFiNTc3NDcy
15
- Y2UxMzFmNmU3M2Q4M2JmYTRlYjgzMmRlYjY1MGFkMTAxMDMzNzk=
13
+ YTJlN2Y0Y2FlNjllZjBlNTYxOTcwOGIyN2Q5NjUwYWI3NDMwNzBiZDZiZTIw
14
+ M2JlMWYxZTE5ODdjMDRlMjRhNjk1YTUyODdjMTQ2NjA3ZTZkYjVjODcyNmM1
15
+ NjlkYTEzNWJkMmM1M2EyZTlmZDg4Yjk2Yzc1ODVmYzdiZGVmZTA=
@@ -22,7 +22,8 @@ class Fanforce::Api::Result < Hash
22
22
  @request = request
23
23
  @requested_url = requested_url
24
24
  @requested_params = requested_params
25
- super(response_hash)
25
+ @data = response_hash
26
+ self.replace(response_hash)
26
27
  end
27
28
 
28
29
  def data
@@ -42,8 +43,8 @@ class Fanforce::Api::Result < Hash
42
43
  def total_results; 1 end
43
44
  def current_page; 1 end
44
45
  def total_pages; 1 end
45
- def prev_url; nil end
46
- def next_url; nil end
46
+ def prev_page_url; nil end
47
+ def next_page_url; nil end
47
48
  def code; @response.code end
48
49
  end
49
50
 
@@ -55,7 +56,7 @@ class Fanforce::Api::Results < Array
55
56
  @request = request
56
57
  @requested_url = requested_url
57
58
  @requested_params = requested_params
58
- super(response_hash[:results])
59
+ self.replace(response_hash[:results])
59
60
  end
60
61
 
61
62
  def data
@@ -87,13 +88,13 @@ class Fanforce::Api::Results < Array
87
88
  @total_pages ||= @response_hash[:total_pages]
88
89
  end
89
90
 
90
- def prev_url;
91
+ def prev_page_url;
91
92
  @prev_url ||= if request.method == :get and current_page > 1
92
93
  "#{@requested_url}?#{Fanforce::Utils.to_query_string(@requested_params.merge(page: current_page-1))}"
93
94
  end
94
95
  end
95
96
 
96
- def next_url;
97
+ def next_page_url;
97
98
  @next_url ||= if @request.method == :get and total_pages > current_page
98
99
  "#{@requested_url}?#{Fanforce::Utils.to_query_string(@requested_params.merge(page: current_page+1))}"
99
100
  end
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module Api
3
- VERSION = '0.7.0'
3
+ VERSION = '0.7.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark