timesteps 1.0.4 → 1.0.6

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
  SHA256:
3
- metadata.gz: ca436a0b5acbd7fc5f9dbb1c937e2b4beeadedf179f5aba8cba8c92610f9bb86
4
- data.tar.gz: a9b9585faae128d76f50a32f4d8fcd68f0d02b7a9d500ffd5cced220d4d07131
3
+ metadata.gz: 1e933e2020424ed914b88472cafe4e2c7634dd6afe07475f4b0b915689fe4693
4
+ data.tar.gz: be0df225f53617124a675c374f41f47924da31926043a859f548e3d563bf5f6c
5
5
  SHA512:
6
- metadata.gz: 207e61a139b6753ade655c016431c2ef9e99eefdd6068043cd371271b251ca4d347656d551fee0d6f5792f852dd1ce38fa1657470e1d6c8180bb44ea868958c8
7
- data.tar.gz: 90ec417c9e01d092497677392969ee85ed183ec68c68e22dd4ce3bc8b496413c65cf3167cb5a7fa94879b0bd869097fcba24141af30e25cf72c84c6083a6eaa2
6
+ metadata.gz: 61c5653b8eb7b6423c92abdc89e331aac3f8675732ffc424fb34268bb6b69b24b63d7eaefdd121d4a3e28a3ecf1bd726a5a28639f25ce3f705039b5fb9fd6f32
7
+ data.tar.gz: 17015550f19920f9ce2c80e7a8e5df53f80deb44d7d6b6842f3eacd89d0eaf41cf2627274191767bacfbecd670630bdff1b95d2b8add41894eae34aeb9951289
@@ -1,6 +1,4 @@
1
1
 
2
- autoload :TZInfo, "tzinfo"
3
-
4
2
  class TimeStep
5
3
 
6
4
  class Calendar
@@ -69,7 +67,10 @@ class TimeStep
69
67
  end
70
68
 
71
69
  def valid_datetime_type? (time)
72
- return false unless time.is_a?(DateTimeType[@calendar])
70
+ if @calendar == :standard and time.is_a?(TZInfo::DateTimeWithOffset)
71
+ return true
72
+ end
73
+ return false unless time.is_a?(DateTimeType[@calendar])
73
74
  case @calendar
74
75
  when :standard
75
76
  return time.start == Date::ITALY
data/lib/timesteps.rb CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  require "date"
3
+ require "tzinfo"
3
4
  require "timesteps/time"
4
5
  require "timesteps/datetimelike"
5
6
  require "timesteps/datetimelike_format"
data/timesteps.gemspec CHANGED
@@ -1,29 +1,30 @@
1
1
 
2
2
  Gem::Specification::new do |s|
3
- version = "1.0.4"
3
+ version = '1.0.6'
4
4
 
5
- files = Dir.glob("**/*") + [".yardopts"] - [
6
- Dir.glob("timesteps-*.gem"),
7
- Dir.glob("doc/**/*"),
8
- Dir.glob("examples/**/*"),
5
+ files = Dir.glob('**/*') + ['.yardopts'] - [
6
+ Dir.glob('timesteps-*.gem'),
7
+ Dir.glob('doc/**/*'),
8
+ Dir.glob('examples/**/*'),
9
9
  ].flatten
10
10
 
11
11
  s.platform = Gem::Platform::RUBY
12
- s.name = "timesteps"
13
- s.summary = "A library for handling discrete time series in constant increments"
12
+ s.name = 'timesteps'
13
+ s.summary = 'A library for handling discrete time series in constant increments'
14
14
  s.description = <<-HERE
15
15
  A library for time conversion and intercomparison of multiple time series data
16
16
  in the case of handling time series data of the type that specifies the time using
17
17
  indexes of time steps since origin time. It handles time units notation like
18
- "hours since 2001-01-01 00:00:00", which is originate from udunits library and
18
+ 'hours since 2001-01-01 00:00:00', which is originate from udunits library and
19
19
  also is used in CF-convension of NetCDF. The main purpose of this library is to
20
20
  describe the time axis when dealing with time series of observational data and climate data.
21
21
  HERE
22
22
  s.version = version
23
23
  s.license = 'MIT'
24
- s.author = "Hiroki Motoyoshi"
25
- s.email = ""
24
+ s.author = 'Hiroki Motoyoshi'
25
+ s.email = ''
26
26
  s.homepage = 'https://github.com/himotoyoshi/timesteps'
27
27
  s.files = files
28
- s.required_ruby_version = ">= 2.4.1"
28
+ s.required_ruby_version = '>= 2.4.1'
29
+ s.add_runtime_dependency 'tzinfo', '~> 2.0'
29
30
  end
metadata CHANGED
@@ -1,19 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timesteps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroki Motoyoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-23 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tzinfo
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
13
27
  description: " A library for time conversion and intercomparison of multiple time
14
28
  series data \n in the case of handling time series data of the type that specifies
15
29
  the time using \n indexes of time steps since origin time. It handles time units
16
- notation like \n \"hours since 2001-01-01 00:00:00\", which is originate from udunits
30
+ notation like \n 'hours since 2001-01-01 00:00:00', which is originate from udunits
17
31
  library and \n also is used in CF-convension of NetCDF. The main purpose of this
18
32
  library is to \n describe the time axis when dealing with time series of observational
19
33
  data and climate data.\n"
@@ -71,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
85
  - !ruby/object:Gem::Version
72
86
  version: '0'
73
87
  requirements: []
74
- rubygems_version: 3.0.3
88
+ rubygems_version: 3.1.6
75
89
  signing_key:
76
90
  specification_version: 4
77
91
  summary: A library for handling discrete time series in constant increments