wordpress-json-api 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: b16ed9bae362513e88acab5b6def2a44d6e24f4671762d1f3b6714ebe63bcb1e
4
- data.tar.gz: 5b6288b9f0c8b0595429b4f395267989de933f91ca0515abcffe6f51035d8b7d
3
+ metadata.gz: 397f99439117f41811990fae15cb68192110075b9dbb5d6420e9b6bf7a94765e
4
+ data.tar.gz: 13c448ab73299a935bf2c4f88452d0d79a397d20f844c52518398be7e12e94be
5
5
  SHA512:
6
- metadata.gz: e4f0a38a8ecb5e334ccd88a03d72d02452f41c8d3031496be691b7153fc5b8df168458c443f14d2d7ad74541b6baffb2ee2e04194e625b18148c2212ae75ffe5
7
- data.tar.gz: d09dc0344f3b1a4a7c0088d5e2f9039f961ca1405613d5988d5c44714bc41056a8289811b0f539d95021a507c6619570082d773830880cb0247a130894124831
6
+ metadata.gz: e41cb1d36cc1e4999451298d49da6aca39a13f4773e4c2ab31a56caa0f1a8b684c40c850f34484ff48f9a88569ccfc6f4d7e811c21af23a0de6b035be6a6921c
7
+ data.tar.gz: 295a259463fe2213727209ce17fa72fdc503d65a9aa50c9b531fd2aa74a7576e93b3510f3e5337578985198b664e13b96a059a991e071a59bc51aa751104b8e6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wordpress-json-api (0.1.1)
4
+ wordpress-json-api (0.1.2)
5
5
  faraday (>= 1.1.0)
6
6
  faraday_middleware (>= 1.0.0)
7
7
 
@@ -56,21 +56,21 @@ module Wordpress
56
56
  end
57
57
 
58
58
  def request(path, params: {}, headers: {}, retries: 3)
59
- resp = nil
59
+ response = nil
60
60
 
61
61
  begin
62
- resp = self.connection.get(path) do |request|
62
+ resp = self.connection.get(path) do |request|
63
63
  request.headers = connection.headers.merge(headers) if headers && !headers.empty?
64
64
  request.params = params if params && !params.empty?
65
65
  end
66
66
 
67
- resp = response(resp)
67
+ response = process_response(resp)
68
68
  rescue => exception
69
69
  retries -= 1
70
70
  retry if retries > 0
71
71
  end
72
72
 
73
- return resp
73
+ return response
74
74
  end
75
75
 
76
76
  def all(path, params: {}, headers: {})
@@ -102,7 +102,7 @@ module Wordpress
102
102
  return responses
103
103
  end
104
104
 
105
- def response(resp)
105
+ def process_response(resp)
106
106
  if resp.success?
107
107
  body = resp&.body
108
108
 
@@ -1,7 +1,7 @@
1
1
  module Wordpress
2
2
  module Json
3
3
  module Api
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordpress-json-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Johnsson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-26 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday