regio 0.3.3 → 0.3.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: 101516d05b35e0fff2042405c0ecf84645faaf29e02180f591491ea43399ce24
4
- data.tar.gz: 65c2d011cf4a8bf8461a0f7b903737ea97841952a564d7ad2a57047aef0318eb
3
+ metadata.gz: 31398e20f35c92dda1741f1aa3130bde18d9d53192ed708dda0613cfa288faa2
4
+ data.tar.gz: cf25884d244f0ed37f93d11eda30b124b0e80436a82b8de4e4857cda7550fbde
5
5
  SHA512:
6
- metadata.gz: 4f19196f30c9b1193ca3484a9b67363dfacdab5d8d082bea500a9239917f6dcc506c139589008246422294deebb423c40e98f88f5ea07c0ca2e94184880fe87c
7
- data.tar.gz: af5daee5578cc5b18e4462dc0a6e9aa08e4d3fe01488fe1ad91b660b384e9677c63fc343e0040e7037b68c070e76b08f8e7e679d6ca39537c3251262ce430cd3
6
+ metadata.gz: 03ad3c09e053973747ec234318b899a481056fe7cfaebb8dbec649e6b76da8529c8b5bbf8f1aae77433fc78df4a2a7d88a00fcd8ec7439155e3d39e99bcf6c3a
7
+ data.tar.gz: ad3d80ee9e683bd90b4514674f4032a442959a07609af99be3cbebb431ed8c0929bf713f6e55fce1ca303badceee3320def1b6ca726abd9358b0364019ad1042
@@ -6,9 +6,27 @@ concurrency:
6
6
  group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
7
7
  cancel-in-progress: true
8
8
  jobs:
9
+ rspec-legacy:
10
+ name: RSpec with legacy ruby ${{matrix.ruby}}
11
+ runs-on: ubuntu-latest
12
+ env:
13
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/ruby_${{matrix.ruby}}.gemfile
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby: ['2.4', '2.5', '2.6']
18
+ steps:
19
+ - uses: actions/checkout@v3
20
+ - uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{matrix.ruby}}
23
+ bundler-cache: true
24
+ - name: Test with RSpec
25
+ run: bundle exec rspec
9
26
  rspec:
10
27
  name: RSpec with ruby ${{matrix.ruby}}
11
28
  runs-on: ubuntu-latest
29
+ needs: rubocop
12
30
  strategy:
13
31
  fail-fast: false
14
32
  matrix:
@@ -20,7 +38,7 @@ jobs:
20
38
  ruby-version: ${{matrix.ruby}}
21
39
  bundler-cache: true
22
40
  - name: Test with RSpec
23
- run: COVERAGE=true bundle exec rspec
41
+ run: bundle exec rspec
24
42
  rubocop:
25
43
  name: RuboCop
26
44
  runs-on: ubuntu-latest
@@ -3,9 +3,54 @@ on:
3
3
  release:
4
4
  types: [ released ]
5
5
  jobs:
6
+ rubocop:
7
+ name: RuboCop
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v3
11
+ - uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 3.1.3
14
+ bundler-cache: true
15
+ - name: Check with RuboCop
16
+ run: bundle exec rubocop
17
+ rspec-legacy:
18
+ name: RSpec with legacy ruby ${{matrix.ruby}}
19
+ runs-on: ubuntu-latest
20
+ env:
21
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/ruby_${{matrix.ruby}}.gemfile
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ ruby: ['2.4', '2.5', '2.6']
26
+ steps:
27
+ - uses: actions/checkout@v3
28
+ - uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{matrix.ruby}}
31
+ bundler-cache: true
32
+ - name: Test with RSpec
33
+ run: bundle exec rspec
34
+ rspec:
35
+ name: RSpec with ruby ${{matrix.ruby}}
36
+ runs-on: ubuntu-latest
37
+ needs: rubocop
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ ruby: ['2.6', '2.7', '3.0', '3.1', head]
42
+ steps:
43
+ - uses: actions/checkout@v3
44
+ - uses: ruby/setup-ruby@v1
45
+ with:
46
+ ruby-version: ${{matrix.ruby}}
47
+ bundler-cache: true
48
+ - name: Test with RSpec
49
+ run: bundle exec rspec
6
50
  build-and-push:
7
51
  name: Build and push gem
8
52
  runs-on: ubuntu-latest
53
+ needs: rspec
9
54
  steps:
10
55
  - uses: actions/checkout@v3
11
56
  - uses: ruby/setup-ruby@v1
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ require:
5
5
  AllCops:
6
6
  NewCops: enable
7
7
  SuggestExtensions: false
8
- TargetRubyVersion: 2.6
8
+ TargetRubyVersion: 2.4
9
9
 
10
10
  RSpec/NestedGroups:
11
11
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## v0.3.4 (06.07.2023)
4
+
5
+ * 2 minor enhancements:
6
+ * Add `ads_adr_id` into default options
7
+ * Set ruby 2.4 as minimum ruby version
8
+
3
9
  ## v0.3.3 (21.03.2023)
4
10
 
5
11
  * 1 minor enhancement:
data/Gemfile CHANGED
@@ -8,6 +8,7 @@ gemspec
8
8
 
9
9
  group :development, :test do
10
10
  gem 'rspec', '~> 3.12.0'
11
+
11
12
  gem 'rubocop', '~> 1.48.1'
12
13
  gem 'rubocop-performance', '~> 1.16.0'
13
14
  gem 'rubocop-rspec', '~> 2.19.0'
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- regio (0.3.3)
4
+ regio (0.3.4)
5
5
  httparty (>= 0.20, < 0.22)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.8.1)
10
+ addressable (2.8.4)
11
11
  public_suffix (>= 2.0.2, < 6.0)
12
12
  ast (2.4.2)
13
13
  crack (0.4.5)
@@ -21,27 +21,29 @@ GEM
21
21
  json (2.6.3)
22
22
  mini_mime (1.1.2)
23
23
  multi_xml (0.6.0)
24
- parallel (1.22.1)
25
- parser (3.2.1.1)
24
+ parallel (1.23.0)
25
+ parser (3.2.2.3)
26
26
  ast (~> 2.4.1)
27
+ racc
27
28
  public_suffix (5.0.1)
29
+ racc (1.7.1)
28
30
  rainbow (3.1.1)
29
31
  rake (13.0.6)
30
- regexp_parser (2.7.0)
32
+ regexp_parser (2.8.1)
31
33
  rexml (3.2.5)
32
34
  rspec (3.12.0)
33
35
  rspec-core (~> 3.12.0)
34
36
  rspec-expectations (~> 3.12.0)
35
37
  rspec-mocks (~> 3.12.0)
36
- rspec-core (3.12.1)
38
+ rspec-core (3.12.2)
37
39
  rspec-support (~> 3.12.0)
38
- rspec-expectations (3.12.2)
40
+ rspec-expectations (3.12.3)
39
41
  diff-lcs (>= 1.2.0, < 2.0)
40
42
  rspec-support (~> 3.12.0)
41
- rspec-mocks (3.12.3)
43
+ rspec-mocks (3.12.5)
42
44
  diff-lcs (>= 1.2.0, < 2.0)
43
45
  rspec-support (~> 3.12.0)
44
- rspec-support (3.12.0)
46
+ rspec-support (3.12.1)
45
47
  rubocop (1.48.1)
46
48
  json (~> 2.3)
47
49
  parallel (~> 1.10)
@@ -52,9 +54,9 @@ GEM
52
54
  rubocop-ast (>= 1.26.0, < 2.0)
53
55
  ruby-progressbar (~> 1.7)
54
56
  unicode-display_width (>= 2.4.0, < 3.0)
55
- rubocop-ast (1.27.0)
57
+ rubocop-ast (1.29.0)
56
58
  parser (>= 3.2.1.0)
57
- rubocop-capybara (2.17.1)
59
+ rubocop-capybara (2.18.0)
58
60
  rubocop (~> 1.41)
59
61
  rubocop-performance (1.16.0)
60
62
  rubocop (>= 1.7.0, < 2.0)
@@ -93,4 +95,4 @@ DEPENDENCIES
93
95
  webmock (~> 3.18.1)
94
96
 
95
97
  BUNDLED WITH
