gtfskit 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e6820a7bf248c80eb2baa6d45714514ed96667e020ea4d45744b0444818cc902
4
+ data.tar.gz: 931c3a17ad1c146f23abc4bd1a7788cd5aaf52f65c819b9224bb7f3d4ab0cec6
5
+ SHA512:
6
+ metadata.gz: 3d5d797efaa110617563b4579a50f65270c16780024cbb78255d36eda58ddc07bc1fd2ef28f9470347155ee4aeacd65353b603b20c92f00936ebcf6b8c0cb997
7
+ data.tar.gz: d060230c859658519ae52c907553a4440365aeba70ecb1873ec70c0dfbbbf8d0c354ac5774d9241d56399f3232995779684eb14105ca5bc61ba8eb4ac5cd8a09
data/.standard.yml ADDED
@@ -0,0 +1,3 @@
1
+ # For available configuration options, see:
2
+ # https://github.com/testdouble/standard
3
+ ruby_version: 2.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.0.1] - 2023-12-24
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at julianfssen@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in gtfskit.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 julianfssen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # gtfskit
2
+
3
+ `gtfskit` is a Ruby library for the General Transit Feed Specification (GTFS). The library is in development and is not stable for production use. However, PRs and issues are welcome. Thank you for using the gem!
4
+
5
+ ## Installation
6
+ Install the gem and add to the application's Gemfile by executing:
7
+
8
+ $ bundle add gtfskit
9
+
10
+ If bundler is not being used to manage dependencies, install the gem by executing:
11
+
12
+ $ gem install gtfskit
13
+
14
+ ## Usage
15
+
16
+ ```ruby
17
+ require "gtfskit"
18
+
19
+ # The `filepath` argument receives a valid dataset filepath
20
+ # See: https://gtfs.org/schedule/reference/#dataset-files
21
+ dataset = Gtfskit::DataParser.parse(filepath: "agency.txt")
22
+ ```
23
+
24
+ ## Development
25
+
26
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
27
+
28
+ To install this gem onto your local machine, run `bundle exec rake install`.
29
+
30
+ ## Contributing
31
+
32
+ Bug reports and pull requests are welcome on GitHub at https://github.com/toadbits/gtfskit.
33
+
34
+ ## License
35
+
36
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ require "standard/rake"
13
+
14
+ task default: %i[test standard]
data/gtfskit.gemspec ADDED
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/gtfskit/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "gtfskit"
7
+ spec.version = Gtfskit::VERSION
8
+ spec.authors = ["julianfssen"]
9
+ spec.email = ["julian@toadbits.com"]
10
+
11
+ spec.summary = "Ruby library and binding for the General Transit Feed Specification (GTFS)"
12
+ spec.description = "Ruby library and binding for the General Transit Feed Specification (GTFS)"
13
+ spec.homepage = "https://github.com/toadbits/gtfskit"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/toadbits/gtfskit"
19
+ spec.metadata["changelog_uri"] = "https://github.com/toadbits/gtfskit/blob/main/CHANGELOG.md"
20
+
21
+ spec.files = Dir.chdir(__dir__) do
22
+ `git ls-files -z`.split("\x0").reject do |f|
23
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
24
+ end
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "debug", "~> 1.9"
31
+ spec.add_development_dependency "minitest", "~> 5.0"
32
+ spec.add_development_dependency "rake", "~> 13.0"
33
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+ require "debug"
3
+
4
+ module Gtfskit
5
+ class DataParser
6
+ VALID_FILENAMES = %w(
7
+ agency stops routes trips stop_times calendar calendar_dates fare_attributes
8
+ fare_rules timeframes fare_media fare_products fare_leg_rules fare_transfer_rules
9
+ areas stop_areas networks route_networks shapes frequencies transfers pathways
10
+ levels translations feed_info attributions
11
+ ).to_set
12
+
13
+ ATTRIBUTE_PREFIX = {
14
+ "agency" => "agency_",
15
+ "calendar" => "",
16
+ "calendar_dates" => "",
17
+ "stops" => "stop_",
18
+ "stop_times" => "",
19
+ "routes" => "route_",
20
+ "trips" => "trip_"
21
+ }
22
+
23
+ class << self
24
+ def parse(filepath:)
25
+ validate_filepath(filepath)
26
+ generate_instances(filepath)
27
+ end
28
+
29
+ private
30
+
31
+ def generate_instances(filepath)
32
+ dataset = infer_dataset(filepath)
33
+
34
+ prefix = ATTRIBUTE_PREFIX[dataset]
35
+ enumerator = File.foreach(filepath)
36
+ fields = enumerator.first.strip.split(",")
37
+
38
+ enumerator.each_with_index.filter_map do |row, i|
39
+ next if i == 0
40
+
41
+ attrs = row.split(",").each_with_object({}).with_index do |(value, hash), col|
42
+ value.strip!
43
+ next if value.empty?
44
+
45
+ field = fields[col].delete_prefix(prefix).to_sym
46
+ hash[field] = value
47
+ end
48
+
49
+ Gtfskit::Dataset::Factory.initialize_from(dataset: dataset, **attrs)
50
+ end
51
+ end
52
+
53
+ def infer_dataset(filepath)
54
+ File.basename(filepath, ".txt")
55
+ end
56
+
57
+ def validate_filepath(filepath)
58
+ if not_text_file?(filepath)
59
+ raise InvalidExtensionError, "Invalid file extension. Only .txt files are permitted", caller
60
+ end
61
+
62
+ if invalid_filename?(filepath)
63
+ raise InvalidDatasetFileError, "The given file is not a valid GTFS dataset file. Valid filenames (with the .txt extension): #{VALID_FILENAMES.join(", ")}", caller
64
+ end
65
+ end
66
+
67
+ def not_text_file?(filepath)
68
+ File.extname(filepath) != ".txt"
69
+ end
70
+
71
+ def invalid_filename?(filepath)
72
+ !VALID_FILENAMES.include?(File.basename(filepath, ".txt"))
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Agency < Base
6
+ required_fields :id, :name, :url, :timezone
7
+ optional_fields :lang, :phone, :fare_url, :email
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Base
6
+ class << self
7
+ def required_fields(*fields)
8
+ @required_fields = fields.to_set
9
+ attr_reader *fields
10
+ end
11
+
12
+ def optional_fields(*fields)
13
+ @optional_fields = fields.to_set
14
+ attr_reader *fields
15
+ end
16
+ end
17
+
18
+ def initialize(**fields)
19
+ _required_fields = required_fields
20
+
21
+ fields.each do |field, value|
22
+ _required_fields.delete(field)
23
+ instance_variable_set("@#{field}", value)
24
+ end
25
+
26
+ if !_required_fields.empty?
27
+ raise MissingRequiredFieldsError, "The required fields: #{_required_fields.join(", ")} were not passed as arguments to initialize", caller
28
+ end
29
+ end
30
+
31
+ def required_fields
32
+ self.class.instance_variable_get("@required_fields").dup
33
+ end
34
+
35
+ def optional_fields
36
+ self.class.instance_variable_get("@optional_fields").dup
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Calendar < Base
6
+ required_fields :service_id, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :start_date, :end_date
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class CalendarDate < Base
6
+ required_fields :service_id, :date, :exception_type
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Factory
6
+ DATASET = {
7
+ :agency => Gtfskit::Dataset::Agency,
8
+ :calendar => Gtfskit::Dataset::Calendar,
9
+ :calendar_date => Gtfskit::Dataset::CalendarDate,
10
+ :calendar_dates => Gtfskit::Dataset::CalendarDate,
11
+ :route => Gtfskit::Dataset::Route,
12
+ :routes => Gtfskit::Dataset::Route,
13
+ :stop => Gtfskit::Dataset::Stop,
14
+ :stops => Gtfskit::Dataset::Stop,
15
+ :stop_time => Gtfskit::Dataset::StopTime,
16
+ :stop_times => Gtfskit::Dataset::StopTime,
17
+ :trip => Gtfskit::Dataset::Trip,
18
+ :trips => Gtfskit::Dataset::Trip
19
+ }
20
+
21
+ class << self
22
+ def initialize_from(dataset:, **fields)
23
+ klass = DATASET[dataset.to_sym]
24
+ raise NameError, "Invalid dataset '#{dataset}' passed to factory.", caller if klass.nil?
25
+ klass.new(**fields)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Route < Base
6
+ required_fields :id
7
+ optional_fields :agency_id, :short_name, :long_name, :desc, :type, :url, :color,
8
+ :text_color, :sort_order, :continuous_pickup, :continuous_drop_off, :network_id
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Stop < Base
6
+ required_fields :id
7
+ optional_fields :code, :name, :tts_stop_name, :desc, :lat, :lon, :zone_id,
8
+ :stop_url, :location_type, :parent_station, :timezone, :wheelchair_boarding,
9
+ :level_id, :platform_code
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class StopTime < Base
6
+ required_fields :trip_id, :stop_id, :stop_sequence
7
+ optional_fields :arrival_time, :departure_time, :stop_headsign, :pickup_type, :drop_off_type,
8
+ :continuous_pickup, :continuous_drop_off, :shape_dist_traveled, :timepoint
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ module Dataset
5
+ class Trip < Base
6
+ required_fields :id, :route_id, :service_id
7
+ optional_fields :headsign, :short_name, :direction_id, :block_id, :shape_id, :wheelchair_accessible, :bikes_allowed
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "gtfskit/dataset/base"
4
+ require "gtfskit/dataset/agency"
5
+ require "gtfskit/dataset/calendar"
6
+ require "gtfskit/dataset/calendar_date"
7
+ require "gtfskit/dataset/route"
8
+ require "gtfskit/dataset/stop"
9
+ require "gtfskit/dataset/stop_time"
10
+ require "gtfskit/dataset/trip"
11
+ require "gtfskit/dataset/factory"
12
+
13
+ module Gtfskit
14
+ module Dataset
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ class Error < StandardError; end
5
+ class InvalidExtensionError < Error; end
6
+ class InvalidDatasetFileError < Error; end
7
+ class MissingRequiredFieldsError < Error; end
8
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gtfskit
4
+ VERSION = "0.0.1"
5
+ end
data/lib/gtfskit.rb ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "gtfskit/data_parser"
4
+ require "gtfskit/dataset"
5
+ require "gtfskit/error"
6
+
7
+ require_relative "gtfskit/version"
8
+
9
+ module Gtfskit
10
+ end
@@ -0,0 +1,2 @@
1
+ agency_id,agency_name,agency_url,agency_timezone
2
+ DTA,Demo Transit Authority,http://google.com,America/Los_Angeles
@@ -0,0 +1,3 @@
1
+ service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date
2
+ FULLW,1,1,1,1,1,1,1,20070101,20101231
3
+ WE,0,0,0,0,0,1,1,20070101,20101231
@@ -0,0 +1,2 @@
1
+ service_id,date,exception_type
2
+ FULLW,20070604,2
@@ -0,0 +1,3 @@
1
+ fare_id,price,currency_type,payment_method,transfers,transfer_duration
2
+ p,1.25,USD,0,0,
3
+ a,5.25,USD,0,0,
@@ -0,0 +1,5 @@
1
+ fare_id,route_id,origin_id,destination_id,contains_id
2
+ p,AB,,,
3
+ p,STBA,,,
4
+ p,BFC,,,
5
+ a,AAMV,,,
@@ -0,0 +1,12 @@
1
+ trip_id,start_time,end_time,headway_secs
2
+ STBA,6:00:00,22:00:00,1800
3
+ CITY1,6:00:00,7:59:59,1800
4
+ CITY2,6:00:00,7:59:59,1800
5
+ CITY1,8:00:00,9:59:59,600
6
+ CITY2,8:00:00,9:59:59,600
7
+ CITY1,10:00:00,15:59:59,1800
8
+ CITY2,10:00:00,15:59:59,1800
9
+ CITY1,16:00:00,18:59:59,600
10
+ CITY2,16:00:00,18:59:59,600
11
+ CITY1,19:00:00,22:00:00,1800
12
+ CITY2,19:00:00,22:00:00,1800
@@ -0,0 +1,6 @@
1
+ route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,route_text_color
2
+ AB,DTA,10,Airport - Bullfrog,,3,,,
3
+ BFC,DTA,20,Bullfrog - Furnace Creek Resort,,3,,,
4
+ STBA,DTA,30,Stagecoach - Airport Shuttle,,3,,,
5
+ CITY,DTA,40,City,,3,,,
6
+ AAMV,DTA,50,Airport - Amargosa Valley,,3,,,
@@ -0,0 +1 @@
1
+ shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled
@@ -0,0 +1,29 @@
1
+ trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_time,shape_dist_traveled
2
+ STBA,6:00:00,6:00:00,STAGECOACH,1,,,,
3
+ STBA,6:20:00,6:20:00,BEATTY_AIRPORT,2,,,,
4
+ CITY1,6:00:00,6:00:00,STAGECOACH,1,,,,
5
+ CITY1,6:05:00,6:07:00,NANAA,2,,,,
6
+ CITY1,6:12:00,6:14:00,NADAV,3,,,,
7
+ CITY1,6:19:00,6:21:00,DADAN,4,,,,
8
+ CITY1,6:26:00,6:28:00,EMSI,5,,,,
9
+ CITY2,6:28:00,6:30:00,EMSI,1,,,,
10
+ CITY2,6:35:00,6:37:00,DADAN,2,,,,
11
+ CITY2,6:42:00,6:44:00,NADAV,3,,,,
12
+ CITY2,6:49:00,6:51:00,NANAA,4,,,,
13
+ CITY2,6:56:00,6:58:00,STAGECOACH,5,,,,
14
+ AB1,8:00:00,8:00:00,BEATTY_AIRPORT,1,,,,
15
+ AB1,8:10:00,8:15:00,BULLFROG,2,,,,
16
+ AB2,12:05:00,12:05:00,BULLFROG,1,,,,
17
+ AB2,12:15:00,12:15:00,BEATTY_AIRPORT,2
18
+ BFC1,8:20:00,8:20:00,BULLFROG,1
19
+ BFC1,9:20:00,9:20:00,FUR_CREEK_RES,2
20
+ BFC2,11:00:00,11:00:00,FUR_CREEK_RES,1
21
+ BFC2,12:00:00,12:00:00,BULLFROG,2
22
+ AAMV1,8:00:00,8:00:00,BEATTY_AIRPORT,1
23
+ AAMV1,9:00:00,9:00:00,AMV,2
24
+ AAMV2,10:00:00,10:00:00,AMV,1
25
+ AAMV2,11:00:00,11:00:00,BEATTY_AIRPORT,2
26
+ AAMV3,13:00:00,13:00:00,BEATTY_AIRPORT,1
27
+ AAMV3,14:00:00,14:00:00,AMV,2
28
+ AAMV4,15:00:00,15:00:00,AMV,1
29
+ AAMV4,16:00:00,16:00:00,BEATTY_AIRPORT,2
@@ -0,0 +1,10 @@
1
+ stop_id,stop_name,stop_desc,stop_lat,stop_lon,zone_id,stop_url
2
+ FUR_CREEK_RES,Furnace Creek Resort (Demo),,36.425288,-117.133162,,
3
+ BEATTY_AIRPORT,Nye County Airport (Demo),,36.868446,-116.784582,,
4
+ BULLFROG,Bullfrog (Demo),,36.88108,-116.81797,,
5
+ STAGECOACH,Stagecoach Hotel & Casino (Demo),,36.915682,-116.751677,,
6
+ NADAV,North Ave / D Ave N (Demo),,36.914893,-116.76821,,
7
+ NANAA,North Ave / N A Ave (Demo),,36.914944,-116.761472,,
8
+ DADAN,Doing Ave / D Ave N (Demo),,36.909489,-116.768242,,
9
+ EMSI,E Main St / S Irving St (Demo),,36.905697,-116.76218,,
10
+ AMV,Amargosa Valley (Demo),,36.641496,-116.40094,,
@@ -0,0 +1,12 @@
1
+ route_id,service_id,trip_id,trip_headsign,direction_id,block_id,shape_id
2
+ AB,FULLW,AB1,to Bullfrog,0,1,
3
+ AB,FULLW,AB2,to Airport,1,2,
4
+ STBA,FULLW,STBA,Shuttle,,,
5
+ CITY,FULLW,CITY1,,0,,
6
+ CITY,FULLW,CITY2,,1,,
7
+ BFC,FULLW,BFC1,to Furnace Creek Resort,0,1,
8
+ BFC,FULLW,BFC2,to Bullfrog,1,2,
9
+ AAMV,WE,AAMV1,to Amargosa Valley,0,,
10
+ AAMV,WE,AAMV2,to Airport,1,,
11
+ AAMV,WE,AAMV3,to Amargosa Valley,0,,
12
+ AAMV,WE,AAMV4,to Airport,1,,
data/sig/gtfskit.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Gtfskit
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gtfskit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - julianfssen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: debug
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ description: Ruby library and binding for the General Transit Feed Specification (GTFS)
56
+ email:
57
+ - julian@toadbits.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".standard.yml"
63
+ - CHANGELOG.md
64
+ - CODE_OF_CONDUCT.md
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - gtfskit.gemspec
70
+ - lib/gtfskit.rb
71
+ - lib/gtfskit/data_parser.rb
72
+ - lib/gtfskit/dataset.rb
73
+ - lib/gtfskit/dataset/agency.rb
74
+ - lib/gtfskit/dataset/base.rb
75
+ - lib/gtfskit/dataset/calendar.rb
76
+ - lib/gtfskit/dataset/calendar_date.rb
77
+ - lib/gtfskit/dataset/factory.rb
78
+ - lib/gtfskit/dataset/route.rb
79
+ - lib/gtfskit/dataset/stop.rb
80
+ - lib/gtfskit/dataset/stop_time.rb
81
+ - lib/gtfskit/dataset/trip.rb
82
+ - lib/gtfskit/error.rb
83
+ - lib/gtfskit/version.rb
84
+ - resources/agency.txt
85
+ - resources/calendar.txt
86
+ - resources/calendar_dates.txt
87
+ - resources/fare_attributes.txt
88
+ - resources/fare_rules.txt
89
+ - resources/frequencies.txt
90
+ - resources/routes.txt
91
+ - resources/shapes.txt
92
+ - resources/stop_times.txt
93
+ - resources/stops.txt
94
+ - resources/trips.txt
95
+ - sig/gtfskit.rbs
96
+ homepage: https://github.com/toadbits/gtfskit
97
+ licenses:
98
+ - MIT
99
+ metadata:
100
+ homepage_uri: https://github.com/toadbits/gtfskit
101
+ source_code_uri: https://github.com/toadbits/gtfskit
102
+ changelog_uri: https://github.com/toadbits/gtfskit/blob/main/CHANGELOG.md
103
+ post_install_message:
104
+ rdoc_options: []
105
+ require_paths:
106
+ - lib
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: 2.6.0
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ requirements: []
118
+ rubygems_version: 3.4.10
119
+ signing_key:
120
+ specification_version: 4
121
+ summary: Ruby library and binding for the General Transit Feed Specification (GTFS)
122
+ test_files: []