floripa-public-transit 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +1 -0
- data/README.md +16 -0
- data/fig.yml +12 -0
- data/floripa-public-transit.gemspec +1 -1
- data/lib/floripa/bus_list_crawler.rb +4 -6
- data/spec/floripa/bus_crawler_spec.rb +1 -1
- data/spec/floripa/bus_line_crawler_spec.rb +2 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2529f14e9eec4c22b4c6d8005d492e4eaee0d51b
|
4
|
+
data.tar.gz: 4410a60409c4736c78131b1c770f56855cc81937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 673aba0f94778a08e1fb54d8a016df5c07aa0fa6959b5f1e2fa2cf7791b069cbb4e00631438f9e2c1b968cfb82fcd7bfcbdec7189ae8520e7613d1ae4ea264bf
|
7
|
+
data.tar.gz: 5b06429717892f9d088e79a288458491387d02449332129a3b9a6f92353a2fd6097da5fe48f99632d3db9786042e824f9b62e6fd6a7b8bc08e33ee6b8143be34
|
data/Dockerfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
FROM ruby:2.1-onbuild
|
data/README.md
CHANGED
@@ -12,6 +12,22 @@ FloripaPublicTransit.fetch_line '177'
|
|
12
12
|
|
13
13
|
Where `177` in the number of the 'Santa Monica' bus line.
|
14
14
|
|
15
|
+
## Development
|
16
|
+
|
17
|
+
You can use [fig.sh](http://fig.sh/) and [Docker](http://docker.io/).
|
18
|
+
|
19
|
+
To run the tests:
|
20
|
+
|
21
|
+
```bash
|
22
|
+
fig run test
|
23
|
+
```
|
24
|
+
|
25
|
+
To build the gem:
|
26
|
+
|
27
|
+
```bash
|
28
|
+
fig run build
|
29
|
+
```
|
30
|
+
|
15
31
|
## Authors
|
16
32
|
|
17
33
|
* [Felipe Munhoz](https://github.com/fnmunhoz)
|
data/fig.yml
ADDED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'floripa-public-transit'
|
3
|
-
s.version = '0.0
|
3
|
+
s.version = '1.0.0'
|
4
4
|
s.date = '2014-04-14'
|
5
5
|
s.summary = 'Fetches public transit information from the Florianopolis city website'
|
6
6
|
s.description = 'Provides a simple API to fetch latest public transit information of the Florianopolis city'
|
@@ -11,14 +11,12 @@ module FloripaPublicTransit
|
|
11
11
|
class BusListCrawler
|
12
12
|
def fetch
|
13
13
|
[
|
14
|
-
*fetch_lines('1'),
|
15
|
-
*fetch_lines('2'),
|
16
|
-
*fetch_lines('3'),
|
17
14
|
*fetch_lines('4'),
|
18
|
-
*fetch_lines('
|
19
|
-
*fetch_lines('
|
15
|
+
*fetch_lines('7'),
|
16
|
+
*fetch_lines('8'),
|
20
17
|
*fetch_lines('9'),
|
21
|
-
*fetch_lines('10')
|
18
|
+
*fetch_lines('10'),
|
19
|
+
*fetch_lines('11'),
|
22
20
|
]
|
23
21
|
end
|
24
22
|
|
@@ -54,7 +54,7 @@ describe "bus_crawler" do
|
|
54
54
|
end
|
55
55
|
|
56
56
|
it "should have the operator" do
|
57
|
-
expect(subject.operator).to eq('
|
57
|
+
expect(subject.operator).to eq('SIM - SISTEMA INTEGRADO DE MOBILIDADE')
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should have the itinerary" do
|
@@ -7,8 +7,9 @@ describe "bus_list_crawler" do
|
|
7
7
|
subject { FloripaPublicTransit::BusListCrawler.new.fetch }
|
8
8
|
|
9
9
|
it "should contain all bus line numbers" do
|
10
|
-
expect(subject.length).to eq
|
10
|
+
expect(subject.length).to eq 261
|
11
11
|
expect(subject).to include('330')
|
12
|
+
expect(subject).to include('177')
|
12
13
|
expect(subject).to include('320')
|
13
14
|
expect(subject).to include('D766')
|
14
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: floripa-public-transit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paulo Ragonha
|
@@ -51,9 +51,11 @@ files:
|
|
51
51
|
- ".bundle/config"
|
52
52
|
- ".gitignore"
|
53
53
|
- ".rspec"
|
54
|
+
- Dockerfile
|
54
55
|
- Gemfile
|
55
56
|
- Gemfile.lock
|
56
57
|
- README.md
|
58
|
+
- fig.yml
|
57
59
|
- floripa-public-transit.gemspec
|
58
60
|
- lib/floripa-public-transit.rb
|
59
61
|
- lib/floripa/bus_crawler.rb
|