chrono 0.0.5 → 0.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
  SHA1:
3
- metadata.gz: 3ec2b7feb1a30317d444ebcab53b9be9a24aa3a7
4
- data.tar.gz: 4f2bb3af4984d0696b3ac3ed9020cb8d965114e2
3
+ metadata.gz: a42cc20a3ed6750c544e39bd47e14ace15f36d5b
4
+ data.tar.gz: c55208bf4082532883e069f3c18a69332641f288
5
5
  SHA512:
6
- metadata.gz: 99cae021f9fc0e3edc0374175a98854fb5c69e080e1053c8340dc5acb9b869a3345dcc1a8c1c37cdc77f3bc4fc073cd7da682ec3a4e0e98c06d5cac84d8b32a1
7
- data.tar.gz: 5cd31c1d16ad4dc0fd47303c841c5bf6f5b304530a1ce55b4e41e5c8079a399f8de9d080025bda2308a14ec68ef05bf81ce8d1b8d42d9d58eff42b9055ca3758
6
+ metadata.gz: 86f6bb35356917719c2fcc4bb467ea81dd2d11b4ea770f4b04cf78d3ad1f727c4a3d591adf54d5b9014b4f2d026802ed1858e0b609985b91f21bc7716b8c9cb8
7
+ data.tar.gz: 8455ebc6191819ed3ec105462fbc36dd98cef6f4635f73ad7e16649d377f5ea2ee552c1fc3a18317d731c5ac21f6e1681fe8ef3c9f9cf8b688da6e992b624114
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.0.6
2
+ - Support ActiveSupport 3 and 4
3
+
1
4
  ## 0.0.5
2
5
  - Fix missing version dependency on ActiveSupport 4
3
6
 
data/chrono.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency "activesupport", ">= 4.0.0"
19
+ spec.add_dependency "activesupport"
20
20
  spec.add_development_dependency "bundler"
21
21
  spec.add_development_dependency "codeclimate-test-reporter"
22
22
  spec.add_development_dependency "rake"
@@ -1,6 +1,13 @@
1
- require "active_support/core_ext/date"
2
- require "active_support/core_ext/time"
3
1
  require "active_support/core_ext/numeric/time"
2
+ require "active_support/version"
3
+
4
+ if ActiveSupport::VERSION::MAJOR >= 4
5
+ require "active_support/core_ext/date"
6
+ require "active_support/core_ext/time"
7
+ else
8
+ require "active_support/core_ext/date/calculations"
9
+ require "active_support/core_ext/time/calculations"
10
+ end
4
11
 
5
12
  module Chrono
6
13
  class NextTime
@@ -35,7 +42,7 @@ module Chrono
35
42
  private
36
43
 
37
44
  def time
38
- @time ||= (now + 1.minute).at_beginning_of_minute
45
+ @time ||= (now + 1.minute).change(sec: 0)
39
46
  end
40
47
 
41
48
  def schedule
@@ -75,7 +82,7 @@ module Chrono
75
82
  end
76
83
 
77
84
  def carry_minute
78
- self.time = (time + 1.minute).at_beginning_of_minute
85
+ self.time = (time + 1.minute).change(sec: 0)
79
86
  end
80
87
  end
81
88
  end
@@ -1,3 +1,3 @@
1
1
  module Chrono
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrono
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement