Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Try verbatim alt_to keys again so we don't have to support this CaMeL…
Browse files Browse the repository at this point in the history
…cAsE translation stuff any longer
  • Loading branch information
zachthompson committed Dec 4, 2015
1 parent 222c749 commit a850166
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/DDG/Spice/Astrobin/Apod.pm
Expand Up @@ -22,7 +22,7 @@ spice proxy_cache_valid => "200 60m";
spice wrap_jsonp_callback => 1;

spice alt_to => {
fetchid => {
fetch_id => {
to => 'http://www.astrobin.com/api/v1/image/$1/?api_key={{ENV{DDG_SPICE_ASTROBIN_APIKEY}}}&api_secret={{ENV{DDG_SPICE_ASTROBIN_APISECRET}}}&format=json',
wrap_jsonp_callback => 1
}
Expand Down
2 changes: 1 addition & 1 deletion lib/DDG/Spice/Flights/Route.pm
Expand Up @@ -22,7 +22,7 @@ spice from => '(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)';
spice to => 'https://api.flightstats.com/flex/flightstatus/rest/v2/jsonp/route/status/$4/$5/arr/$6/$7/$8?hourOfDay=$9&utc=true&appId={{ENV{DDG_SPICE_FLIGHTS_API_ID}}}&appKey={{ENV{DDG_SPICE_FLIGHTS_APIKEY}}}&callback={{callback}}';

spice alt_to => {
RouteHelper => {
route_helper => {
proxy_cache_valid => '200 304 5m',
to => 'https://api.flightstats.com/flex/flightstatus/rest/v2/jsonp/route/status/$1/$2/$3/$4/$5/$6/?hourOfDay=$7&utc=true&appId={{ENV{DDG_SPICE_FLIGHTS_API_ID}}}&appKey={{ENV{DDG_SPICE_FLIGHTS_APIKEY}}}&callback={{callback}}',
from => '(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)'
Expand Down
2 changes: 1 addition & 1 deletion lib/DDG/Spice/Movie.pm
Expand Up @@ -19,7 +19,7 @@ spice proxy_cache_valid => "200 7d";
spice to => 'http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey={{ENV{DDG_SPICE_ROTTEN_APIKEY}}}&q=$1&page_limit=50&page=1&callback={{callback}}';

spice alt_to => {
MovieImage => {
movie_image => {
to => 'https://api.themoviedb.org/3/find/$1?api_key={{ENV{DDG_SPICE_MOVIEDB_APIKEY}}}&external_source=imdb_id',
# Uses $loc so needs to not cache back end.
is_cached => 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/DDG/Spice/SoundCloud.pm
Expand Up @@ -19,7 +19,7 @@ attribution web => ['http://jordanscales.com', 'Jordan Scales'],
spice call_type => 'self';

spice alt_to => {
SoundCloudResult => {
sound_cloud_result => {
to => 'http://api.soundcloud.com/tracks.json?client_id={{ENV{DDG_SPICE_SOUNDCLOUD_APIKEY}}}&q=$1&limit=35&filter=streamable'
}
};
Expand Down
2 changes: 2 additions & 0 deletions t/Astrobin.t
Expand Up @@ -24,5 +24,7 @@ ddg_spice_test(
),
);

alt_to_test('DDG::Spice::Astrobin::Apod', ['fetch_id']);

done_testing;

2 changes: 2 additions & 0 deletions t/Flights.t
Expand Up @@ -123,4 +123,6 @@ ddg_spice_test(
'Boston Paris' => undef,
);

alt_to_test('DDG::Spice::Flights::Route', ['route_helper']);

done_testing;
2 changes: 2 additions & 0 deletions t/Movie.t
Expand Up @@ -27,5 +27,7 @@ ddg_spice_test(
),
);

alt_to_test('DDG::Spice::Movie', ['movie_image']);

done_testing;

2 changes: 2 additions & 0 deletions t/Pokemon.t
Expand Up @@ -29,5 +29,7 @@ ddg_spice_test(
'how to catch every pokemon', => undef
);

alt_to_test('DDG::Spice::Pokemon::Data', ['description']);

done_testing;

2 changes: 2 additions & 0 deletions t/SoundCloud.t
Expand Up @@ -24,4 +24,6 @@ ddg_spice_test(
),
);

alt_to_test('DDG::Spice::SoundCloud', ['sound_cloud_result']);

done_testing;
2 changes: 2 additions & 0 deletions t/Xkcd.t
Expand Up @@ -37,6 +37,8 @@ ddg_spice_test(
),
);

alt_to_test('DDG::Spice::Xkcd::Display', ['latest']);

# This function call is expected by Test::More. It makes sure the program
# doesn't exit before all the tests have been run.
done_testing;

0 comments on commit a850166

Please sign in to comment.