gtfs-reader 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gtfs_reader/core.rb +1 -0
- data/lib/gtfs_reader/feed_handler.rb +3 -0
- data/lib/gtfs_reader/log.rb +3 -1
- data/lib/gtfs_reader/version.rb +7 -1
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17421796d80a3ed47933ef4bed3b0af50161fc00
|
4
|
+
data.tar.gz: 1d3a569ef25d6f3de1692ba362668a1b8be6bcdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5042f9a95b62dfdd505ee3bcfb45b4851bc204997f8c69b8ba3241ff31eed3f0be6f9931d1127e4c867fbb1c9275c46d5d6c95a1182e4f425ec54246aa05ee53
|
7
|
+
data.tar.gz: 94f01d3a0c1ca8dae4d022776ceeaa6fe21b941175d96c1195dad237c40dfbf0774baa5efbf8531afc115c162b001090ddcf17866aebd63edb007ba0f7ae0a4f
|
data/lib/gtfs_reader/core.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
module GtfsReader
|
2
|
+
# This handler returns each row individually as it is read in from the source.
|
2
3
|
class FeedHandler
|
3
4
|
def initialize(args=[], &block)
|
4
5
|
@read_callbacks = {}
|
5
6
|
FeedHandlerDsl.new(self).instance_exec *args, &block
|
6
7
|
end
|
7
8
|
|
9
|
+
#@param filename [String] the name of the file to handle
|
10
|
+
#@return [Boolean] if this handler can handle the given filename
|
8
11
|
def handler?(filename)
|
9
12
|
@read_callbacks.key? filename
|
10
13
|
end
|
data/lib/gtfs_reader/log.rb
CHANGED
@@ -50,7 +50,9 @@ module GtfsReader
|
|
50
50
|
|
51
51
|
def create_logger
|
52
52
|
Log4r::Logger.new('GtfsReader').tap do |log|
|
53
|
-
|
53
|
+
out = Log4r::StdoutOutputter.new('log_stdout')
|
54
|
+
out.formatter = PatternFormatter.new pattern: '%d [%l]: %m'
|
55
|
+
log.outputters << out
|
54
56
|
log.level = Log4r::INFO
|
55
57
|
log.debug { 'Starting GtfsReader...'.underline.colorize :yellow }
|
56
58
|
end
|
data/lib/gtfs_reader/version.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
module GtfsReader
|
2
|
+
# This module both contains the current version of GtfsReader, but also has a
|
3
|
+
# {Bumper} class which will modify this file to increase the version
|
2
4
|
module Version
|
3
5
|
# The following four lines are generated, so don't mess with them.
|
4
6
|
MAJOR = 0
|
5
7
|
MINOR = 2
|
6
|
-
PATCH =
|
8
|
+
PATCH = 3
|
7
9
|
BUILD = nil
|
8
10
|
|
11
|
+
#@return [String] the current version in the form of +1.2.3.build+
|
9
12
|
def self.to_s
|
10
13
|
[MAJOR, MINOR, PATCH, BUILD].compact.join '.'
|
11
14
|
end
|
@@ -15,6 +18,9 @@ module GtfsReader
|
|
15
18
|
PARTS = %i[major minor patch]
|
16
19
|
PATTERN = %r[(\s+)MAJOR = \d+\s+MINOR = \d+\s+PATCH = \d+\s+BUILD = .+]
|
17
20
|
|
21
|
+
#@param filename [String] the file to edit
|
22
|
+
#@param part [String] the part of the version to bump. one of major,
|
23
|
+
# minor, or patch
|
18
24
|
def initialize(filename=__FILE__, part)
|
19
25
|
raise "#{part} not one of #{PARTS}" unless PARTS.include? part
|
20
26
|
@filename, @part = filename, part
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtfs-reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Sangster
|
@@ -192,4 +192,3 @@ signing_key:
|
|
192
192
|
specification_version: 4
|
193
193
|
summary: Read General Transit Feed Specification zip files
|
194
194
|
test_files: []
|
195
|
-
has_rdoc:
|