96
- 2.3.7
98
+ 2.3.26
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Regio
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/regio.svg)](https://badge.fury.io/rb/regio)
4
+ [![Release](https://github.com/tab/regio/actions/workflows/release.yaml/badge.svg?event=release)](https://github.com/tab/regio/actions/workflows/release.yaml)
4
5
 
5
6
  [Regio geocoding API](https://api.regio.ee/documentation/#docs/geocode) lets you search for addresses from complete Estonian address database.
6
7
 
@@ -11,7 +12,7 @@
11
12
  Add this line to your application's Gemfile:
12
13
 
13
14
  ```ruby
14
- gem 'regio', '~> 0.3.3'
15
+ gem 'regio', '~> 0.3.4'
15
16
  ```
16
17
 
17
18
  And then execute:
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ gemspec path: '../'
8
+
9
+ group :development, :test do
10
+ gem 'rspec', '~> 3.12.0'
11
+ end
12
+
13
+ group :test do
14
+ gem 'simplecov', '~> 0.18.0'
15
+ gem 'webmock', '~> 3.18.1'
16
+ end
@@ -0,0 +1,59 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ regio (0.3.4)
5
+ httparty (>= 0.20, < 0.22)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.4)
11
+ public_suffix (>= 2.0.2, < 6.0)
12
+ crack (0.4.5)
13
+ rexml
14
+ diff-lcs (1.5.0)
15
+ docile (1.3.5)
16
+ hashdiff (1.0.1)
17
+ httparty (0.21.0)
18
+ mini_mime (>= 1.0.0)
19
+ multi_xml (>= 0.5.2)
20
+ mini_mime (1.1.2)
21
+ multi_xml (0.6.0)
22
+ public_suffix (4.0.7)
23
+ rake (13.0.6)
24
+ rexml (3.2.5)
25
+ rspec (3.12.0)
26
+ rspec-core (~> 3.12.0)
27
+ rspec-expectations (~> 3.12.0)
28
+ rspec-mocks (~> 3.12.0)
29
+ rspec-core (3.12.2)
30
+ rspec-support (~> 3.12.0)
31
+ rspec-expectations (3.12.3)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.12.0)
34
+ rspec-mocks (3.12.5)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.12.0)
37
+ rspec-support (3.12.1)
38
+ simplecov (0.18.5)
39
+ docile (~> 1.1)
40
+ simplecov-html (~> 0.11)
41
+ simplecov-html (0.12.3)
42
+ webmock (3.18.1)
43
+ addressable (>= 2.8.0)
44
+ crack (>= 0.3.2)
45
+ hashdiff (>= 0.4.0, < 2.0.0)
46
+
47
+ PLATFORMS
48
+ x86_64-linux-musl
49
+
50
+ DEPENDENCIES
51
+ bundler (~> 2.3.0)
52
+ rake (~> 13.0.6)
53
+ regio!
54
+ rspec (~> 3.12.0)
55
+ simplecov (~> 0.18.0)
56
+ webmock (~> 3.18.1)
57
+
58
+ BUNDLED WITH
59
+ 2.3.26
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ gemspec path: '../'
8
+
9
+ group :development, :test do
10
+ gem 'rspec', '~> 3.12.0'
11
+ end
12
+
13
+ group :test do
14
+ gem 'simplecov', '~> 0.18.0'
15
+ gem 'webmock', '~> 3.18.1'
16
+ end
@@ -0,0 +1,59 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ regio (0.3.4)
5
+ httparty (>= 0.20, < 0.22)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.4)
11
+ public_suffix (>= 2.0.2, < 6.0)
12
+ crack (0.4.5)
13
+ rexml
14
+ diff-lcs (1.5.0)
15
+ docile (1.4.0)
16
+ hashdiff (1.0.1)
17
+ httparty (0.21.0)
18
+ mini_mime (>= 1.0.0)
19
+ multi_xml (>= 0.5.2)
20
+ mini_mime (1.1.2)
21
+ multi_xml (0.6.0)
22
+ public_suffix (4.0.7)
23
+ rake (13.0.6)
24
+ rexml (3.2.5)
25
+ rspec (3.12.0)
26
+ rspec-core (~> 3.12.0)
27
+ rspec-expectations (~> 3.12.0)
28
+ rspec-mocks (~> 3.12.0)
29
+ rspec-core (3.12.2)
30
+ rspec-support (~> 3.12.0)
31
+ rspec-expectations (3.12.3)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.12.0)
34
+ rspec-mocks (3.12.5)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.12.0)
37
+ rspec-support (3.12.1)
38
+ simplecov (0.18.5)
39
+ docile (~> 1.1)
40
+ simplecov-html (~> 0.11)
41
+ simplecov-html (0.12.3)
42
+ webmock (3.18.1)
43
+ addressable (>= 2.8.0)
44
+ crack (>= 0.3.2)
45
+ hashdiff (>= 0.4.0, < 2.0.0)
46
+
47
+ PLATFORMS
48
+ x86_64-linux-musl
49
+
50
+ DEPENDENCIES
51
+ bundler (~> 2.3.0)
52
+ rake (~> 13.0.6)
53
+ regio!
54
+ rspec (~> 3.12.0)
55
+ simplecov (~> 0.18.0)
56
+ webmock (~> 3.18.1)
57
+
58
+ BUNDLED WITH
59
+ 2.3.26
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ gemspec path: '../'
8
+
9
+ group :development, :test do
10
+ gem 'rspec', '~> 3.12.0'
11
+ end
12
+
13
+ group :test do
14
+ gem 'simplecov', '~> 0.18.0'
15
+ gem 'webmock', '~> 3.18.1'
16
+ end
@@ -0,0 +1,59 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ regio (0.3.4)
5
+ httparty (>= 0.20, < 0.22)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.4)
11
+ public_suffix (>= 2.0.2, < 6.0)
12
+ crack (0.4.5)
13
+ rexml
14
+ diff-lcs (1.5.0)
15
+ docile (1.4.0)
16
+ hashdiff (1.0.1)
17
+ httparty (0.21.0)
18
+ mini_mime (>= 1.0.0)
19
+ multi_xml (>= 0.5.2)
20
+ mini_mime (1.1.2)
21
+ multi_xml (0.6.0)
22
+ public_suffix (5.0.1)
23
+ rake (13.0.6)
24
+ rexml (3.2.5)
25
+ rspec (3.12.0)
26
+ rspec-core (~> 3.12.0)
27
+ rspec-expectations (~> 3.12.0)
28
+ rspec-mocks (~> 3.12.0)
29
+ rspec-core (3.12.2)
30
+ rspec-support (~> 3.12.0)
31
+ rspec-expectations (3.12.3)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.12.0)
34
+ rspec-mocks (3.12.5)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.12.0)
37
+ rspec-support (3.12.1)
38
+ simplecov (0.18.5)
39
+ docile (~> 1.1)
40
+ simplecov-html (~> 0.11)
41
+ simplecov-html (0.12.3)
42
+ webmock (3.18.1)
43
+ addressable (>= 2.8.0)
44
+ crack (>= 0.3.2)
45
+ hashdiff (>= 0.4.0, < 2.0.0)
46
+
47
+ PLATFORMS
48
+ x86_64-linux-musl
49
+
50
+ DEPENDENCIES
51
+ bundler (~> 2.3.0)
52
+ rake (~> 13.0.6)
53
+ regio!
54
+ rspec (~> 3.12.0)
55
+ simplecov (~> 0.18.0)
56
+ webmock (~> 3.18.1)
57
+
58
+ BUNDLED WITH
59
+ 2.3.26
data/lib/regio/core.rb CHANGED
@@ -45,6 +45,7 @@ module Regio
45
45
 
