forecast_io-cache 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 897ea0cd9885c02e90c353e5c2f58453f7dd57ae
4
- data.tar.gz: b1110de708c9841c124676c2bbc15e272d48dc63
3
+ metadata.gz: 7da4e905f36742294928ee59ed70f3bb00908639
4
+ data.tar.gz: a39ad3df563e020843b0435b88127f0fb3c85480
5
5
  SHA512:
6
- metadata.gz: ac561e43227203f3f338811b88f289d17b84c9fdf79d0f59d275e92aaa1756213d89b94988f26c1aa62407d2327c975050dd8e009664da12302ea0480b410223
7
- data.tar.gz: db53f45306c1ae9307e8527b25c8e95b2523db079f08c9e8e85d727a9b41b41ada35838bb000f5acc20916739483748c2111c3ad1ed3f9d35ae5d12359b1e9bb
6
+ metadata.gz: 841441e387465331cad04fbf3098ec82cb2293d3d5e71ab1786c2e81f4b90c5bbbe3b06d55e2296f25fc88dac28f632cbac49e58aab4906a16b9b5315eedc90d
7
+ data.tar.gz: d1ca69758b7f9220a8530d3fa73a7a379ea891d7223ac48792e572ea5cd830dd8e17fed751a031bb5c40e5abdb6d979f445e674a812b81b0186b54d320c1592b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -4,6 +4,19 @@ Feature: Accessing the api
4
4
 
5
5
  Scenario: Access /
6
6
  When I request '/'
7
+ Then I am given the json response detailing the available actions:
8
+ """
9
+ {
10
+ "actions":
11
+ {
12
+ "forecast": "/forecast/:key/:latitude,:longitude",
13
+ "forecast_at_time": "/forecast/:key/:latitude,:longitude,:time"
14
+ }
15
+ }
16
+ """
17
+
18
+ Scenario: Access an unkown page
19
+ When I request '/un-known'
7
20
  Then I am given the json response detailing the available actions:
8
21
  """
9
22
  {
@@ -12,6 +12,10 @@ module Forecast
12
12
  respond_as_json 200, Forecast.new.for(latitude.to_f, longitude.to_f, (time || Time.now).to_i).to_json
13
13
  end
14
14
 
15
+ get '/' do
16
+ respond_as_json 200, actions: actions
17
+ end
18
+
15
19
  not_found do
16
20
  respond_as_json 404, status: 'Not Found', actions: actions
17
21
  end
@@ -1,7 +1,7 @@
1
1
  module Forecast
2
2
  module IO
3
3
  module Cache
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forecast_io-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Rowe
@@ -29,7 +29,7 @@ cert_chain:
29
29
  2feWfO4gCNmvfFjULOAYHq9JHEjN5SLSXvj5HdSnDcCyIfJKn5Ya3JahWQaWIsXf
30
30
  /NPE/mB57TOwj+d7XUa2NC4HUadF8R51IYEcIB0PpIEzJlKtfXFcOZxO
31
31
  -----END CERTIFICATE-----
32
- date: 2013-05-07 00:00:00.000000000 Z
32
+ date: 2013-05-12 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: forecast_io
metadata.gz.sig CHANGED
Binary file