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 +4 -4
- data/CHANGELOG.md +3 -0
- data/chrono.gemspec +1 -1
- data/lib/chrono/next_time.rb +11 -4
- data/lib/chrono/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a42cc20a3ed6750c544e39bd47e14ace15f36d5b
|
4
|
+
data.tar.gz: c55208bf4082532883e069f3c18a69332641f288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86f6bb35356917719c2fcc4bb467ea81dd2d11b4ea770f4b04cf78d3ad1f727c4a3d591adf54d5b9014b4f2d026802ed1858e0b609985b91f21bc7716b8c9cb8
|
7
|
+
data.tar.gz: 8455ebc6191819ed3ec105462fbc36dd98cef6f4635f73ad7e16649d377f5ea2ee552c1fc3a18317d731c5ac21f6e1681fe8ef3c9f9cf8b688da6e992b624114
|
data/CHANGELOG.md
CHANGED
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"
|
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"
|
data/lib/chrono/next_time.rb
CHANGED
@@ -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).
|
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).
|
85
|
+
self.time = (time + 1.minute).change(sec: 0)
|
79
86
|
end
|
80
87
|
end
|
81
88
|
end
|
data/lib/chrono/version.rb
CHANGED
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.
|
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:
|
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:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|