setsuzoku 0.10.7 → 0.10.8
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/lib/setsuzoku/rspec/dynamic_spec_helper.rb +8 -5
- 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: 726efb395552a5927e31afa4acd12813f6e7f918dda1e7bfc0228649f6908178
|
|
4
|
+
data.tar.gz: 93984b66449f1cbec2986569660e45e4a1ab3c3287774ff8faf915cfffe4686f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b5e47d6549a27ecb3688ddae78c77ae5284da2398eb2939e0749a936d1491430c8321adf0426bfbfb3f145ebfac2221d388d5be6be8754abb411c005342b672
|
|
7
|
+
data.tar.gz: 3c033c68a032c683014a77387da6643bda95311c1f7e58c2590cfccb3d38b395ee758d6fb171263888c7ed041fc4a2cc25234cbca38605a2d17b6303457336f1
|
|
@@ -231,10 +231,15 @@ 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 = if propz[:request_format] == :
|
|
237
|
-
JSON.parse(ERB.new(File.read("#{Dir.pwd}/spec/support/setsuzoku/#{stub_directory}/#{action_name}_request.json.erb")))
|
|
236
|
+
body = if propz[:request_format] == :file
|
|
237
|
+
request_with_files = JSON.parse(ERB.new(File.read("#{Dir.pwd}/spec/support/setsuzoku/#{stub_directory}/#{action_name}_request.json.erb")).result)
|
|
238
|
+
request_with_files['files'].each do |k, path|
|
|
239
|
+
request_with_files[k] = File.new(path)
|
|
240
|
+
end
|
|
241
|
+
request_with_files.delete('files')
|
|
242
|
+
request_with_files
|
|
238
243
|
else
|
|
239
244
|
File.read("#{Dir.pwd}/spec/support/setsuzoku/#{stub_directory}/#{action_name}_request.#{format}")
|
|
240
245
|
end
|
|
@@ -251,8 +256,6 @@ module Setsuzoku
|
|
|
251
256
|
end
|
|
252
257
|
|
|
253
258
|
# We will convert these to url params when making requests. need to replicate that.
|
|
254
|
-
|
|
255
|
-
|
|
256
259
|
req_params = case format
|
|
257
260
|
when :json
|
|
258
261
|
temp_body = JSON.parse(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.8
|
|
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
|