instant_quote 1.1.3 → 1.1.4

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: b072ab73d4b3b39da0c0312e0843467068492dcade4e7ba373f6db0361fe4a9e
4
- data.tar.gz: cb51f889b9c580a86abb7d7013ca2289c267659e4815432e6499341bf6a50808
3
+ metadata.gz: 15c4949632bab15c6468290a1f0d459cf797c2a9dee15c12b02261eff154292d
4
+ data.tar.gz: '08ac65c4b02edc57c97888299aef2704b88faf2914a4b99ebc6edca078459a40'
5
5
  SHA512:
6
- metadata.gz: 9035dfc9ba49a5a65fea60682da0d9f36bd8b87ec29e449af12827024a6fe2e5ca711ce2198881ae42536ffe00b0f9626d74f96e66730f85a629e233030666db
7
- data.tar.gz: 8ce97f3a64509c2a28e96e840eb06d547d9326eb7c686898e7407c090ff170f161a47efb6f708a0b257dda4b7ec965e7341efc99972da130b613951acc221cc0
6
+ metadata.gz: c11771be9ce275d3e3c6b3900eb444d78313b3764877028855f4bb98ca08d2b4e12dfee9fd2c07c6ed49ce6662cd4c5e749cca7d9e50142283c5808f582757ab
7
+ data.tar.gz: cab4260996cd01406ea47e0563d24a55cb4cf5736b621e7e2cdc0f9759800c5560af707fbc884b41c55f9da43ecd15fe0d30e3c8d1da08acec6408cb977f8532
data/.rubocop.yml CHANGED
@@ -15,3 +15,12 @@ Metrics/BlockLength:
15
15
 
16
16
  Naming/AccessorMethodName:
17
17
  Enabled: false
18
+
19
+ Style/HashEachMethods:
20
+ Enabled: true
21
+
22
+ Style/HashTransformKeys:
23
+ Enabled: true
24
+
25
+ Style/HashTransformValues:
26
+ Enabled: true
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- instant_quote (1.1.3)
4
+ instant_quote (1.1.4)
5
5
  activesupport
6
6
  capital_on_tap
7
7
  iwoca
@@ -29,6 +29,8 @@ GEM
29
29
  rainbow
30
30
  coderay (1.1.2)
31
31
  concurrent-ruby (1.1.6)
32
+ crack (0.4.3)
33
+ safe_yaml (~> 1.0.0)
32
34
  diff-lcs (1.3)
33
35
  docile (1.3.2)
34
36
  dotenv (2.7.5)
@@ -36,6 +38,7 @@ GEM
36
38
  multipart-post (>= 1.2, < 3)
37
39
  faraday_middleware (0.14.0)
38
40
  faraday (>= 0.7.4, < 1.0)
41
+ hashdiff (1.0.1)
39
42
  i18n (1.8.2)
40
43
  concurrent-ruby (~> 1.0)
41
44
  iwoca (1.0.0)
@@ -45,54 +48,61 @@ GEM
45
48
  multi_json
46
49
  rainbow
47
50
  jaro_winkler (1.5.4)
48
- method_source (0.9.2)
51
+ method_source (1.0.0)
49
52
  minitest (5.14.0)
50
53
  money (6.13.7)
51
54
  i18n (>= 0.6.4, <= 2)
52
55
  multi_json (1.14.1)
53
56
  multipart-post (2.1.1)
54
57
  parallel (1.19.1)
55
- parser (2.7.0.2)
58
+ parser (2.7.0.5)
56
59
  ast (~> 2.4.0)
57
60
  phonelib (0.6.42)
58
- pry (0.12.2)
59
- coderay (~> 1.1.0)
60
- method_source (~> 0.9.0)
61
- pry-byebug (3.8.0)
61
+ pry (0.13.0)
62
+ coderay (~> 1.1)
63
+ method_source (~> 1.0)
64
+ pry-byebug (3.9.0)
62
65
  byebug (~> 11.0)
63
- pry (~> 0.10)
66
+ pry (~> 0.13.0)
64
67
  public_suffix (4.0.3)
65
68
  rainbow (3.0.0)
66
69
  rake (10.5.0)
70
+ rexml (3.2.4)
67
71
  rspec (3.9.0)
68
72
  rspec-core (~> 3.9.0)
69
73
  rspec-expectations (~> 3.9.0)
70
74
  rspec-mocks (~> 3.9.0)
71
75
  rspec-core (3.9.1)
72
76
  rspec-support (~> 3.9.1)
73
- rspec-expectations (3.9.0)
77
+ rspec-expectations (3.9.1)
74
78
  diff-lcs (>= 1.2.0, < 2.0)
75
79
  rspec-support (~> 3.9.0)
76
80
  rspec-mocks (3.9.1)
77
81
  diff-lcs (>= 1.2.0, < 2.0)
78
82
  rspec-support (~> 3.9.0)
79
83
  rspec-support (3.9.2)
80
- rubocop (0.79.0)
84
+ rubocop (0.80.1)
81
85
  jaro_winkler (~> 1.5.1)
82
86
  parallel (~> 1.10)
83
87
  parser (>= 2.7.0.1)
84
88
  rainbow (>= 2.2.2, < 4.0)
89
+ rexml
85
90
  ruby-progressbar (~> 1.7)
86
91
  unicode-display_width (>= 1.4.0, < 1.7)
87
92
  ruby-progressbar (1.10.1)
88
- simplecov (0.18.1)
93
+ safe_yaml (1.0.5)
94
+ simplecov (0.18.5)
89
95
  docile (~> 1.1)
90
- simplecov-html (~> 0.11.0)
91
- simplecov-html (0.11.0)
96
+ simplecov-html (~> 0.11)
97
+ simplecov-html (0.12.2)
92
98
  thread_safe (0.3.6)
93
99
  tzinfo (1.2.6)
94
100
  thread_safe (~> 0.1)
95
101
  unicode-display_width (1.6.1)
102
+ webmock (3.8.3)
103
+ addressable (>= 2.3.6)
104
+ crack (>= 0.3.2)
105
+ hashdiff (>= 0.4.0, < 2.0.0)
96
106
  zeitwerk (2.3.0)
97
107
 
98
108
  PLATFORMS
@@ -107,6 +117,7 @@ DEPENDENCIES
107
117
  rspec (~> 3.0)
108
118
  rubocop
109
119
  simplecov
120
+ webmock
110
121
 
111
122
  BUNDLED WITH
112
123
  2.0.2
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'rspec', '~> 3.0'
34
34
  spec.add_development_dependency 'rubocop'
35
35
  spec.add_development_dependency 'simplecov'
36
+ spec.add_development_dependency 'webmock'
36
37
 
37
38
  spec.add_dependency 'activesupport'
38
39
  spec.add_dependency 'capital_on_tap'
@@ -75,9 +75,9 @@ module InstantQuote
75
75
  def get_status(state_key)
76
76
  response = ::Iwoca::Quote.credit_facility_status(state_key)
77
77
 
78
- return response.data if response.success?
78
+ raise_error(response) unless response.success?
79
79
 
80
- raise_error(response)
80
+ DecisionParsers::Iwoca.new(response.body)
81
81
  end
82
82
 
83
83
  # Gets the URL for the given state key.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InstantQuote
4
- VERSION = '1.1.3'
4
+ VERSION = '1.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instant_quote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - rikas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: activesupport
113
127
  requirement: !ruby/object:Gem::Requirement