setsuzoku 0.12.54 → 0.12.59
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: 91e75181c6010018c0ccb02179d910c7105925bfa77be612655fd44f5990f74f
|
4
|
+
data.tar.gz: d9f769db0a64eb941f0edb89820bf76000af714d95a06f7d7f8478cad40582e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de97461b4cfbd53e0066b11b237b676420895a9979184fcb922ad73c3016d55dd4eca505a6132b69f13746182955f4c7690fab264ac67300334d4465455c6996
|
7
|
+
data.tar.gz: 6900195befc6a9f5e03e190913dee68197c1a632497d3ba3bc3a2d014e7f58fab3152e6f16de9b1a6aa70b0435e9e83d17804625fe7718a831af1963950aff36
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
setsuzoku (0.12.
|
4
|
+
setsuzoku (0.12.59)
|
5
5
|
activesupport (~> 5.0)
|
6
6
|
faraday (~> 0.11)
|
7
7
|
nokogiri (~> 1.10)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
safe_yaml (1.0.5)
|
50
50
|
sorbet (0.5.5675)
|
51
51
|
sorbet-static (= 0.5.5675)
|
52
|
-
sorbet-runtime (0.5.
|
52
|
+
sorbet-runtime (0.5.5935)
|
53
53
|
sorbet-static (0.5.5675-universal-darwin-14)
|
54
54
|
thread_safe (0.3.6)
|
55
55
|
tzinfo (1.2.7)
|
@@ -86,7 +86,7 @@ module Setsuzoku
|
|
86
86
|
raw_response = self.perform_external_call(request: request, action_details: action_details, **options)
|
87
87
|
formatted_response = self.parse_response(response: raw_response, response_type: action_details[:actions][request.action][:response_type])
|
88
88
|
success = true
|
89
|
-
rescue Exception => e
|
89
|
+
rescue ::Exception => e
|
90
90
|
exception = e
|
91
91
|
self.external_api_handler.call_external_api_exception(
|
92
92
|
plugin: self.plugin,
|
@@ -86,6 +86,16 @@ module Setsuzoku
|
|
86
86
|
convert_xml_to_hash(response.body)
|
87
87
|
when :html
|
88
88
|
response.body
|
89
|
+
when :txt, :png, :jpg, :gif
|
90
|
+
# for now just return the file
|
91
|
+
response.body
|
92
|
+
# for now just put in tmp
|
93
|
+
# tmp_dir = "#{Dir.tmpdir}/setsuzoku/#{self.plugin.class.system_name.underscore}/#{self.plugin.name.underscore}"
|
94
|
+
# file_name = "#{self.plugin.class.system_name.underscore}_#{self.plugin.name.underscore}_#{Time.now.strftime("%Y_%m_%d_%T")}"
|
95
|
+
# t = Tempfile.new([file_name, ".#{options[:response_type]}"], encoding: 'ascii-8bit')
|
96
|
+
# t.write(response.body)
|
97
|
+
# t.rewind
|
98
|
+
# t
|
89
99
|
else
|
90
100
|
JSON.parse(response.body).deep_symbolize_keys
|
91
101
|
end
|
@@ -116,8 +126,10 @@ module Setsuzoku
|
|
116
126
|
def convert_xml_to_hash(xml)
|
117
127
|
begin
|
118
128
|
result = Nokogiri::XML(xml)
|
119
|
-
|
120
|
-
|
129
|
+
key = result.root.name.underscore.to_sym
|
130
|
+
val = xml_node_to_hash(result.root)
|
131
|
+
{ key => val }
|
132
|
+
rescue ::Exception => e
|
121
133
|
{}
|
122
134
|
end
|
123
135
|
end
|
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.12.
|
4
|
+
version: 0.12.59
|
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-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|