46
46
  def default_hash_for(result)
47
47
  {
48
+ ads_adr_id: result[:ads_adr_id],
48
49
  regio_id: result[:id],
49
50
  title: result[:address],
50
51
  valid: result[:is_valid],
data/lib/regio/geocode.rb CHANGED
@@ -23,7 +23,7 @@ module Regio
23
23
  country: 'ee',
24
24
  apikey: Configuration.api_key,
25
25
  address_format: 'long_address',
26
- details: 'id,address,postcode,type,components,geometry,is_valid,is_complete',
26
+ details: 'id,address,ads_adr_id,postcode,type,components,geometry,is_valid,is_complete',
27
27
  output_format: 'json',
28
28
  limit: 25
29
29
  }
@@ -22,7 +22,7 @@ module Regio
22
22
  {
23
23
  apikey: Configuration.api_key,
24
24
  address_format: 'long_address',
25
- details: 'id,address,postcode,type,components,geometry,is_valid,is_complete',
25
+ details: 'id,address,ads_adr_id,postcode,type,components,geometry,is_valid,is_complete',
26
26
  output_format: 'json',
27
27
  limit: 25
28
28
  }
data/lib/regio/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Regio
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
data/regio.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = 'https://github.com/tab/regio'
16
16
  spec.license = 'MIT'
17
17
 
18
- spec.required_ruby_version = '>= 2.6'
18
+ spec.required_ruby_version = '>= 2.4'
19
19
 
20
20
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
21
21
  # to allow pushing to a single host or delete this section to allow pushing to any host.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - tab
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2023-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -86,6 +86,12 @@ files:
86
86
  - bin/console
87
87
  - bin/setup
88
88
  - docker-compose.yaml
89
+ - gemfiles/ruby_2.4.gemfile
90
+ - gemfiles/ruby_2.4.gemfile.lock
91
+ - gemfiles/ruby_2.5.gemfile
92
+ - gemfiles/ruby_2.5.gemfile.lock
93
+ - gemfiles/ruby_2.6.gemfile
94
+ - gemfiles/ruby_2.6.gemfile.lock
89
95
  - lib/regio.rb
90
96
  - lib/regio/configuration.rb
91
97
  - lib/regio/core.rb
@@ -115,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
121
  requirements:
116
122
  - - ">="
117
123
  - !ruby/object:Gem::Version
118
- version: '2.6'
124
+ version: '2.4'
119
125
  required_rubygems_version: !ruby/object:Gem::Requirement
120
126
  requirements:
121
127
  - - ">="