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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a375b5eda528f0a8d9887cd3d6b13463eca4eb25c47b53279392fee980ae835
4
- data.tar.gz: 8cc9ed0995e1d675c365765f53860f99182d117ff36cc4822c4591b74b670f9e
3
+ metadata.gz: 726efb395552a5927e31afa4acd12813f6e7f918dda1e7bfc0228649f6908178
4
+ data.tar.gz: 93984b66449f1cbec2986569660e45e4a1ab3c3287774ff8faf915cfffe4686f
5
5
  SHA512:
6
- metadata.gz: a1a0c5300853cbca45ff76169b79a644c321da4fe416184863b8cb8718942da81bfc91eb244d3ef9aef9cae3c0f799203dbb1827991f9c68fe944646f7435aa4
7
- data.tar.gz: 84b790767b2f727e124643588d14eeefc20c0ecf25f83cae2d2d907dadb05041a9d019b407e749549d496a363fbc2b9e2794f742cc62beb07d6ecde7dafc8ca6
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] == :binary
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)
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Setsuzoku
5
- VERSION = '0.10.7'
5
+ VERSION = '0.10.8'
6
6
  end
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.7
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-07-02 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler