Skip to content

Commit aa134e3

Browse files
authored
Merge pull request #1705 from mikehale/update-build
Update build
2 parents 2d3be47 + 05ee377 commit aa134e3

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
20+
ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0"]
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v6
2323
- name: Set up Ruby
2424
uses: ruby/setup-ruby@v1
2525
with:

Gemfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
source "https://rubygems.org"
22

33
group :development, :test do
4-
gem 'rake'
5-
gem 'mongoid'
4+
gem 'benchmark' # needed for Ruby >=4.0
5+
gem 'bigdecimal'
66
gem 'geoip'
7-
gem 'rubyzip'
8-
gem 'rails', '~>5.1.0'
9-
gem 'test-unit' # needed for Ruby >=2.2.0
107
gem 'ip2location_ruby'
118
gem 'logger'
9+
gem 'mongoid'
1210
gem 'ostruct'
13-
gem 'bigdecimal'
11+
gem 'rails', '~>5.1.0'
12+
gem 'rake'
13+
gem 'rdoc' # needed for Ruby >=4.0
14+
gem 'rubyzip'
15+
gem 'test-unit' # needed for Ruby >=2.2.0
1416

1517
platforms :jruby do
16-
gem 'jruby-openssl'
1718
gem 'jgeoip'
19+
gem 'jruby-openssl'
1820
end
1921
end
2022

@@ -24,18 +26,18 @@ group :test do
2426
gem 'sqlite_ext'
2527
end
2628

27-
gem 'webmock'
2829
gem 'mutex_m'
30+
gem 'webmock'
2931

3032
platforms :ruby do
31-
gem 'pg', '~> 1.5.9'
3233
gem 'mysql2', '~> 0.5.4'
34+
gem 'pg', '~> 1.5.9'
3335
end
3436

3537
platforms :jruby do
38+
gem 'activerecord-jdbcpostgresql-adapter'
3639
gem 'jdbc-mysql'
3740
gem 'jdbc-sqlite3'
38-
gem 'activerecord-jdbcpostgresql-adapter'
3941
end
4042
end
4143

lib/geocoder/lookups/bing.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def required_api_key_parts
1919
private # ---------------------------------------------------------------
2020

2121
def base_query_url(query)
22+
require 'erb' unless defined?(ERB) && defined?(ERB::Util.url_encode)
2223
text = ERB::Util.url_encode(query.sanitized_text.strip)
2324
url = "#{protocol}://dev.virtualearth.net/REST/v1/Locations/"
2425
if query.reverse_geocode?

test/fixtures/bing_invalid_key

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"authenticationResultCode":"InvalidCredentials","brandLogoUri":"http:\\/\\/dev.virtualearth.net\\/Branding\\/logo_powered_by.png","copyright":"Copyright \xC2\xA9 2012 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation."],"resourceSets":[],"statusCode":401,"statusDescription":"Unauthorized","traceId":"5c539f6e70c44b2e858741b6c932318e|EWRM001670|02.00.83.1900|"}
1+
{"authenticationResultCode":"InvalidCredentials","brandLogoUri":"http:\\/\\/dev.virtualearth.net\\/Branding\\/logo_powered_by.png","copyright":"Copyright \u00a9 2012 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation."],"resourceSets":[],"statusCode":401,"statusDescription":"Unauthorized","traceId":"5c539f6e70c44b2e858741b6c932318e|EWRM001670|02.00.83.1900|"}

0 commit comments

Comments
 (0)