Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator schema shortName #523

Merged
merged 3 commits into from
Mar 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/json_schemas/operator.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"format": "operator-onestop-id"
},
"name": { "type": "string" },
"short_name": { "type": "string" },
"shortName": { "type": "string" },
"country": { "type": "string" },
"state": { "type": "string" },
"metro": { "type": "string" },
Expand Down
8 changes: 5 additions & 3 deletions app/workers/feed_eater_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def perform(feed_onestop_id, feed_version_sha1=nil, import_level=0)
Sidekiq::Testing.inline!
ActiveRecord::Base.logger = Logger.new(STDOUT)
feed_onestop_id = ARGV[0] || 'f-9q9-caltrain'
import_level = (ARGV[1].presence || 1).to_i
FeedFetcherWorker.new.perform(feed_onestop_id)
FeedEaterWorker.perform_async(feed_onestop_id, nil, import_level)
path = ARGV[1] || File.open(Rails.root.join('spec/support/example_gtfs_archives/f-9q9-caltrain.zip'))
import_level = (ARGV[2].presence || 1).to_i
feed = Feed.find_by_onestop_id!(feed_onestop_id)
feed_version = feed.feed_versions.create!(file: File.open(path))
FeedEaterWorker.perform_async(feed.onestop_id, feed_version.sha1, import_level)
end
2 changes: 1 addition & 1 deletion db/sample-changesets/actransit.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-9q9-actransit",
"name": "Alameda-Contra Costa Transit District",
"short_name": "AC Transit",
"shortName": "AC Transit",
"identifiedBy": ["usntd://9014"],
"country": "United States",
"state": "California",
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/bart.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-9q9-bart",
"name": "Bay Area Rapid Transit",
"short_name": "BART",
"shortName": "BART",
"identifiedBy": [
"usntd://9003"
],
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/nycdotsiferry.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-dr5r7-nycdot",
"name": "New York City Department of Transportation",
"short_name": "NYC DOT",
"shortName": "NYC DOT",
"identifiedBy": ["usntd://2082"],
"country": "United States",
"state": "New York",
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/nyct.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-dr5r-nyct",
"name": "MTA New York City Transit",
"short_name": "NYCT",
"shortName": "NYCT",
"identifiedBy": ["usntd://2008"],
"country": "United States",
"state": "New York",
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/path.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-dr5r-path",
"name": "Port Authority Trans-Hudson",
"short_name": "PATH",
"shortName": "PATH",
"identifiedBy": ["usntd://2075"],
"country": "United States",
"state": "New York",
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/samtrans.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-9q8-samtrans",
"name": "San Mateo County Transit District",
"short_name": "Samtrans",
"shortName": "Samtrans",
"identifiedBy": ["usntd://9009"],
"country": "United States",
"state": "California",
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/sfmta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-9q8y-sfmta",
"name": "San Francisco Municipal Transportation Agency",
"short_name": "SFMTA",
"shortName": "SFMTA",
"identifiedBy": ["usntd://9015"],
"country": "United States",
"state": "California",
Expand Down
2 changes: 1 addition & 1 deletion db/sample-changesets/vta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"operator": {
"onestopId": "o-9q9-vta",
"name": "Santa Clara Valley Transportation Authority",
"short_name": "VTA",
"shortName": "VTA",
"identifiedBy": ["usntd://9013"],
"country": "United States",
"state": "California",
Expand Down