station_master 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/README.md +87 -0
- data/Rakefile +1 -0
- data/lib/station_master/ask/station.rb +72 -0
- data/lib/station_master/ask.rb +4 -0
- data/lib/station_master/version.rb +3 -0
- data/lib/station_master.rb +12 -0
- data/spec/spec_helper.rb +81 -0
- data/spec/station_master_spec.rb +88 -0
- data/station_master.gemspec +30 -0
- metadata +174 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e312a2799b864999ba67bb915b2c92a1163881e6
|
4
|
+
data.tar.gz: 6b6694a902539bfaf90fd7177afffb74525fb36a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eb5fd618b872e81ee0469ee5694ceec8b31477318315c7ec169262eeb24ebe57fb893dd08b61a612c08b0821816369908696b501cf955d85944414852e14e33f
|
7
|
+
data.tar.gz: 5807a83d567bddfeee73eb5d24ebf5abcdb0024e8c58a7f18a8f62c23354cc0231d9b1bfacbc40df486f84f8fd492ee8097a614c9d9dc11e949eef8e41dee2f1
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.4
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# StationMaster
|
2
|
+
|
3
|
+
This gem provide an interface to an api from www.viaggiatreno.it public site.
|
4
|
+
This project exploits the api that the site uses to build up the front-end side,
|
5
|
+
to retrieve real-time information on italian rail system and to provide an more
|
6
|
+
convinient interface to that information.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'station_master'
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle install
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install station_master
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
require 'station_master'
|
25
|
+
|
26
|
+
To get a list of all stations available:
|
27
|
+
|
28
|
+
|
29
|
+
StationMaster::Ask::Station.all
|
30
|
+
|
31
|
+
|
32
|
+
It returns the list of all stations with geo-coordinates information (may
|
33
|
+
require minutes!).
|
34
|
+
|
35
|
+
To find a specific station based on city name:
|
36
|
+
|
37
|
+
StationMaster::Ask::Station.find_by_city('Torino')
|
38
|
+
|
39
|
+
It returns a list of possible stations that match the parameter string.
|
40
|
+
|
41
|
+
## Changelog
|
42
|
+
|
43
|
+
### 0.0.3
|
44
|
+
|
45
|
+
- Retrieve station codes by providing city name.
|
46
|
+
|
47
|
+
### 0.0.2
|
48
|
+
|
49
|
+
- Setup test environment.
|
50
|
+
- Mocking api in test environment.
|
51
|
+
|
52
|
+
### 0.0.1
|
53
|
+
|
54
|
+
- Retrieve the list of all stations.
|
55
|
+
- gem bundlerized.
|
56
|
+
|
57
|
+
## Contributing
|
58
|
+
|
59
|
+
1. Fork it ( http://github.com/<my-github-username>/station_master/fork )
|
60
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
61
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
62
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
63
|
+
5. Create new Pull Request
|
64
|
+
|
65
|
+
## License
|
66
|
+
|
67
|
+
The MIT License (MIT)
|
68
|
+
|
69
|
+
Copyright (c) 2014 Stefano Ordine
|
70
|
+
|
71
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
72
|
+
of this software and associated documentation files (the "Software"), to deal
|
73
|
+
in the Software without restriction, including without limitation the rights
|
74
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
75
|
+
copies of the Software, and to permit persons to whom the Software is
|
76
|
+
furnished to do so, subject to the following conditions:
|
77
|
+
|
78
|
+
The above copyright notice and this permission notice shall be included in
|
79
|
+
all copies or substantial portions of the Software.
|
80
|
+
|
81
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
82
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
83
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
84
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
85
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
86
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
87
|
+
THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module StationMaster
|
2
|
+
module Ask
|
3
|
+
class Station
|
4
|
+
class << self
|
5
|
+
def all
|
6
|
+
stations_array = []
|
7
|
+
index = 0
|
8
|
+
begin
|
9
|
+
response = MultiJson::load(remote_call(:stations, page: index), symbolize_keys: true).inject([]) do |array, station|
|
10
|
+
station_code = station[:codiceStazione]
|
11
|
+
latitude = station[:lat]
|
12
|
+
longitude = station[:lon]
|
13
|
+
region_id = find_region_id_by_code(station[:codiceStazione])
|
14
|
+
station_details = find_details(station_code, region_id)
|
15
|
+
location = (station_details[:localita][:nomeLungo] || '').split.map(&:capitalize).join(' ') if station_details
|
16
|
+
|
17
|
+
array << {
|
18
|
+
station_code: station_code,
|
19
|
+
latitude: latitude,
|
20
|
+
longitude: longitude,
|
21
|
+
region_id: region_id,
|
22
|
+
location: location
|
23
|
+
}
|
24
|
+
end
|
25
|
+
stations_array += response
|
26
|
+
index += 1
|
27
|
+
end while response.any?
|
28
|
+
|
29
|
+
stations_array
|
30
|
+
end
|
31
|
+
|
32
|
+
def find_by_city(city)
|
33
|
+
remote_call(:search, { city: city }).split(/\n/).map(&:strip).inject({}) { |hash, entry| hash.merge!({ entry.split('|').first.to_sym => entry.split('|').last }) }
|
34
|
+
end
|
35
|
+
|
36
|
+
def find_region_id_by_code(station_code)
|
37
|
+
remote_call(:region_id, station_code: station_code)
|
38
|
+
end
|
39
|
+
|
40
|
+
def find_details(station_code, region_id)
|
41
|
+
MultiJson::load(remote_call(:station_details, station_code: station_code, region_id: region_id), symbolize_keys: true)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
def remote_call(resource, options = {})
|
46
|
+
request_url = case resource
|
47
|
+
when :stations then
|
48
|
+
STATION_MASTER_BASE_URL + "elencoStazioni/#{options[:page] || 0}"
|
49
|
+
when :region_id then
|
50
|
+
STATION_MASTER_BASE_URL + "regione/#{options[:station_code] || 0}"
|
51
|
+
when :station_details
|
52
|
+
STATION_MASTER_BASE_URL + "dettaglioStazione/#{options[:station_code] || 0}/#{options[:region_id] || 0}"
|
53
|
+
when :search
|
54
|
+
STATION_MASTER_BASE_URL + "autocompletaStazione/#{options[:city] || ''}"
|
55
|
+
else
|
56
|
+
''
|
57
|
+
end
|
58
|
+
|
59
|
+
remote_call!(request_url)
|
60
|
+
end
|
61
|
+
|
62
|
+
def remote_call!(request_url)
|
63
|
+
url = URI.parse(request_url)
|
64
|
+
http = Net::HTTP.new(url.host, url.port)
|
65
|
+
http.read_timeout = 2
|
66
|
+
|
67
|
+
http.get(url).body
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'active_support/core_ext'
|
2
|
+
require 'multi_json'
|
3
|
+
require 'net/http'
|
4
|
+
|
5
|
+
require 'station_master/version'
|
6
|
+
require 'station_master/ask'
|
7
|
+
require 'station_master/ask/station'
|
8
|
+
|
9
|
+
|
10
|
+
module StationMaster
|
11
|
+
STATION_MASTER_BASE_URL = 'http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/'
|
12
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
Bundler.setup
|
3
|
+
|
4
|
+
require 'station_master'
|
5
|
+
|
6
|
+
require 'pry'
|
7
|
+
require 'webmock/rspec'
|
8
|
+
include WebMock::API
|
9
|
+
require 'benchmark'
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
config.before(:each) do
|
13
|
+
stub_request(:get, 'http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/elencoStazioni/0').
|
14
|
+
to_return(status: 200, body: <<-JSON.squish, headers: {})
|
15
|
+
[{"codReg":15,"tipoStazione":3,"dettZoomStaz":[],"pstaz":[],"mappaCitta":{"urlImagePinpoint":"","urlImageBaloon":""},"codiceStazione":"S11212","codStazione":"S11212","lat":40.787682,"lon":15.758093,"latMappaCitta":0.0,"lonMappaCitta":0.0,"localita":{"nomeLungo":"CASTEL LAGOPESOLE","nomeBreve":"Castel Lagopes.","label":"","id":"S11212"},"esterno":false,"offsetX":0,"offsetY":0,"nomeCitta":"A"},{"codReg":15,"tipoStazione":3,"dettZoomStaz":[],"pstaz":[],"mappaCitta":{"urlImagePinpoint":"","urlImageBaloon":""},"codiceStazione":"S11214","codStazione":"S11214","lat":40.714667,"lon":15.785619,"latMappaCitta":0.0,"lonMappaCitta":0.0,"localita":{"nomeLungo":"AVIGLIANO LUCANIA","nomeBreve":"Avigliano Luc.","label":"","id":"S11214"},"esterno":false,"offsetX":0,"offsetY":0,"nomeCitta":"A"}]
|
16
|
+
JSON
|
17
|
+
|
18
|
+
stub_request(:get, 'http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/elencoStazioni/1').
|
19
|
+
to_return(status: 200, body: <<-JSON.squish, headers: {})
|
20
|
+
[{"codReg":15,"tipoStazione":3,"dettZoomStaz":[],"pstaz":[],"mappaCitta":{"urlImagePinpoint":"","urlImageBaloon":""},"codiceStazione":"S11219","codStazione":"S11219","lat":41.062304,"lon":15.595094,"latMappaCitta":0.0,"lonMappaCitta":0.0,"localita":{"nomeLungo":"LEONESSA","nomeBreve":"Leonessa","label":"","id":"S11219"},"esterno":false,"offsetX":0,"offsetY":0,"nomeCitta":"A"}]
|
21
|
+
JSON
|
22
|
+
|
23
|
+
stub_request(:get, 'http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/elencoStazioni/2').
|
24
|
+
to_return(status: 200, body: '[]', headers: {})
|
25
|
+
|
26
|
+
['S11212', 'S11214', 'S11219'].each do |station_id|
|
27
|
+
region_id = 15
|
28
|
+
|
29
|
+
stub_request(:get, "http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/regione/#{station_id}").
|
30
|
+
to_return(status: 200, body: "#{region_id}", headers: {})
|
31
|
+
|
32
|
+
body = case station_id
|
33
|
+
when 'S11212' then '{"codReg":15,"tipoStazione":3,"dettZoomStaz":[],"pstaz":[],"mappaCitta":{"urlImagePinpoint":"","urlImageBaloon":""},"codiceStazione":"S11212","codStazione":"S11212","lat":40.787682,"lon":15.758093,"latMappaCitta":0.0,"lonMappaCitta":0.0,"localita":{"nomeLungo":"CASTEL LAGOPESOLE","nomeBreve":"Castel Lagopes.","label":"","id":"S11212"},"esterno":false,"offsetX":0,"offsetY":0,"nomeCitta":"A"}'
|
34
|
+
when 'S11214' then '{"codReg":15,"tipoStazione":3,"dettZoomStaz":[],"pstaz":[],"mappaCitta":{"urlImagePinpoint":"","urlImageBaloon":""},"codiceStazione":"S11214","codStazione":"S11214","lat":40.714667,"lon":15.785619,"latMappaCitta":0.0,"lonMappaCitta":0.0,"localita":{"nomeLungo":"AVIGLIANO LUCANIA","nomeBreve":"Avigliano Luc.","label":"","id":"S11214"},"esterno":false,"offsetX":0,"offsetY":0,"nomeCitta":"A"}'
|
35
|
+
when 'S11219' then '{"codReg":15,"tipoStazione":3,"dettZoomStaz":[],"pstaz":[],"mappaCitta":{"urlImagePinpoint":"","urlImageBaloon":""},"codiceStazione":"S11219","codStazione":"S11219","lat":41.062304,"lon":15.595094,"latMappaCitta":0.0,"lonMappaCitta":0.0,"localita":{"nomeLungo":"LEONESSA","nomeBreve":"Leonessa","label":"","id":"S11219"},"esterno":false,"offsetX":0,"offsetY":0,"nomeCitta":"A"}'
|
36
|
+
end
|
37
|
+
|
38
|
+
stub_request(:get, "http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/dettaglioStazione/#{station_id}/#{region_id}").
|
39
|
+
to_return(status: 200, body: body, headers: {})
|
40
|
+
end
|
41
|
+
|
42
|
+
stub_request(:get, "http://www.viaggiatreno.it/viaggiatrenonew/resteasy/viaggiatreno/autocompletaStazione/Tor").
|
43
|
+
to_return(status: 200, body: <<-JSON, headers: {})
|
44
|
+
TORINO P.NUOVA|S00219
|
45
|
+
TOR SAPIENZA|S08501
|
46
|
+
TOR VERGATA|S08655
|
47
|
+
TORA PRESENZANO|S09202
|
48
|
+
TORANO LATTARICO|S11906
|
49
|
+
TORCHIARA|S11706
|
50
|
+
TORINO DORA|S00224
|
51
|
+
TORINO LINGOTTO|S00452
|
52
|
+
TORINO PORTA SUSA|S00035
|
53
|
+
TORINO REBAUDENGO FOSSATA|S00060
|
54
|
+
TORINO S. PAOLO|S00223
|
55
|
+
TORINO STURA|S00228
|
56
|
+
TORRALBA|S12865
|
57
|
+
TORRAZZA P.|S00234
|
58
|
+
TORRE ANNUNZIATA CENTRALE|S09806
|
59
|
+
TORRE ANNUNZIATA CITTA'|S09805
|
60
|
+
TORRE DEI PASSERI|S07706
|
61
|
+
TORRE DEL GRECO|S09803
|
62
|
+
TORRE DEL LAGO PUCCINI|S06015
|
63
|
+
TORRE DE` PICENARDI|S01918
|
64
|
+
TORRE IN PIETRA-PALIDORO|S08019
|
65
|
+
TORRE MELISSA|S11821
|
66
|
+
TORRE ORSAIA|S11717
|
67
|
+
TORRE PELLICE|S00524
|
68
|
+
TORRE S.GIORGIO|S00545
|
69
|
+
TORREBERETTI|S00039
|
70
|
+
TORREMEZZO DI FALCONARA|S11971
|
71
|
+
TORRENIERI|S06817
|
72
|
+
TORRICELLA|S07011
|
73
|
+
TORRICOLA|S08600
|
74
|
+
TORRILE S. POLO|S01853
|
75
|
+
TORRITA DI SIENA|S06854
|
76
|
+
TORTONA|S01810
|
77
|
+
TORTORETO LIDO|S07801
|
78
|
+
TORVISCOSA|S03206
|
79
|
+
JSON
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe StationMaster::Ask::Station do
|
4
|
+
let(:station) { StationMaster::Ask::Station }
|
5
|
+
|
6
|
+
context "#all" do
|
7
|
+
let(:all_stations) { StationMaster::Ask::Station.all }
|
8
|
+
|
9
|
+
it "returns all stations" do
|
10
|
+
expect(station).to respond_to(:all)
|
11
|
+
expect(all_stations).to be_a(Array)
|
12
|
+
expect(all_stations).not_to be_empty
|
13
|
+
expect(all_stations.count).to eq(3)
|
14
|
+
expect(all_stations).to eq([
|
15
|
+
{
|
16
|
+
station_code: "S11212",
|
17
|
+
latitude: 40.787682,
|
18
|
+
longitude: 15.758093,
|
19
|
+
region_id: "15",
|
20
|
+
location: "Castel Lagopesole"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
station_code: "S11214",
|
24
|
+
latitude: 40.714667,
|
25
|
+
longitude: 15.785619,
|
26
|
+
region_id: "15",
|
27
|
+
location: "Avigliano Lucania"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
station_code: "S11219",
|
31
|
+
latitude: 41.062304,
|
32
|
+
longitude: 15.595094,
|
33
|
+
region_id: "15",
|
34
|
+
location: "Leonessa"
|
35
|
+
}])
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "#find_by_city" do
|
40
|
+
let(:found_stations) { StationMaster::Ask::Station.find_by_city('Tor') }
|
41
|
+
|
42
|
+
it "returns stations that match with city name" do
|
43
|
+
expect(station).to respond_to(:find_by_city)
|
44
|
+
expect(found_stations).to be_a(Hash)
|
45
|
+
expect(found_stations).not_to be_empty
|
46
|
+
expect(found_stations.values.count).to eq(35)
|
47
|
+
expect(found_stations).to eq(
|
48
|
+
{
|
49
|
+
:"TORINO P.NUOVA" => "S00219",
|
50
|
+
:"TOR SAPIENZA" => "S08501",
|
51
|
+
:"TOR VERGATA" => "S08655",
|
52
|
+
:"TORA PRESENZANO" => "S09202",
|
53
|
+
:"TORANO LATTARICO" => "S11906",
|
54
|
+
:"TORCHIARA" => "S11706",
|
55
|
+
:"TORINO DORA" => "S00224",
|
56
|
+
:"TORINO LINGOTTO" => "S00452",
|
57
|
+
:"TORINO PORTA SUSA" => "S00035",
|
58
|
+
:"TORINO REBAUDENGO FOSSATA" => "S00060",
|
59
|
+
:"TORINO S. PAOLO" => "S00223",
|
60
|
+
:"TORINO STURA" => "S00228",
|
61
|
+
:"TORRALBA" => "S12865",
|
62
|
+
:"TORRAZZA P." => "S00234",
|
63
|
+
:"TORRE ANNUNZIATA CENTRALE" => "S09806",
|
64
|
+
:"TORRE ANNUNZIATA CITTA'" => "S09805",
|
65
|
+
:"TORRE DEI PASSERI" => "S07706",
|
66
|
+
:"TORRE DEL GRECO" => "S09803",
|
67
|
+
:"TORRE DEL LAGO PUCCINI" => "S06015",
|
68
|
+
:"TORRE DE` PICENARDI" => "S01918",
|
69
|
+
:"TORRE IN PIETRA-PALIDORO" => "S08019",
|
70
|
+
:"TORRE MELISSA" => "S11821",
|
71
|
+
:"TORRE ORSAIA" => "S11717",
|
72
|
+
:"TORRE PELLICE" => "S00524",
|
73
|
+
:"TORRE S.GIORGIO" => "S00545",
|
74
|
+
:"TORREBERETTI" => "S00039",
|
75
|
+
:"TORREMEZZO DI FALCONARA" => "S11971",
|
76
|
+
:"TORRENIERI" => "S06817",
|
77
|
+
:"TORRICELLA" => "S07011",
|
78
|
+
:"TORRICOLA" => "S08600",
|
79
|
+
:"TORRILE S. POLO" => "S01853",
|
80
|
+
:"TORRITA DI SIENA" => "S06854",
|
81
|
+
:"TORTONA" => "S01810",
|
82
|
+
:"TORTORETO LIDO" => "S07801",
|
83
|
+
:"TORVISCOSA" => "S03206"
|
84
|
+
}
|
85
|
+
)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'station_master'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "station_master"
|
8
|
+
spec.version = StationMaster::VERSION
|
9
|
+
spec.authors = ["Stefano Ordine"]
|
10
|
+
spec.email = ["stefano.ordine@gmail.com"]
|
11
|
+
spec.summary = "This gem provide an interface to an api from www.viaggiatreno.it public site."
|
12
|
+
spec.description = "This gem provide an interface to an api from www.viaggiatreno.it public site. This project exploits the api that the site uses to build up the front-end side, to retrieve real-time information on italian rail system and to provide an more convinient interface to that information."
|
13
|
+
spec.homepage = "https://github.com/StefanoOrdine/station_master"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "multi_json", "~> 1.10"
|
22
|
+
spec.add_dependency "activesupport", "~> 4.1"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 0"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.3"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.1"
|
27
|
+
spec.add_development_dependency "pry", "~> 0.10"
|
28
|
+
spec.add_development_dependency "pry-nav", "~> 0.2"
|
29
|
+
spec.add_development_dependency "webmock", "~> 1.19"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: station_master
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stefano Ordine
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: multi_json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
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: '10.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.10'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.10'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-nav
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.2'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.2'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: webmock
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.19'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.19'
|
125
|
+
description: This gem provide an interface to an api from www.viaggiatreno.it public
|
126
|
+
site. This project exploits the api that the site uses to build up the front-end
|
127
|
+
side, to retrieve real-time information on italian rail system and to provide an
|
128
|
+
more convinient interface to that information.
|
129
|
+
email:
|
130
|
+
- stefano.ordine@gmail.com
|
131
|
+
executables: []
|
132
|
+
extensions: []
|
133
|
+
extra_rdoc_files: []
|
134
|
+
files:
|
135
|
+
- ".gitignore"
|
136
|
+
- ".rspec"
|
137
|
+
- ".ruby-version"
|
138
|
+
- Gemfile
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
141
|
+
- lib/station_master.rb
|
142
|
+
- lib/station_master/ask.rb
|
143
|
+
- lib/station_master/ask/station.rb
|
144
|
+
- lib/station_master/version.rb
|
145
|
+
- spec/spec_helper.rb
|
146
|
+
- spec/station_master_spec.rb
|
147
|
+
- station_master.gemspec
|
148
|
+
homepage: https://github.com/StefanoOrdine/station_master
|
149
|
+
licenses:
|
150
|
+
- MIT
|
151
|
+
metadata: {}
|
152
|
+
post_install_message:
|
153
|
+
rdoc_options: []
|
154
|
+
require_paths:
|
155
|
+
- lib
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
requirements: []
|
167
|
+
rubyforge_project:
|
168
|
+
rubygems_version: 2.2.2
|
169
|
+
signing_key:
|
170
|
+
specification_version: 4
|
171
|
+
summary: This gem provide an interface to an api from www.viaggiatreno.it public site.
|
172
|
+
test_files:
|
173
|
+
- spec/spec_helper.rb
|
174
|
+
- spec/station_master_spec.rb
|