glimr-api-client 0.1.10 → 0.1.11

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
  SHA1:
3
- metadata.gz: 6f4ef45a3e547eb6ce5a013ab6ed7e0f41fa7fa2
4
- data.tar.gz: 35c00557af65f0793ef65b0918318e3e0fe230f7
3
+ metadata.gz: b660ea3d34bcf9f237a01cb8e3f6d8c480e70af6
4
+ data.tar.gz: 95f00b2723dfae4ae96bbba8a6e89e8c92ab9d6d
5
5
  SHA512:
6
- metadata.gz: c893546a56ee0a2597d7c7e74b09bc39f347febb38aac93c22bb9e19f56bb35445c6a17be752172288af96353bec423fff5c02f8e79a9586bc88028e38f4bcce
7
- data.tar.gz: bedf4e7ed116c3d2a27a44b2328b121aa88c2776724f2702a4f60a18bdb2238102a1b4f36a6d09275f0cca17bd73f52c63a201f3a71708c8974a819af4652be7
6
+ metadata.gz: 32ffc15aa4ec65672fbfee9437e8a266b67a46b9551d76109e5c8fd02fe231dea71958a9ff2a4090491adfb18d254a4448efc54a05954e743a679639ec91562e
7
+ data.tar.gz: 12e813eb6878271af81521e7f656c6d54eb6996354d81befd04b40d275a8b8b7a2890209cbca1056e0749825579d279b7a720ecd48fdac9261cc72cca975dc66
data/.gitignore CHANGED
@@ -7,3 +7,5 @@ spec/dummy/log/*.log
7
7
  spec/dummy/tmp/
8
8
  coverage/*
9
9
  *.gem
10
+ .ctags_exclude
11
+ tags
data/Gemfile.lock CHANGED
@@ -1,47 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- glimr-api-client (0.1.10)
5
- activesupport (~> 5.0)
4
+ glimr-api-client (0.1.11)
6
5
  excon (~> 0.51)
7
6
 
8
7
  GEM
9
8
  remote: https://rubygems.org/
10
9
  specs:
11
10
  abstract_type (0.0.7)
12
- actioncable (5.0.0)
13
- actionpack (= 5.0.0)
11
+ actioncable (5.0.0.1)
12
+ actionpack (= 5.0.0.1)
14
13
  nio4r (~> 1.2)
15
14
  websocket-driver (~> 0.6.1)
16
- actionmailer (5.0.0)
17
- actionpack (= 5.0.0)
18
- actionview (= 5.0.0)
19
- activejob (= 5.0.0)
15
+ actionmailer (5.0.0.1)
16
+ actionpack (= 5.0.0.1)
17
+ actionview (= 5.0.0.1)
18
+ activejob (= 5.0.0.1)
20
19
  mail (~> 2.5, >= 2.5.4)
21
20
  rails-dom-testing (~> 2.0)
22
- actionpack (5.0.0)
23
- actionview (= 5.0.0)
24
- activesupport (= 5.0.0)
21
+ actionpack (5.0.0.1)
22
+ actionview (= 5.0.0.1)
23
+ activesupport (= 5.0.0.1)
25
24
  rack (~> 2.0)
26
25
  rack-test (~> 0.6.3)
27
26
  rails-dom-testing (~> 2.0)
28
27
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.0.0)
30
- activesupport (= 5.0.0)
28
+ actionview (5.0.0.1)
29
+ activesupport (= 5.0.0.1)
31
30
  builder (~> 3.1)
32
31
  erubis (~> 2.7.0)
33
32
  rails-dom-testing (~> 2.0)
34
33
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
- activejob (5.0.0)
36
- activesupport (= 5.0.0)
34
+ activejob (5.0.0.1)
35
+ activesupport (= 5.0.0.1)
37
36
  globalid (>= 0.3.6)
38
- activemodel (5.0.0)
39
- activesupport (= 5.0.0)
40
- activerecord (5.0.0)
41
- activemodel (= 5.0.0)
42
- activesupport (= 5.0.0)
37
+ activemodel (5.0.0.1)
38
+ activesupport (= 5.0.0.1)
39
+ activerecord (5.0.0.1)
40
+ activemodel (= 5.0.0.1)
41
+ activesupport (= 5.0.0.1)
43
42
  arel (~> 7.0)
44
- activesupport (5.0.0)
43
+ activesupport (5.0.0.1)
45
44
  concurrent-ruby (~> 1.0, >= 1.0.2)
46
45
  i18n (~> 0.7)
47
46
  minitest (~> 5.1)
@@ -54,11 +53,11 @@ GEM
54
53
  abstract_type (~> 0.0.7)
55
54
  adamantium (~> 0.2)
56
55
  equalizer (~> 0.0.11)
57
- arel (7.0.0)
56
+ arel (7.1.4)
58
57
  ast (2.3.0)
59
58
  builder (3.2.2)
60
- byebug (9.0.5)
61
- capybara (2.7.1)
59
+ byebug (9.0.6)
60
+ capybara (2.10.1)
62
61
  addressable
63
62
  mime-types (>= 1.16)
64
63
  nokogiri (>= 1.3.3)
@@ -77,14 +76,14 @@ GEM
77
76
  equalizer (0.0.11)
78
77
  erubis (2.7.0)
79
78
  excon (0.54.0)
80
- fuubar (2.0.0)
81
- rspec (~> 3.0)
79
+ fuubar (2.2.0)
80
+ rspec-core (~> 3.0)
82
81
  ruby-progressbar (~> 1.4)
83
- globalid (0.3.6)
82
+ globalid (0.3.7)
84
83
  activesupport (>= 4.1.0)
85
84
  i18n (0.7.0)
86
85
  ice_nine (0.11.2)
87
- json (1.8.3)
86
+ json (2.0.2)
88
87
  loofah (2.0.3)
89
88
  nokogiri (>= 1.5.9)
90
89
  mail (2.6.4)
@@ -96,7 +95,7 @@ GEM
96
95
  mime-types-data (~> 3.2015)
97
96
  mime-types-data (3.2016.0521)
98
97
  mini_portile2 (2.1.0)
99
- minitest (5.9.0)
98
+ minitest (5.9.1)
100
99
  morpher (0.2.6)
101
100
  abstract_type (~> 0.0.7)
102
101
  adamantium (~> 0.2.0)
@@ -106,7 +105,7 @@ GEM
106
105
  equalizer (~> 0.0.9)
107
106
  ice_nine (~> 0.11.0)
108
107
  procto (~> 0.0.2)
109
- mutant (0.8.11)
108
+ mutant (0.8.12)
110
109
  abstract_type (~> 0.0.7)
111
110
  adamantium (~> 0.2.0)
112
111
  anima (~> 0.3.0)
@@ -118,7 +117,7 @@ GEM
118
117
  memoizable (~> 0.4.2)
119
118
  morpher (~> 0.2.6)
120
119
  parallel (~> 1.3)
121
- parser (~> 2.3.0, >= 2.3.0.2)
120
+ parser (~> 2.3.1, >= 2.3.1.4)
122
121
  procto (~> 0.0.2)
123
122
  regexp_parser (~> 0.3.6)
124
123
  unparser (~> 0.2.5)
@@ -126,16 +125,14 @@ GEM
126
125
  mutant (~> 0.8.11)
127
126
  rspec-core (>= 3.4.0, < 3.6.0)
128
127
  nio4r (1.2.1)
129
- nokogiri (1.6.8)
128
+ nokogiri (1.6.8.1)
130
129
  mini_portile2 (~> 2.1.0)
131
- pkg-config (~> 1.1.7)
132
130
  parallel (1.9.0)
133
- parser (2.3.1.2)
131
+ parser (2.3.1.4)
134
132
  ast (~> 2.2)
135
- pkg-config (1.1.7)
136
133
  powerpack (0.1.1)
137
134
  procto (0.0.3)
138
- pry (0.10.3)
135
+ pry (0.10.4)
139
136
  coderay (~> 1.1.0)
140
137
  method_source (~> 0.8.1)
141
138
  slop (~> 3.4)
@@ -145,37 +142,33 @@ GEM
145
142
  rack (2.0.1)
146
143
  rack-test (0.6.3)
147
144
  rack (>= 1.0)
148
- rails (5.0.0)
149
- actioncable (= 5.0.0)
150
- actionmailer (= 5.0.0)
151
- actionpack (= 5.0.0)
152
- actionview (= 5.0.0)
153
- activejob (= 5.0.0)
154
- activemodel (= 5.0.0)
155
- activerecord (= 5.0.0)
156
- activesupport (= 5.0.0)
145
+ rails (5.0.0.1)
146
+ actioncable (= 5.0.0.1)
147
+ actionmailer (= 5.0.0.1)
148
+ actionpack (= 5.0.0.1)
149
+ actionview (= 5.0.0.1)
150
+ activejob (= 5.0.0.1)
151
+ activemodel (= 5.0.0.1)
152
+ activerecord (= 5.0.0.1)
153
+ activesupport (= 5.0.0.1)
157
154
  bundler (>= 1.3.0, < 2.0)
158
- railties (= 5.0.0)
155
+ railties (= 5.0.0.1)
159
156
  sprockets-rails (>= 2.0.0)
160
157
  rails-dom-testing (2.0.1)
161
158
  activesupport (>= 4.2.0, < 6.0)
162
159
  nokogiri (~> 1.6.0)
163
160
  rails-html-sanitizer (1.0.3)
164
161
  loofah (~> 2.0)
165
- railties (5.0.0)
166
- actionpack (= 5.0.0)
167
- activesupport (= 5.0.0)
162
+ railties (5.0.0.1)
163
+ actionpack (= 5.0.0.1)
164
+ activesupport (= 5.0.0.1)
168
165
  method_source
169
166
  rake (>= 0.8.7)
170
167
  thor (>= 0.18.1, < 2.0)
171
168
  rainbow (2.1.0)
172
- rake (10.4.2)
169
+ rake (10.5.0)
173
170
  regexp_parser (0.3.6)
174
- rspec (3.5.0)
175
- rspec-core (~> 3.5.0)
176
- rspec-expectations (~> 3.5.0)
177
- rspec-mocks (~> 3.5.0)
178
- rspec-core (3.5.0)
171
+ rspec-core (3.5.4)
179
172
  rspec-support (~> 3.5.0)
180
173
  rspec-expectations (3.5.0)
181
174
  diff-lcs (>= 1.2.0, < 2.0)
@@ -183,7 +176,7 @@ GEM
183
176
  rspec-mocks (3.5.0)
184
177
  diff-lcs (>= 1.2.0, < 2.0)
185
178
  rspec-support (~> 3.5.0)
186
- rspec-rails (3.5.0)
179
+ rspec-rails (3.5.2)
187
180
  actionpack (>= 3.0)
188
181
  activesupport (>= 3.0)
189
182
  railties (>= 3.0)
@@ -192,32 +185,32 @@ GEM
192
185
  rspec-mocks (~> 3.5.0)
193
186
  rspec-support (~> 3.5.0)
194
187
  rspec-support (3.5.0)
195
- rubocop (0.41.1)
188
+ rubocop (0.45.0)
196
189
  parser (>= 2.3.1.1, < 3.0)
197
190
  powerpack (~> 0.1)
198
191
  rainbow (>= 1.99.1, < 3.0)
199
192
  ruby-progressbar (~> 1.7)
200
193
  unicode-display_width (~> 1.0, >= 1.0.1)
201
194
  ruby-progressbar (1.8.1)
202
- simplecov (0.11.2)
195
+ simplecov (0.12.0)
203
196
  docile (~> 1.1.0)
204
- json (~> 1.8)
197
+ json (>= 1.8, < 3)
205
198
  simplecov-html (~> 0.10.0)
206
199
  simplecov-html (0.10.0)
207
200
  slop (3.6.0)
208
- sprockets (3.6.3)
201
+ sprockets (3.7.0)
209
202
  concurrent-ruby (~> 1.0)
210
203
  rack (> 1, < 3)
211
- sprockets-rails (3.1.1)
204
+ sprockets-rails (3.2.0)
212
205
  actionpack (>= 4.0)
213
206
  activesupport (>= 4.0)
214
207
  sprockets (>= 3.0.0)
215
- sqlite3 (1.3.11)
208
+ sqlite3 (1.3.12)
216
209
  thor (0.19.1)
217
210
  thread_safe (0.3.5)
218
211
  tzinfo (1.2.2)
219
212
  thread_safe (~> 0.1)
220
- unicode-display_width (1.1.0)
213
+ unicode-display_width (1.1.1)
221
214
  unparser (0.2.5)
222
215
  abstract_type (~> 0.0.7)
223
216
  adamantium (~> 0.2.0)
@@ -27,5 +27,4 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'sqlite3', '~> 1.3'
28
28
 
29
29
  spec.add_dependency 'excon', '~> 0.51'
30
- spec.add_dependency 'activesupport', '~> 5.0'
31
30
  end
@@ -1,11 +1,9 @@
1
1
  require 'excon'
2
- require 'active_support'
3
- require 'active_support/core_ext/object/to_query'
4
2
 
5
3
  module GlimrApiClient
6
4
  module Api
7
5
  def post
8
- client("#{api_url}#{endpoint}").post(body: request_body.to_query).tap { |resp|
6
+ client("#{api_url}#{endpoint}").post(body: request_body.to_json).tap { |resp|
9
7
  # Only timeouts and network issues raise errors.
10
8
  handle_response_errors(resp)
11
9
  @body = resp.body
@@ -25,7 +25,6 @@ module GlimrApiClient
25
25
  end
26
26
 
27
27
  def request_body
28
- {}
29
28
  end
30
29
  end
31
30
  end
@@ -2,12 +2,15 @@ module GlimrApiClient
2
2
  class Case
3
3
  include GlimrApiClient::Api
4
4
 
5
- def self.find(case_reference = nil)
6
- new(case_reference).call
5
+ TRIBUNAL_JURISDICTION_ID = 8
6
+
7
+ def self.find(case_reference, confirmation_code)
8
+ new(case_reference, confirmation_code).call
7
9
  end
8
10
 
9
- def initialize(case_reference = nil)
11
+ def initialize(case_reference, confirmation_code)
10
12
  @case_reference = case_reference
13
+ @confirmation_code = confirmation_code
11
14
  end
12
15
 
13
16
  def call
@@ -37,8 +40,11 @@ module GlimrApiClient
37
40
 
38
41
  def request_body
39
42
  {
40
- jurisdictionId: 8, # TODO: Remove when no longer required in API
41
- caseNumber: @case_reference
43
+ # jurisdictionId is in the spec for this method, but doesn't actually seem to be necessary.
44
+ # Leaving it here, just in case a requirement is added in future
45
+ jurisdictionId: TRIBUNAL_JURISDICTION_ID,
46
+ caseNumber: @case_reference,
47
+ confirmationCode: @confirmation_code
42
48
  }
43
49
  end
44
50
  end
@@ -1,3 +1,3 @@
1
1
  module GlimrApiClient
2
- VERSION = '0.1.10'
2
+ VERSION = '0.1.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimr-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Tyree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-27 00:00:00.000000000 Z
11
+ date: 2016-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,20 +178,6 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0.51'
181
- - !ruby/object:Gem::Dependency
182
- name: activesupport
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '5.0'
188
- type: :runtime
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '5.0'
195
181
  description:
196
182
  email:
197
183
  - todd.tyree@digital.justice.gov.uk