gtfs-realtime 0.2.0 → 0.2.1

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: 93c88ec86fdf9817120942d1a1d303a3713a96d9
4
- data.tar.gz: 37da22bb5fb75d046689dcd1154f15b062e53f8b
3
+ metadata.gz: d45dda0edeb7b008c75af74843fe4ef014a7baf2
4
+ data.tar.gz: 5226c23ff360cca5e244ccc6acadc98686b1e533
5
5
  SHA512:
6
- metadata.gz: 390cab27e23ef7f3adbf72be6dc1d73fd22008ca324e13b13275d5c976bb4a6ae7c57207faa6928e4ceb43b51c5816a9bd9dee684893bd5d0f6c827c7a928dcc
7
- data.tar.gz: 5620d60d1f92ec842935d7e310e2ca6d9a42f4bba2ddf5e8867b3a254c76badb2333026d5dde52a6f2a4d53c74023f841c0905e289e864167930aa57b0118413
6
+ metadata.gz: fffd4ac53ffee604318ea5e8a6c2375cdc36d99b175729872ebc3e8b6aca14a015e68c3a350d64438a7451d467d8c81b1ed9b4ae32db1209fbf7aed7bd3e03af
7
+ data.tar.gz: f3128ac25af2abbabab4872d97a46d42a1249d8d6d0351d855aefb3acef2e188b13b4bc420c51ce6be312eb3260614c35c5dbe76b33508222c109dbc7bd9acea
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --order rand
@@ -3,3 +3,5 @@ language: ruby
3
3
  rvm:
4
4
  - 2.3.2
5
5
  before_install: gem install bundler -v 1.13.6
6
+ notifications:
7
+ email: false
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # gtfs-realtime
1
+ # gtfs-realtime [![Build Status](https://travis-ci.org/rofreg/gtfs-realtime.svg?branch=master)](https://travis-ci.org/rofreg/gtfs-realtime)
2
2
 
3
3
  gfts-realtime is a gem to interact with realtime transit data presented in the [GTFS Realtime format](https://developers.google.com/transit/gtfs-realtime/). It was built in order to interact with the RIPTA realtime data API for the public bus system in Providence, RI.
4
4
 
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "bundler", "~> 1.13"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
+ spec.add_development_dependency "webmock"
27
28
 
28
29
  spec.add_dependency "gtfs-realtime-bindings"
29
30
  spec.add_dependency "gtfs"
@@ -40,6 +40,7 @@ module GTFS
40
40
  return if !force && GTFS::Realtime::Route.count > 0
41
41
 
42
42
  static_data = GTFS::Source.build(@configuration.static_feed)
43
+ return unless static_data
43
44
 
44
45
  GTFS::Realtime::Model.db.transaction do
45
46
  GTFS::Realtime::Route.dataset.delete
@@ -8,8 +8,8 @@ module GTFS
8
8
  one_to_many :service_alerts
9
9
  one_to_many :stop_times
10
10
  one_to_many :stop_time_updates
11
- many_to_many :trip_updates, join_table: :stop_time_updates
12
- many_to_many :trips, join_table: :stop_times
11
+ many_to_many :trip_updates, join_table: :gtfs_realtime_stop_time_updates
12
+ many_to_many :trips, join_table: :gtfs_realtime_stop_times
13
13
  many_through_many :routes, through: [
14
14
  [:stop_times, :stop_id, :trip_id],
15
15
  [:trips, :id, :route_id]
@@ -1,9 +1,9 @@
1
1
  module GTFS
2
2
  class Realtime
3
3
  class StopTimeUpdate < GTFS::Realtime::Model
4
- one_through_one :route, join_table: :trip_updates, left_key: :id, left_primary_key: :trip_update_id, right_key: :route_id
4
+ one_through_one :route, join_table: :gtfs_realtime_trip_updates, left_key: :id, left_primary_key: :trip_update_id, right_key: :route_id
5
5
  many_to_one :stop
6
- one_through_one :trip, join_table: :trip_updates, left_key: :id, left_primary_key: :trip_update_id, right_key: :trip_id
6
+ one_through_one :trip, join_table: :gtfs_realtime_trip_updates, left_key: :id, left_primary_key: :trip_update_id, right_key: :trip_id
7
7
  many_to_one :trip_update
8
8
  end
9
9
  end
@@ -2,7 +2,7 @@ module GTFS
2
2
  class Realtime
3
3
  class Trip < GTFS::Realtime::Model
4
4
  many_to_one :route
5
- many_to_many :stops, join_table: :stop_times
5
+ many_to_many :stops, join_table: :gtfs_realtime_stop_times
6
6
 
7
7
  # TODO: find shapes by shape_id
8
8
  end
@@ -1,5 +1,5 @@
1
1
  module GTFS
2
2
  class Realtime
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtfs-realtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Laughlin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-24 00:00:00.000000000 Z
11
+ date: 2016-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
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'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: gtfs-realtime-bindings
57
71
  requirement: !ruby/object:Gem::Requirement