Skip to content

Commit

Permalink
version 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmail committed Jul 28, 2023
1 parent eeca5e2 commit cfab47f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
# https://www.ruby-lang.org/en/downloads/branches/
ruby: ["2.7", "3.0", "3.1", "3.2"]
runs-on: ${{ matrix.os }}
steps:
Expand Down
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
unreleased
3.1.1 - Fri Jul 28 2023
===============================================================
- feature: add .latitude and .longitude accessor aliases (thanks @thestelz)
- test suite: Switched from Travis-CI to Github Actions
- test suite: test against Ruby 3.2
- various Ruby gem updates, newest Rubocop

3.1.0 - Mon Jan 16 2023
===============================================================
Expand Down
47 changes: 27 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,64 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
hashdiff (1.0.1)
json (2.6.3)
parallel (1.22.1)
parser (3.2.0.0)
language_server-protocol (3.17.0.3)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
public_suffix (5.0.1)
racc
public_suffix (5.0.3)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.1)
rexml (3.2.5)
regexp_parser (2.8.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.2)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.43.0)
rspec-support (3.12.1)
rubocop (1.55.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-capybara (2.17.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.18.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara
ruby-progressbar (1.11.0)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
unicode-display_width (2.4.2)
vcr (6.1.0)
vcr (6.2.0)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ geocoder = OpenCage::Geocoder.new(api_key: 'your-api-key-here')

results = []
File.foreach('queries.txt') do |line|
lat, lng = line.chomp.split(',')
latitude, longitude = line.chomp.split(',')

# Use Float() rather than #to_f because it will throw an ArgumentError if
# there is an invalid line in the queries.txt file
result = geocoder.reverse_geocode(Float(lat), Float(lng))
result = geocoder.reverse_geocode(Float(latitude), Float(longitude))
results.push(result)
rescue ArgumentError, OpenCage::Geocoder::GeocodingError => error
# Stop looping through the queries if there is an error
Expand Down
2 changes: 1 addition & 1 deletion lib/opencage/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module OpenCage
VERSION = '3.1.0'.freeze
VERSION = '3.1.1'.freeze
end
3 changes: 3 additions & 0 deletions spec/open_cage/geocoder/location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

expect(reverse_result.lat).to eq(-22.6791826)
expect(reverse_result.lng).to eq(14.5268016)

expect(reverse_result.latitude).to eq(-22.6791826)
expect(reverse_result.longitude).to eq(14.5268016)
end

it 'has bounds', :vcr do
Expand Down

0 comments on commit cfab47f

Please sign in to comment.