easy_transilien 0.0.9 → 1.0.0

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: 3fdb370e7c4175ccbd4d0807c579c3f616693eca
4
- data.tar.gz: 1f3109fc5f898da173ed656498870b43b0042424
3
+ metadata.gz: a8b47b17351287300d009b406f9288b901a45eba
4
+ data.tar.gz: e2411d303d225e9d230226e8549eaf16a0326b5e
5
5
  SHA512:
6
- metadata.gz: 894e6a5422361f4e81c1112eb7e3e17845003254d4bf56813d3f1302ec5c2036f00fed70b94bcb4b1d8335aa37660e850a2f8db5abf007faab1d4605a28bb557
7
- data.tar.gz: 4c290a7de900b91823e3003b01246692e62c7c8be800c5d00d5b699c8f8774708110a4ed47c546fddd372e0e7a73c12367178de19d9d940f995a8a631541bbb3
6
+ metadata.gz: 82cd4f531776644100cd7beb24d8c1b192327dd983c513093accf3d5afea726003aeda1a6518e7bae5c405ba7e42f144de960f2433f774aaedb7c009bf2b3257
7
+ data.tar.gz: 70f9a6901f5cd59b07d28757b8cac90e03b4a1f81f559f4655b3e05ee7ffcb922c079c32341744cc2aaebb949ee0bb90e46853e3c40c75ace466c0d57a047881
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.3"
4
+ - "2.0.0"
5
+ - "2.1.3"
6
+
7
+ # uncomment this line if your project needs to run something other than `rake`:
8
+ script: bundle exec rspec spec
@@ -1,3 +1,6 @@
1
+ 1.0.0
2
+ * Upgrade gem to use transilien_microservice 1.0.0. Now we're on semver, will be easier for fixes.
3
+
1
4
  0.0.9
2
5
  * For some unknown reason, specs failed on 2.0.0-p247 w/o module explicit prefix
3
6
 
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gemspec
5
5
 
6
6
  # Dev only
7
7
  group :test do
8
+ gem 'rake'
8
9
  gem 'rspec'
9
10
  gem 'guard-rspec'
10
11
  gem 'pry'
data/Gemfile.lock CHANGED
@@ -1,64 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- easy_transilien (0.0.8)
5
- transilien_microservices (~> 0.0.7)
4
+ easy_transilien (1.0.0)
5
+ transilien_microservices (~> 1.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- celluloid (0.15.2)
11
- timers (~> 1.1.0)
10
+ celluloid (0.16.0)
11
+ timers (~> 4.0.0)
12
12
  coderay (1.1.0)
13
13
  diff-lcs (1.2.5)
14
- faraday (0.9.0)
14
+ faraday (0.9.2)
15
15
  multipart-post (>= 1.2, < 3)
16
- ffi (1.9.3)
17
- formatador (0.2.4)
18
- guard (2.2.5)
16
+ ffi (1.9.6)
17
+ formatador (0.2.5)
18
+ guard (2.6.1)
19
19
  formatador (>= 0.2.4)
20
- listen (~> 2.1)
20
+ listen (~> 2.7)
21
21
  lumberjack (~> 1.0)
22
22
  pry (>= 0.9.12)
23
23
  thor (>= 0.18.1)
24
- guard-rspec (4.2.3)
24
+ guard-rspec (4.3.1)
25
25
  guard (~> 2.1)
26
26
  rspec (>= 2.14, < 4.0)
27
- listen (2.4.0)
27
+ hitimes (1.2.2)
28
+ listen (2.7.11)
28
29
  celluloid (>= 0.15.2)
29
30
  rb-fsevent (>= 0.9.3)
30
31
  rb-inotify (>= 0.9)
31
- lumberjack (1.0.4)
32
+ lumberjack (1.0.9)
32
33
  method_source (0.8.2)
33
- mini_portile (0.5.3)
34
+ mini_portile2 (2.0.0)
34
35
  multipart-post (2.0.0)
35
- nokogiri (1.6.1)
36
- mini_portile (~> 0.5.0)
37
- pry (0.9.12.4)
38
- coderay (~> 1.0)
39
- method_source (~> 0.8)
36
+ nokogiri (1.6.7.1)
37
+ mini_portile2 (~> 2.0.0.rc2)
38
+ pry (0.10.1)
39
+ coderay (~> 1.1.0)
40
+ method_source (~> 0.8.1)
40
41
  slop (~> 3.4)
41
- pry-doc (0.5.1)
42
- pry (>= 0.9)
43
- yard (>= 0.8)
42
+ pry-doc (0.6.0)
43
+ pry (~> 0.9)
44
+ yard (~> 0.8)
45
+ rake (10.3.2)
44
46
  rb-fsevent (0.9.4)
45
- rb-inotify (0.9.3)
47
+ rb-inotify (0.9.5)
46
48
  ffi (>= 0.5.0)
47
- rspec (2.14.1)
48
- rspec-core (~> 2.14.0)
49
- rspec-expectations (~> 2.14.0)
50
- rspec-mocks (~> 2.14.0)
51
- rspec-core (2.14.7)
52
- rspec-expectations (2.14.4)
53
- diff-lcs (>= 1.1.3, < 2.0)
54
- rspec-mocks (2.14.4)
55
- slop (3.4.7)
56
- thor (0.18.1)
57
- timers (1.1.0)
58
- transilien_microservices (0.0.7)
49
+ rspec (3.1.0)
50
+ rspec-core (~> 3.1.0)
51
+ rspec-expectations (~> 3.1.0)
52
+ rspec-mocks (~> 3.1.0)
53
+ rspec-core (3.1.7)
54
+ rspec-support (~> 3.1.0)
55
+ rspec-expectations (3.1.2)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.1.0)
58
+ rspec-mocks (3.1.3)
59
+ rspec-support (~> 3.1.0)
60
+ rspec-support (3.1.2)
61
+ slop (3.6.0)
62
+ thor (0.19.1)
63
+ timers (4.0.1)
64
+ hitimes
65
+ transilien_microservices (1.0.0)
59
66
  faraday (>= 0.8.4)
