setsuzoku 0.10.6 → 0.10.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb1a5e93f301eb0f7b13c155294e71c689a3492a445b8997321a6e1224f62189
|
4
|
+
data.tar.gz: e2d7a2fd0baee79485215db9dcd2a8ce055fb15cfe57661ff83e9c912f97f8ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd505e2884888e977d7565e4da9dd55cfc86ad1139f6ec1823185cb2079f92213b18b0bb6b728914ee3c690d4cf29d4b4b7d49746cb2d7f80ac055f9a7169920
|
7
|
+
data.tar.gz: 245653ac837831f0a8112770f439c08f67aedeb5da8f5aa5269d6f3888d78acdae4b7d360022058425c1acaaa6668e342a24bde3fafa49d59705fb44f5cff72a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
setsuzoku (0.10.
|
4
|
+
setsuzoku (0.10.11)
|
5
5
|
activesupport (~> 5.0)
|
6
6
|
faraday (~> 0.11)
|
7
7
|
httparty (~> 0.16.4)
|
@@ -28,7 +28,7 @@ GEM
|
|
28
28
|
httparty (0.16.4)
|
29
29
|
mime-types (~> 3.0)
|
30
30
|
multi_xml (>= 0.5.2)
|
31
|
-
i18n (1.8.
|
31
|
+
i18n (1.8.5)
|
32
32
|
concurrent-ruby (~> 1.0)
|
33
33
|
mime-types (3.3.1)
|
34
34
|
mime-types-data (~> 3.2015)
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
minitest (5.14.1)
|
38
38
|
multi_xml (0.6.0)
|
39
39
|
multipart-post (2.1.1)
|
40
|
-
nokogiri (1.10.
|
40
|
+
nokogiri (1.10.10)
|
41
41
|
mini_portile2 (~> 2.4.0)
|
42
42
|
public_suffix (4.0.5)
|
43
43
|
rake (10.5.0)
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
safe_yaml (1.0.5)
|
58
58
|
sorbet (0.5.5675)
|
59
59
|
sorbet-static (= 0.5.5675)
|
60
|
-
sorbet-runtime (0.5.
|
60
|
+
sorbet-runtime (0.5.5862)
|
61
61
|
sorbet-static (0.5.5675-universal-darwin-14)
|
62
62
|
thread_safe (0.3.6)
|
63
63
|
tzinfo (1.2.7)
|
@@ -231,13 +231,9 @@ module Setsuzoku
|
|
231
231
|
def get_url_and_body(plugin, propz, stub_directory, action_name, url_params = nil)
|
232
232
|
body = nil
|
233
233
|
url = propz[:url]
|
234
|
-
format = propz[:request_format].to_s.include?('x-www-form') ? :json : propz[:request_format]
|
234
|
+
format = propz[:request_format].to_s.include?('x-www-form') || propz[:request_format] == :file ? :json : propz[:request_format]
|
235
235
|
begin
|
236
|
-
body =
|
237
|
-
JSON.parse(ERB.new(File.read("#{Dir.pwd}/spec/support/setsuzoku/#{stub_directory}/#{action_name}_request.json.erb")))
|
238
|
-
else
|
239
|
-
File.read("#{Dir.pwd}/spec/support/setsuzoku/#{stub_directory}/#{action_name}_request.#{format}")
|
240
|
-
end
|
236
|
+
body = File.read("#{Dir.pwd}/spec/support/setsuzoku/#{stub_directory}/#{action_name}_request.#{format}")
|
241
237
|
body.squish!
|
242
238
|
case format
|
243
239
|
when :xml
|
@@ -251,8 +247,6 @@ module Setsuzoku
|
|
251
247
|
end
|
252
248
|
|
253
249
|
# We will convert these to url params when making requests. need to replicate that.
|
254
|
-
|
255
|
-
|
256
250
|
req_params = case format
|
257
251
|
when :json
|
258
252
|
temp_body = JSON.parse(body)
|
@@ -271,10 +265,9 @@ module Setsuzoku
|
|
271
265
|
url, body = plugin.api_strategy.replace_dynamic_vars(full_url: url, req_params: req_params)
|
272
266
|
end
|
273
267
|
|
274
|
-
case
|
275
|
-
when :
|
276
|
-
|
277
|
-
body = JSON.parse(body).sort.to_h
|
268
|
+
case propz[:request_format]
|
269
|
+
when :file
|
270
|
+
body = body.to_json if body.is_a?(Hash)
|
278
271
|
end
|
279
272
|
[url, body]
|
280
273
|
rescue
|
@@ -40,7 +40,7 @@ module Setsuzoku
|
|
40
40
|
|
41
41
|
full_request = self.formulate_request(request_properties, request_options)
|
42
42
|
|
43
|
-
@faraday = Faraday.new(url: request_properties[:formatted_full_url]) do |faraday|
|
43
|
+
@faraday = Faraday.new(url: request_properties[:formatted_full_url], request: { params_encoder: Faraday::FlatParamsEncoder }) do |faraday|
|
44
44
|
faraday.request(:multipart) if options[:attachments].present?
|
45
45
|
faraday.request(:url_encoded)
|
46
46
|
# faraday.basic_auth(request_options[:basic_auth][:username], request_options[:basic_auth][:password]) if request_options[:basic_auth]
|
data/lib/setsuzoku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setsuzoku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Stadtler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|