octobat 2.0.5 → 2.0.6

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: 1f2b337085e5a7c550c638bc88b07445e52576e8
4
- data.tar.gz: 9b41bfc9db546d892307f0845ec4b1a92b2269db
3
+ metadata.gz: 377beb77db8fb622272c5f1873a9d0bad7a515ee
4
+ data.tar.gz: db0c840db07230b2d5b0252f0832e26bc30beb3f
5
5
  SHA512:
6
- metadata.gz: 120d7c943045b7ae6158d38dcd8ed608ae579c7071454b4145077d841343445c563a0beb12e45e2af0e85b11946b739851ad936af1e4b74b443217c03a71aa16
7
- data.tar.gz: a95d0582cd30d4037d3b75fce4f366a1c95418982a744fdbd6b272aea418cdb639497a6eda465c68cfce601a55feb7a659f2f0d4d25e3d2a428376f52f8295c8
6
+ metadata.gz: 7e31fa79e166b47689212a4a482e3903692105bf99fcc6326211212c84c7613a9d0a5cdb911894c76763261b41f9e9509b9a18fdf1b6b94df927f12f20aa41b8
7
+ data.tar.gz: 68adb505594897424bb3ef05929fd78062734965dcbc4a6bf15f995986241de8c4ec454360392651064c78dbf8d807590646ba18f316028e54d7c9087fa25ed0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octobat (2.0.4)
4
+ octobat (2.0.6)
5
5
  rest-client (>= 1.4, < 4.0)
6
6
 
7
7
  GEM
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.0.6 2017-05-29
2
+ * 1 minor enhancement:
3
+ * Fixbug on List to single resource, add headers & params
4
+
1
5
  === 2.0.5 2017-05-29
2
6
  * 1 minor enhancement:
3
7
  * Balance transactions belong to payouts
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.5
1
+ 2.0.6
@@ -26,9 +26,7 @@ module Octobat
26
26
  def self.retrieve(id, opts={})
27
27
  api_key, headers = Util.parse_opts(opts)
28
28
  opts[:api_key] ||= @api_key
29
-
30
- puts opts.inspect
31
-
29
+
32
30
  instance = self.new(id, opts)
33
31
  instance.refresh
34
32
  instance
@@ -33,7 +33,20 @@ module Octobat
33
33
  api_key, headers = Util.parse_opts(opts)
34
34
  api_key ||= @api_key
35
35
 
36
- response, api_key = Octobat.request(:get, "#{url}/#{CGI.escape(id)}", api_key)
36
+ if id.kind_of?(Hash)
37
+ retrieve_options = id.dup
38
+ retrieve_options.delete(:id)
39
+ id = id[:id]
40
+ else
41
+ retrieve_options = {}
42
+ end
43
+
44
+ headers = {}
45
+
46
+ retrieve_options.merge!(opts.clone).delete(:api_key)
47
+ headers['Octobat-Version'] = retrieve_options.delete('Octobat-Version') if retrieve_options.has_key?('Octobat-Version')
48
+
49
+ response, api_key = Octobat.request(:get, "#{url}/#{CGI.escape(id)}", api_key, retrieve_options, headers)
37
50
  Util.convert_to_octobat_object(response, api_key, self.parent_resource)
38
51
  end
39
52
 
@@ -1,3 +1,3 @@
1
1
  module Octobat
2
- VERSION = '2.0.5'
2
+ VERSION = '2.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octobat
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaultier Laperche