60
- nokogiri (>= 1.5.5)
61
- yard (0.8.7.3)
67
+ nokogiri (>= 1.6)
68
+ yard (0.8.7.4)
62
69
 
63
70
  PLATFORMS
64
71
  ruby
@@ -68,4 +75,5 @@ DEPENDENCIES
68
75
  guard-rspec
69
76
  pry
70
77
  pry-doc
78
+ rake
71
79
  rspec
data/README.md CHANGED
@@ -4,9 +4,12 @@ Ruby wrapper for transilien_microservices ruby gem: make data easy to fetch.
4
4
 
5
5
  The original gem: http://rubygems.org/gems/transilien_microservices
6
6
 
7
+ [![Build Status](https://travis-ci.org/ook/easy_transilien.svg?branch=master)](https://travis-ci.org/ook/easy_transilien)
8
+
7
9
  ## Installation
8
10
 
9
- Gem developped with ruby 2.0.0, should work with ruby 1.9.3
11
+ Gem developped and maintened against rubies from 1.9 to 2.1.
12
+ Remember: ruby 1.8 died in mid-2013, not necessary to lost time on it.
10
13
 
11
14
  Add this line to your application's Gemfile:
12
15
 
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "https://github.com/ook/easy_transilien"
14
14
  gem.license = 'MIT'
15
15
 
16
- gem.add_runtime_dependency('transilien_microservices', '~> 0.0.7') # Hey, it's a wrapper, so we must wrap it ;)
16
+ gem.add_runtime_dependency('transilien_microservices', '~> 1.0') # Hey, it's a wrapper, so we must wrap it ;)
17
17
 
18
18
  gem.files = `git ls-files`.split($/)
19
19
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,3 +1,3 @@
1
1
  module EasyTransilien
2
- VERSION = "0.0.9"
2
+ VERSION = "1.0.0"
3
3
  end
data/spec/line_spec.rb CHANGED
@@ -5,12 +5,12 @@ describe EasyTransilien::Line do
5
5
  @line = EasyTransilien::Line.find('laz').first
6
6
  end
7
7
 
8
- it 'should get some Line when searching for laz' do
9
- @line.is_a?(EasyTransilien::Line).should be_true
8
+ it 'expect get some Line when searching for laz' do
9
+ expect(@line.is_a?(EasyTransilien::Line)).to be_truthy
10
10
  end
11
11
 
12
- it 'should have at least one codes' do
13
- @line.codes.is_a?(Array).should be_true
14
- @line.codes.empty?.should be_false
12
+ it 'expect have at least one codes' do
13
+ expect(@line.codes.is_a?(Array)).to be_truthy
14
+ expect(@line.codes.empty?).to be_falsey
15
15
  end
16
16
  end
data/spec/station_spec.rb CHANGED
@@ -1,30 +1,30 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe EasyTransilien::Station do
4
- it 'should get some Station when searching for argenteuil' do
4
+ it 'expect get some Station when searching for argenteuil' do
5
5
  col = EasyTransilien::Station.find('argenteuil')
6
- col.is_a?(Array).should be_true
7
- col.first.is_a?(EasyTransilien::Station).should be_true
8
- col.length.should eql(2)
6
+ expect(col.is_a?(Array)).to be_truthy
7
+ expect(col.first.is_a?(EasyTransilien::Station)).to be_truthy
8
+ expect(col.length).to eql(2)
9
9
  end
10
- it 'should get all Station for empty search' do
10
+ it 'expect get all Station for empty search' do
11
11
  col = EasyTransilien::Station.find
12
- col.is_a?(Array).should be_true
13
- (col.length > 0).should be_true
12
+ expect(col.is_a?(Array)).to be_truthy
13
+ expect(col.length > 0).to be_truthy
14
14
  end
15
15
 
16
- it 'should get at least a Line for a Station' do
16
+ it 'expect get at least a Line for a Station' do
17
17
  station = EasyTransilien::Station.find('Val d\'Argenteuil').first
18
- station.lines.is_a?(Array).should be_true
19
- (station.lines.length > 0).should be_true
20
- station.lines[0].is_a?(EasyTransilien::Line).should be_true
18
+ expect(station.lines.is_a?(Array)).to be_truthy
19
+ expect(station.lines.length > 0).to be_truthy
20
+ expect(station.lines[0].is_a?(EasyTransilien::Line)).to be_truthy
21
21
  end
22
22
 
23
- it 'should get at least one line_letters for a Station' do
23
+ it 'expect get at least one line_letters for a Station' do
24
24
  station = EasyTransilien::Station.find('Val d\'Argenteuil').first
25
- station.codes.is_a?(Array).should be_true
26
- (station.codes.length > 0).should be_true
27
- station.codes[0].is_a?(String).should be_true
28
- station.codes[0].should eql('J')
25
+ expect(station.codes.is_a?(Array)).to be_truthy
26
+ expect(station.codes.length > 0).to be_truthy
27
+ expect(station.codes[0].is_a?(String)).to be_truthy
28
+ expect(station.codes[0]).to eql('J')
29
29
  end
30
30
  end
data/spec/stop_spec.rb CHANGED
@@ -5,14 +5,14 @@ MS_STOP_PAYLOAD = "<Stop StopIdx=\"3856503\" StopPointIdx=\"37162\" VehicleJourn
5
5
  Noko_Payload = Nokogiri.XML(MS_STOP_PAYLOAD)
6
6
 
7
7
  describe EasyTransilien::Stop do
8
- it 'should get valid #time from ms_stop' do
8
+ it 'expect get valid #time from ms_stop' do
9
9
  time = Time.new
10
10
  ms_stop = Transilien::Stop.from_node(Noko_Payload, time)
11
11
 
12
12
  es = EasyTransilien::Stop.new
13
13
  es.ms_stop = ms_stop
14
- es.is_a?(EasyTransilien::Stop).should be_true
15
- es.time.is_a?(Time).should be_true
16
- es.time.should eql(Time.local(time.year,time.month,time.day,14,40))
14
+ expect(es.is_a?(EasyTransilien::Stop)).to be_truthy
15
+ expect(es.time.is_a?(Time)).to be_truthy
16
+ expect(es.time).to eql(Time.local(time.year,time.month,time.day,14,40))
17
17
  end
18
18
  end
data/spec/trip_spec.rb CHANGED
@@ -4,45 +4,45 @@ describe EasyTransilien::Trip do
4
4
  before(:each) do
5
5
  end
6
6
 
7
- it 'should get some Trip s from a simple search' do
7
+ it 'expect get some Trip s from a simple search' do
8
8
  trips = EasyTransilien::Trip.find('val d\'argenteuil', 'paris saint-lazare')
9
- trips.first.is_a?(EasyTransilien::Trip).should be_true
9
+ expect(trips.first.is_a?(EasyTransilien::Trip)).to be_truthy
10
10
  end
11
11
 
12
- it 'should accepts options[:at] and handle last at default_duration' do
12
+ it 'expect accepts options[:at] and handle last at default_duration' do
13
13
  at = Time.now
14
14
  trips = EasyTransilien::Trip.find('val d\'argenteuil', 'paris saint-lazare', {at: at})
15
- trips.first.at.should eql(at)
16
- trips.first.last.should eql(at + 3600)
15
+ expect(trips.first.at).to eql(at)
16
+ expect(trips.first.last).to eql(at + 3600)
17
17
  end
18
18
 
19
- it 'should accepts options[:at] AND options[:last] at the same time' do
19
+ it 'expect accepts options[:at] AND options[:last] at the same time' do
20
20
  at = Time.now
21
21
  last = Time.now + 3600 * 2 + 42 # arbitrary…
22
22
  trips = EasyTransilien::Trip.find('val d\'argenteuil', 'paris saint-lazare', {at: at, last: last})
23
- trips.first.at.should eql(at)
24
- trips.first.last.should eql(last)
23
+ expect(trips.first.at).to eql(at)
24
+ expect(trips.first.last).to eql(last)
25
25
  end
26
26
 
27
- it 'should auto sort when at is after last' do
27
+ it 'expect auto sort when at is after last' do
28
28
  last = Time.now
29
29
  at = Time.now + 3600 * 2 + 42 # arbitrary…
30
30
  trips = EasyTransilien::Trip.find('val d\'argenteuil', 'paris saint-lazare', {at: at, last: last})
31
- trips.first.at.should eql(last)
32
- trips.first.last.should eql(at)
31
+ expect(trips.first.at).to eql(last)
32
+ expect(trips.first.last).to eql(at)
33
33
  end
34
34
 
35
- it 'should autoset at and last for options[:whole_day]' do
35
+ it 'expect autoset at and last for options[:whole_day]' do
36
36
  hoy = Time.new
37
37
  trips = EasyTransilien::Trip.find('val d\'argenteuil', 'paris saint-lazare', {whole_day: true})
38
- trips.first.at.should eql(Time.new(hoy.year, hoy.month, hoy.day, 0, 0, 1))
38
+ expect(trips.first.at).to eql(Time.new(hoy.year, hoy.month, hoy.day, 0, 0, 1))
39
39
  end
40
40
 
41
- it 'should ignore options :at and :last when :whole_day is set' do
41
+ it 'expect ignore options :at and :last when :whole_day is set' do
42
42
  hoy = Time.new
43
43
  at = Time.now
44
44
  last = Time.now + 3600 * 2 + 42 # arbitrary…
45
45
  trips = EasyTransilien::Trip.find('val d\'argenteuil', 'paris saint-lazare', {whole_day: true, at: at, last: last})
46
- trips.first.at.should eql(Time.new(hoy.year, hoy.month, hoy.day, 0, 0, 1))
46
+ expect(trips.first.at).to eql(Time.new(hoy.year, hoy.month, hoy.day, 0, 0, 1))
47
47
  end
48
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_transilien
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Lecavelier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-19 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: transilien_microservices
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.7
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.7
26
+ version: '1.0'
27
27
  description: 'Access SNCF Transilien micro-services datan the easy way: enable access
28
28
  to their theoric offer.'
29
29
  email:
@@ -35,7 +35,8 @@ files:
35
35
  - .gitignore
36
36
  - .rspec
37
37
  - .ruby-version
38
- - CHANGELOG
38
+ - .travis.yml
39
+ - Changelog.md
39
40
  - Gemfile
40
41
  - Gemfile.lock
41
42
  - Guardfile
@@ -75,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
76
  version: '0'
76
77
  requirements: []
77
78
  rubyforge_project:
78
- rubygems_version: 2.0.3
79
+ rubygems_version: 2.4.8
79
80
  signing_key:
80
81
  specification_version: 4
81
82
  summary: See https://github.com/ook/easy_transilien