Sha256: 0c72b92933e5a10ea97f711fbf116741c8b26a32f175e01d3edc15a4218ecd36

Contents?: true

Size: 344 Bytes

Versions: 29

Compression:

Stored size: 344 Bytes

Contents

class TimezoneValidator
  def initialize(timezone)
    @timezone = timezone
  end

  def validate
    begin
      # raises exception if timezone is invalid string
      TZInfo::Timezone.get(@timezone)
    rescue => e
      Embulk.logger.error "'#{@timezone}' is invalid timezone"
      raise Embulk::ConfigError.new e.message
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
embulk-input-mixpanel-0.5.15 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.14 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.13 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.12 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.12.alpha.1 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.11 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.11.alpha lib/timezone_validator.rb
embulk-input-mixpanel-0.5.10 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.9 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.8 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.7 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.6 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.5 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.4 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.3 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.3.alpha.1 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.2 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.1 lib/timezone_validator.rb
embulk-input-mixpanel-0.5.0 lib/timezone_validator.rb
embulk-input-mixpanel-0.4.7 lib/timezone_validator.rb