spyke 5.4.3 → 6.0.0

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: c76cac75e27368d88332f307ad042deb3038232fa0e01f9dd74064fce975fce9
4
- data.tar.gz: 0bcb6c9dce2c00ae43800407d0f60593c30849a3649c1b4729baf07eb56877b9
3
+ metadata.gz: 23653781200f18b330b2e78e4dd4adf51d928f1835b600be6a7c836f23d8ec15
4
+ data.tar.gz: 69b1d6472dde425e63e267e21b1b2660e2407bc805a60456ee2b89f055e8760d
5
5
  SHA512:
6
- metadata.gz: 03efb5a7687d3ff25a72eaf0abcc8f3eb03b3035b1942bb02ea7b36eb14443ad3eb168483669df84764514d52a36ed79bfda3c9be770e54a7b09056cc9b075b4
7
- data.tar.gz: b1927128da543354a1927ea2b38b09a7019331026751a2dc96b4dc2e1411073ebdac61f92b72bef40306a420dc08194ff74274b10b0b9e620699b8a2b38ca5a8
6
+ metadata.gz: 1fc271dceb9578df58082af323786c241cdd4c23e0b78611b2839c64a50d30cdad780156c5afd79df55601265ca3468a4bdfe60b6c041f573d44133a0a39a8d6
7
+ data.tar.gz: a52dd019cc4f8fdf21ab95708ed04f666411f0cf3d4f6c4c24d3702c1308fcc562c4eacc4ec2c354fada1d26ab8e6d495b1e0d6c113922542b67efcdee9d95fe
data/lib/spyke/http.rb CHANGED
@@ -41,20 +41,20 @@ module Spyke
41
41
  @uri ||= uri_template || default_uri
42
42
  end
43
43
 
44
- def send_request(method, path, params)
45
- connection.send(method) do |request|
46
- if method == :get
47
- request.url path.to_s, params
48
- else
49
- request.url path.to_s
50
- request.body = params
44
+ private
45
+
46
+ def send_request(method, path, params)
47
+ connection.send(method) do |request|
48
+ if method == :get
49
+ request.url path.to_s, params
50
+ else
51
+ request.url path.to_s
52
+ request.body = params
53
+ end
51
54
  end
55
+ rescue Faraday::ConnectionFailed, Faraday::TimeoutError
56
+ raise ConnectionError
52
57
  end
53
- rescue Faraday::ConnectionFailed, Faraday::TimeoutError
54
- raise ConnectionError
55
- end
56
-
57
- private
58
58
 
59
59
  def scoped_request(method)
60
60
  uri = new.uri
data/lib/spyke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spyke
2
- VERSION = '5.4.3'
2
+ VERSION = '6.0.0'
3
3
  end
@@ -119,10 +119,10 @@ end
119
119
  class OtherRecipe < OtherApi
120
120
  uri 'recipes/(:id)'
121
121
 
122
- def self.send_request(method, path, params)
122
+ def self.request(method, path, params)
123
123
  super
124
124
  rescue Spyke::ConnectionError
125
- Recipe.send_request(method, path, params)
125
+ Recipe.request(method, path, params)
126
126
  end
127
127
  end
128
128
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spyke
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.3
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-19 00:00:00.000000000 Z
11
+ date: 2021-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport