cb-api 12.3.3 → 12.4.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.
- data/lib/cb/client.rb +1 -0
- data/lib/cb/requests/base.rb +4 -0
- data/lib/cb/utils/api.rb +6 -6
- data/lib/cb/version.rb +1 -1
- metadata +2 -2
data/lib/cb/client.rb
CHANGED
data/lib/cb/requests/base.rb
CHANGED
data/lib/cb/utils/api.rb
CHANGED
@@ -29,23 +29,23 @@ module Cb
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def cb_get(path, options={}, &block)
|
32
|
-
execute_http_request(:get, path, options, &block)
|
32
|
+
execute_http_request(:get, nil, path, options, &block)
|
33
33
|
end
|
34
34
|
|
35
35
|
def cb_post(path, options={}, &block)
|
36
|
-
execute_http_request(:post, path, options, &block)
|
36
|
+
execute_http_request(:post, nil, path, options, &block)
|
37
37
|
end
|
38
38
|
|
39
39
|
def cb_put(path, options={}, &block)
|
40
|
-
execute_http_request(:put, path, options, &block)
|
40
|
+
execute_http_request(:put, nil, path, options, &block)
|
41
41
|
end
|
42
42
|
|
43
43
|
def cb_delete(path, options={}, &block)
|
44
|
-
execute_http_request(:delete, path, options, &block)
|
44
|
+
execute_http_request(:delete, nil, path, options, &block)
|
45
45
|
end
|
46
46
|
|
47
|
-
def execute_http_request(http_method, path, options={}, &block)
|
48
|
-
self.class.base_uri Cb.configuration.base_uri
|
47
|
+
def execute_http_request(http_method, uri, path, options={}, &block)
|
48
|
+
self.class.base_uri(uri || Cb.configuration.base_uri)
|
49
49
|
cb_event(:"cb_#{http_method.to_s}_before", path, options, nil, &block)
|
50
50
|
response = self.class.method(http_method).call(path, options)
|
51
51
|
cb_event(:"cb_#{http_method.to_s}_after", path, options, response, &block)
|
data/lib/cb/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cb-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-09-
|
12
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|