bikeshare 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/bikeshare.rb +3 -3
- metadata +72 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTg3ZDk3NDU1ZTZhMzQ2MjI5NDQzYmFjYzNhNmU1YTc1MDI0NTI1NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2RjMGU3NWJhODUyN2MxZTg3MDViNGY5YmUwZDZhZjM1ZTIzNzUwNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTkxM2Q0ZjI4M2E5ODU2ODUwOGQ2NmM2MmE3MzBkOWE1YTY1ZTk4ZjVkZDVm
|
10
|
+
Yzk0NmQ0ODQ4MjAwMzE0YmY1NGY5MTc0ZjMxZjhlOTE1M2VhZTY0YWZmNzE5
|
11
|
+
NzU5MzZlNzY2MDAzNTk4NmE4YTc2ZTRhYWI3ZDA1OGM0MWM3Mzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmFhMTcwNzJjNDMyYzcxMDkxN2I4YmI4MTY5NThhMzc4OTk0ODYzNjFlY2Q5
|
14
|
+
MTFmNDkxNmMwNWI4OWJkYzVkYjQwNTljN2Q4OTdlOWVmNDgzM2I4MzMzOThl
|
15
|
+
ZTU2NjdiMjBkZTExNWE5OTU1MTAxMGRkZjc5ODJhNDBlZmNlODc=
|
data/lib/bikeshare.rb
CHANGED
@@ -3,14 +3,14 @@ class BikeShare
|
|
3
3
|
FIRST_STATION_ID = 2
|
4
4
|
BAY_AREA_BIKE_JSON_URL = "http://bayareabikeshare.com/stations/json"
|
5
5
|
|
6
|
-
def initialize
|
6
|
+
def initialize(url = nil)
|
7
7
|
response_url = url || BAY_AREA_BIKE_JSON_URL
|
8
8
|
|
9
9
|
response = JSON.parse(open(response_url).read)
|
10
10
|
@response = response["stationBeanList"]
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def last_station_id
|
14
14
|
@response.last["id"]
|
15
15
|
end
|
16
16
|
|
@@ -99,7 +99,7 @@ private
|
|
99
99
|
|
100
100
|
def check_valid_station_id!(station_id)
|
101
101
|
first = FIRST_STATION_ID
|
102
|
-
last =
|
102
|
+
last = last_station_id
|
103
103
|
|
104
104
|
raise "Please enter a station id in between #{first} and #{last}" unless station_id.between?(first, last)
|
105
105
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bikeshare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zack Shapiro
|
@@ -9,7 +9,77 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2013-10-12 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: fakeweb
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: debugger
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
13
83
|
description: A Ruby wrapper for Bay Area Bike Share bike and station information.
|
14
84
|
email: zack@zackshapiro.com
|
15
85
|
executables: []
|