setsuzoku 0.10.12 → 0.11.0

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: 39fda212a16a449e09d41daff1b4dac7188dadcee5e179f8feb5bf28449aa662
4
- data.tar.gz: ba5b6a928f35b2cf319ee0cac4569d72f14ed5c3d11e52ed48bbfb05bd78aa4b
3
+ metadata.gz: 36e5b7968d72649e85fed697caf9d4b04613faa1b69e347bc347712743ddb55a
4
+ data.tar.gz: 11b0433cee31db3ffb7ee39d36c3c31dd4bab600b238a57a51519770d3453eff
5
5
  SHA512:
6
- metadata.gz: 9ad9ee7d67eedf16c91549dd7e12ecd18e6783f6debbe1615259e5d183ff4eb3367b46cbfae092645394958f3d57ffaeb8ac29c30b42b3aa725dd83231192c7a
7
- data.tar.gz: 9eedaf2642a3537d5c02284578319ec859329425d47ebfade8a7793c169b7e019dca0d0f0d4a6435cf05e93768190622dc7ce2e3fed53895f6b2fbb30cf9b85b
6
+ metadata.gz: 27c41fe87bebe18b575359b471c3e7497292c5ba730b8698704352ad7f43f7a6d9824a8ee7d81c8d52e6d3dbb3247e7c4d3024b19cb1909c1e3bfc888fb0f823
7
+ data.tar.gz: 1352f256aacaeaa77d3565c5d14992bba7689717ea2c928485f3a4304b62b110db47b1c532ccb0266909f02719539c19ca8165c828973c4a8528ef8e74f23437
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- setsuzoku (0.10.12)
4
+ setsuzoku (0.11.0)
5
5
  activesupport (~> 5.0)
6
6
  faraday (~> 0.11)
7
7
  httparty (~> 0.16.4)
@@ -4,7 +4,7 @@
4
4
  module Setsuzoku
5
5
  # The generic API response object that all API responses should return.
6
6
  class ApiResponse < T::Struct
7
- prop :data, T.nilable(T::Hash[Symbol, T.untyped]), default: {}
7
+ prop :data, T.nilable(T.untyped), default: {}
8
8
  prop :success, T::Boolean, default: false
9
9
  prop :error, T.nilable(String), default: nil
10
10
  end
@@ -118,7 +118,7 @@ module Setsuzoku
118
118
  # @param options [Hash] the parsing options. Generally the response_type. e.g. :xml, :json
119
119
  #
120
120
  # @return [Hash] the parsed hash of the response object.
121
- sig { abstract.params(response: T.untyped, options: T.untyped).returns(T::Hash[Symbol, T.untyped]) }
121
+ sig { abstract.params(response: T.untyped, options: T.untyped).returns(T.untyped) }
122
122
  def parse_response(response:, **options); end
123
123
  end
124
124
  end
@@ -72,13 +72,15 @@ module Setsuzoku
72
72
  # @param options [Hash] the parsing options. Generally the response_type. e.g. :xml, :json
73
73
  #
74
74
  # @return [Hash] the parsed hash of the response object.
75
- sig { override.params(response: Faraday::Response, options: T.untyped).returns(T::Hash[Symbol, T.untyped]) }
75
+ sig { override.params(response: Faraday::Response, options: T.untyped).returns(T.untyped) }
76
76
  def parse_response(response:, **options)
77
77
  case options[:response_type]
78
78
  when :json
79
79
  JSON.parse(response.body).deep_symbolize_keys
80
80
  when :xml
81
81
  convert_xml_to_hash(response.body)
82
+ when :html
83
+ response.body
82
84
  else
83
85
  JSON.parse(response.body).deep_symbolize_keys
84
86
  end
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Setsuzoku
5
- VERSION = '0.10.12'
5
+ VERSION = '0.11.0'
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.12
4
+ version: 0.11.0
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-08-04 00:00:00.000000000 Z
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler