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: 857309120b1ecb005579a95179f305d1417d77e182acc418728a64a919ba1f93
4
- data.tar.gz: b7b1a9fba79dd2f32ac74bf983f162b3bd13bb1be4f9fc0643243b4ac56579d9
3
+ metadata.gz: 91e75181c6010018c0ccb02179d910c7105925bfa77be612655fd44f5990f74f
4
+ data.tar.gz: d9f769db0a64eb941f0edb89820bf76000af714d95a06f7d7f8478cad40582e1
5
5
  SHA512:
6
- metadata.gz: 9c521ea84fa6d60a44b86122bdb0e73c877959f7d8bda535cf203225e15b87d38c84d81746b254237d7c808e5edf1deeb82dae1f6b98eca605bcdbf624bb8f75
7
- data.tar.gz: 9029a6b9ffcbcc339bd9f98f483b22ecec5dfa13475222f59c497155da09d3ee4d78be006993958f0f8853ce7dc9fc704c9822e59d5c8263eaaba8d1ba621810
6
+ metadata.gz: de97461b4cfbd53e0066b11b237b676420895a9979184fcb922ad73c3016d55dd4eca505a6132b69f13746182955f4c7690fab264ac67300334d4465455c6996
7
+ data.tar.gz: 6900195befc6a9f5e03e190913dee68197c1a632497d3ba3bc3a2d014e7f58fab3152e6f16de9b1a6aa70b0435e9e83d17804625fe7718a831af1963950aff36
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- setsuzoku (0.12.54)
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.5881)
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
- return { result.root.name.underscore.to_sym => xml_node_to_hash(result.root)}
120
- rescue Exception => e
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
@@ -16,7 +16,7 @@ module Setsuzoku
16
16
 
17
17
  #
18
18
  # auth_actions
19
- sig { overridable.returns(T::Hash[T.untyped, T.untyped]) }
19
+ sig { override.returns(T::Hash[T.untyped, T.untyped]) }
20
20
  #
21
21
  # All auth actions that are implemented.
22
22
  #
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Setsuzoku
5
- VERSION = '0.12.54'
5
+ VERSION = '0.12.59'
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.12.54
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-09-22 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler