-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update from Mashape to RapidAPI #1450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,7 @@ def test_geocoder_ca_showpostal | |
| def test_telize_api_key | ||
| Geocoder.configure(:api_key => "MY_KEY") | ||
| g = Geocoder::Lookup::Telize.new | ||
| assert_match "mashape-key=MY_KEY", g.query_url(Geocoder::Query.new("232.65.123.94")) | ||
| assert_match "rapidapi-key=MY_KEY", g.query_url(Geocoder::Query.new("232.65.123.94")) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. |
||
| end | ||
|
|
||
| def test_ipinfo_io_api_key | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,14 +10,14 @@ def setup | |
| def test_query_url | ||
| lookup = Geocoder::Lookup::Telize.new | ||
| query = Geocoder::Query.new("74.200.247.59") | ||
| assert_match %r{^https://telize-v1\.p\.mashape\.com/location/74\.200\.247\.59}, lookup.query_url(query) | ||
| assert_match %r{^https://telize-v1\.p\.rapidapi\.com/location/74\.200\.247\.59}, lookup.query_url(query) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Metrics/LineLength: Line is too long. [108/80] |
||
| end | ||
|
|
||
| def test_includes_api_key_when_set | ||
| Geocoder.configure(api_key: "api_key") | ||
| lookup = Geocoder::Lookup::Telize.new | ||
| query = Geocoder::Query.new("74.200.247.59") | ||
| assert_match %r{/location/74\.200\.247\.59\?mashape-key=api_key}, lookup.query_url(query) | ||
| assert_match %r{/location/74\.200\.247\.59\?rapidapi-key=api_key}, lookup.query_url(query) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Metrics/LineLength: Line is too long. [94/80] |
||
| end | ||
|
|
||
| def test_uses_custom_host_when_set | ||
|
|
@@ -38,7 +38,7 @@ def test_requires_https_when_not_custom_host | |
| Geocoder.configure(use_https: false) | ||
| lookup = Geocoder::Lookup::Telize.new | ||
| query = Geocoder::Query.new("74.200.247.59") | ||
| assert_match %r{^https://telize-v1\.p\.mashape\.com}, lookup.query_url(query) | ||
| assert_match %r{^https://telize-v1\.p\.rapidapi\.com}, lookup.query_url(query) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Metrics/LineLength: Line is too long. [82/80] |
||
| end | ||
|
|
||
| def test_result_on_ip_address_search | ||
|
|
@@ -83,7 +83,7 @@ def test_cache_key_strips_off_query_string | |
| query = Geocoder::Query.new("8.8.8.8") | ||
| qurl = lookup.send(:query_url, query) | ||
| key = lookup.send(:cache_key, query) | ||
| assert qurl.include?("mashape-key") | ||
| assert !key.include?("mashape-key") | ||
| assert qurl.include?("rapidapi-key") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. |
||
| assert !key.include?("rapidapi-key") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. |
||
| end | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [105/80]