gtfs-reader 0.2.2 → 0.2.3

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: cd067fc13cd77eac671d1b07114b886d1b524c4c
4
- data.tar.gz: 04d9c564134ba37201753a9094ae715c4d39662f
3
+ metadata.gz: 17421796d80a3ed47933ef4bed3b0af50161fc00
4
+ data.tar.gz: 1d3a569ef25d6f3de1692ba362668a1b8be6bcdf
5
5
  SHA512:
6
- metadata.gz: 4fdf6b70e9ff9725c6b6d6d4086c5747b60d4aaf5ccd580cfb7f4ac2a2e23478d25acc5031627214064a4259fca55469c70f35ba53783a0adc7025cdf531cddd
7
- data.tar.gz: 75d82e8b6f75a366232ab96adae9e97b0a9735e6d27ed59b9d928d7834974d6beaf568451694927ddeb796e2d660ded0e492dc5920e842ab78ee2b042196fdd7
6
+ metadata.gz: 5042f9a95b62dfdd505ee3bcfb45b4851bc204997f8c69b8ba3241ff31eed3f0be6f9931d1127e4c867fbb1c9275c46d5d6c95a1182e4f425ec54246aa05ee53
7
+ data.tar.gz: 94f01d3a0c1ca8dae4d022776ceeaa6fe21b941175d96c1195dad237c40dfbf0774baa5efbf8531afc115c162b001090ddcf17866aebd63edb007ba0f7ae0a4f
@@ -51,6 +51,7 @@ module GtfsReader
51
51
  check_files
52
52
  check_columns
53
53
  process_files
54
+ Log.info { "Finished updating #{name.to_s.green}" }
54
55
  end
55
56
  rescue SkipSourceError => e
56
57
  Log.warn do
@@ -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
@@ -50,7 +50,9 @@ module GtfsReader
50
50
 
51
51
  def create_logger
52
52
  Log4r::Logger.new('GtfsReader').tap do |log|
53
- log.outputters << Log4r::StdoutOutputter.new('log_stdout')
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
@@ -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 = 2
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.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: