first-class-postcodes 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for FCP::ErrorRaw
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'ErrorRaw' do
9
+ before do
10
+ # run before each test
11
+ @instance = FCP::ErrorRaw.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of ErrorRaw' do
19
+ it 'should create an instance of ErrorRaw' do
20
+ expect(@instance).to be_instance_of(FCP::ErrorRaw)
21
+ end
22
+ end
23
+ describe 'test attribute "request_id"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "type"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "gateway"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for FCP::Error
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Error' do
9
+ before do
10
+ # run before each test
11
+ @instance = FCP::Error.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Error' do
19
+ it 'should create an instance of Error' do
20
+ expect(@instance).to be_instance_of(FCP::Error)
21
+ end
22
+ end
23
+ describe 'test attribute "message"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "type"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "__raw"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for FCP::Point
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Point' do
9
+ before do
10
+ # run before each test
11
+ @instance = FCP::Point.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Point' do
19
+ it 'should create an instance of Point' do
20
+ expect(@instance).to be_instance_of(FCP::Point)
21
+ end
22
+ end
23
+ describe 'test attribute "postcode"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "position"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ end
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for FCP::Position
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Position' do
9
+ before do
10
+ # run before each test
11
+ @instance = FCP::Position.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Position' do
19
+ it 'should create an instance of Position' do
20
+ expect(@instance).to be_instance_of(FCP::Position)
21
+ end
22
+ end
23
+ describe 'test attribute "geohash"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "easting"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "northing"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "latitude"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "longitude"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "accuracy"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for FCP::Typeahead
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Typeahead' do
9
+ before do
10
+ # run before each test
11
+ @instance = FCP::Typeahead.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Typeahead' do
19
+ it 'should create an instance of Typeahead' do
20
+ expect(@instance).to be_instance_of(FCP::Typeahead)
21
+ end
22
+ end
23
+ describe 'test attribute "display"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "postcode"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "number"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,129 @@
1
+ require 'uri'
2
+ require 'simplecov'
3
+
4
+ SimpleCov.start
5
+
6
+ if ENV['CI'] == 'true'
7
+ require 'codecov'
8
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
9
+ end
10
+
11
+ # load the gem
12
+ require 'first-class-postcodes'
13
+
14
+ API_URL = ENV['API_URL']
15
+
16
+ # The following was generated by the `rspec --init` command. Conventionally, all
17
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
18
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
19
+ # this file to always be loaded, without a need to explicitly require it in any
20
+ # files.
21
+ #
22
+ # Given that it is always loaded, you are encouraged to keep this file as
23
+ # light-weight as possible. Requiring heavyweight dependencies from this file
24
+ # will add to the boot time of your test suite on EVERY test run, even for an
25
+ # individual file that may not need all of that loaded. Instead, consider making
26
+ # a separate helper file that requires the additional dependencies and performs
27
+ # the additional setup, and require it from the spec files that actually need
28
+ # it.
29
+ #
30
+ # The `.rspec` file also contains a few flags that are not defaults but that
31
+ # users commonly want.
32
+ #
33
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
34
+ RSpec.configure do |config|
35
+ # rspec-expectations config goes here. You can use an alternate
36
+ # assertion/expectation library such as wrong or the stdlib/minitest
37
+ # assertions if you prefer.
38
+ config.expect_with :rspec do |expectations|
39
+ # This option will default to `true` in RSpec 4. It makes the `description`
40
+ # and `failure_message` of custom matchers include text for helper methods
41
+ # defined using `chain`, e.g.:
42
+ # be_bigger_than(2).and_smaller_than(4).description
43
+ # # => "be bigger than 2 and smaller than 4"
44
+ # ...rather than:
45
+ # # => "be bigger than 2"
46
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
47
+ end
48
+
49
+ # rspec-mocks config goes here. You can use an alternate test double
50
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
51
+ config.mock_with :rspec do |mocks|
52
+ # Prevents you from mocking or stubbing a method that does not exist on
53
+ # a real object. This is generally recommended, and will default to
54
+ # `true` in RSpec 4.
55
+ mocks.verify_partial_doubles = true
56
+ end
57
+
58
+ # Configure the FCP client to execute tests against the mock container.
59
+ # This helps to ensure that tests are _actually_ working.
60
+ config.before(:each) do
61
+ uri = URI.parse(API_URL)
62
+ FCP.configure do |config|
63
+ config.api_key['X-Api-Key'] = '111111111111'
64
+ config.host = if uri.port
65
+ "#{uri.host}:#{uri.port}"
66
+ else
67
+ uri.host
68
+ end
69
+ config.scheme = uri.scheme
70
+ config.base_path = uri.path
71
+ end
72
+ end
73
+
74
+
75
+
76
+ # The settings below are suggested to provide a good initial experience
77
+ # with RSpec, but feel free to customize to your heart's content.
78
+ =begin
79
+ # These two settings work together to allow you to limit a spec run
80
+ # to individual examples or groups you care about by tagging them with
81
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
82
+ # get run.
83
+ config.filter_run :focus
84
+ config.run_all_when_everything_filtered = true
85
+
86
+ # Allows RSpec to persist some state between runs in order to support
87
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
88
+ # you configure your source control system to ignore this file.
89
+ config.example_status_persistence_file_path = "spec/examples.txt"
90
+
91
+ # Limits the available syntax to the non-monkey patched syntax that is
92
+ # recommended. For more details, see:
93
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
94
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
95
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
96
+ config.disable_monkey_patching!
97
+
98
+ # This setting enables warnings. It's recommended, but in some cases may
99
+ # be too noisy due to issues in dependencies.
100
+ config.warnings = true
101
+
102
+ # Many RSpec users commonly either run the entire suite or an individual
103
+ # file, and it's useful to allow more verbose output when running an
104
+ # individual spec file.
105
+ if config.files_to_run.one?
106
+ # Use the documentation formatter for detailed output,
107
+ # unless a formatter has already been configured
108
+ # (e.g. via a command-line flag).
109
+ config.default_formatter = 'doc'
110
+ end
111
+
112
+ # Print the 10 slowest examples and example groups at the
113
+ # end of the spec run, to help surface which specs are running
114
+ # particularly slow.
115
+ config.profile_examples = 10
116
+
117
+ # Run specs in random order to surface order dependencies. If you find an
118
+ # order dependency and want to debug it, you can fix the order by providing
119
+ # the seed, which is printed after each run.
120
+ # --seed 1234
121
+ config.order = :random
122
+
123
+ # Seed global randomization in this process using the `--seed` CLI option.
124
+ # Setting this allows you to use `--seed` to deterministically reproduce
125
+ # test failures related to randomization by passing the same `--seed` value
126
+ # as the one that triggered the failure.
127
+ Kernel.srand config.seed
128
+ =end
129
+ end
metadata ADDED
@@ -0,0 +1,267 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: first-class-postcodes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - First Class Postcodes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-06-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: typhoeus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: json
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 2.2.0
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '2.2'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 2.2.0
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '2.2'
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 3.6.0
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.6'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 3.6.0
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '3.6'
73
+ - !ruby/object:Gem::Dependency
74
+ name: vcr
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '3.0'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.1
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 3.0.1
93
+ - !ruby/object:Gem::Dependency
94
+ name: webmock
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '1.24'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.24.3
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.24'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 1.24.3
113
+ - !ruby/object:Gem::Dependency
114
+ name: autotest
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '4.4'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 4.4.6
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '4.4'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 4.4.6
133
+ - !ruby/object:Gem::Dependency
134
+ name: autotest-rails-pure
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '4.1'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 4.1.2
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '4.1'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 4.1.2
153
+ - !ruby/object:Gem::Dependency
154
+ name: autotest-growl
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.2'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 0.2.16
163
+ type: :development
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '0.2'
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 0.2.16
173
+ - !ruby/object:Gem::Dependency
174
+ name: autotest-fsevent
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.2'
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 0.2.12
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '0.2'
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: 0.2.12
193
+ description: 'Use this API to retrieve address information for UK postcodes. You can
194
+ request by postcode, filter by geolocation and provide autocomplete suggestions
195
+ using natural address entry. '
196
+ email:
197
+ - support+api+ruby@firstclasspostcodes.com
198
+ executables: []
199
+ extensions: []
200
+ extra_rdoc_files: []
201
+ files:
202
+ - Gemfile
203
+ - README.md
204
+ - Rakefile
205
+ - first-class-postcodes.gemspec
206
+ - lib/first-class-postcodes.rb
207
+ - lib/first-class-postcodes/api/api_api.rb
208
+ - lib/first-class-postcodes/api/data_api.rb
209
+ - lib/first-class-postcodes/api_client.rb
210
+ - lib/first-class-postcodes/api_error.rb
211
+ - lib/first-class-postcodes/configuration.rb
212
+ - lib/first-class-postcodes/models/address.rb
213
+ - lib/first-class-postcodes/models/error.rb
214
+ - lib/first-class-postcodes/models/error_raw.rb
215
+ - lib/first-class-postcodes/models/error_raw_gateway.rb
216
+ - lib/first-class-postcodes/models/point.rb
217
+ - lib/first-class-postcodes/models/position.rb
218
+ - lib/first-class-postcodes/models/typeahead.rb
219
+ - lib/first-class-postcodes/version.rb
220
+ - spec/api/api_api_spec.rb
221
+ - spec/api/data_api_spec.rb
222
+ - spec/api_client_spec.rb
223
+ - spec/configuration_spec.rb
224
+ - spec/models/address_spec.rb
225
+ - spec/models/error_raw_gateway_spec.rb
226
+ - spec/models/error_raw_spec.rb
227
+ - spec/models/error_spec.rb
228
+ - spec/models/point_spec.rb
229
+ - spec/models/position_spec.rb
230
+ - spec/models/typeahead_spec.rb
231
+ - spec/spec_helper.rb
232
+ homepage: https://docs.firstclasspostcodes.com/clients/ruby
233
+ licenses:
234
+ - MIT
235
+ metadata: {}
236
+ post_install_message:
237
+ rdoc_options: []
238
+ require_paths:
239
+ - lib
240
+ required_ruby_version: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: 2.2.0
245
+ required_rubygems_version: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ requirements: []
251
+ rubygems_version: 3.0.4
252
+ signing_key:
253
+ specification_version: 4
254
+ summary: First Class Postcodes Ruby API Client
255
+ test_files:
256
+ - spec/api/api_api_spec.rb
257
+ - spec/api/data_api_spec.rb
258
+ - spec/api_client_spec.rb
259
+ - spec/configuration_spec.rb
260
+ - spec/models/position_spec.rb
261
+ - spec/models/error_raw_gateway_spec.rb
262
+ - spec/models/address_spec.rb
263
+ - spec/models/error_spec.rb
264
+ - spec/models/point_spec.rb
265
+ - spec/models/typeahead_spec.rb
266
+ - spec/models/error_raw_spec.rb
267
+ - spec/spec_helper.rb