setsuzoku 0.10.7 → 0.10.12
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/setsuzoku/rspec/dynamic_spec_helper.rb +6 -10
- data/lib/setsuzoku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39fda212a16a449e09d41daff1b4dac7188dadcee5e179f8feb5bf28449aa662
|
|
4
|
+
data.tar.gz: ba5b6a928f35b2cf319ee0cac4569d72f14ed5c3d11e52ed48bbfb05bd78aa4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ad9ee7d67eedf16c91549dd7e12ecd18e6783f6debbe1615259e5d183ff4eb3367b46cbfae092645394958f3d57ffaeb8ac29c30b42b3aa725dd83231192c7a
|
|
7
|
+
data.tar.gz: 9eedaf2642a3537d5c02284578319ec859329425d47ebfade8a7793c169b7e019dca0d0f0d4a6435cf05e93768190622dc7ce2e3fed53895f6b2fbb30cf9b85b
|
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.12)
|
|
5
5
|
activesupport (~> 5.0)
|
|
6
6
|
faraday (~> 0.11)
|
|
7
7
|
httparty (~> 0.16.4)
|
|
@@ -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,9 +265,11 @@ 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
|
-
|
|
275
|
-
|
|
268
|
+
if propz[:request_format] == :file
|
|
269
|
+
body = body.to_json if body.is_a?(Hash)
|
|
270
|
+
elsif format == :json
|
|
276
271
|
#faraday sorts hash keys for some reason
|
|
272
|
+
body = body.to_json if body.is_a?(Hash)
|
|
277
273
|
body = JSON.parse(body).sort.to_h
|
|
278
274
|
end
|
|
279
275
|
[url, body]
|
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.12
|
|
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
|