rufus-scheduler 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +5 -0
- data/CREDITS.txt +1 -0
- data/lib/rufus/scheduler.rb +1 -1
- data/lib/rufus/scheduler/jobs.rb +2 -2
- data/spec/job_spec.rb +30 -0
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd97747d503cb093e27d61c02d326b2edb1b2965
|
4
|
+
data.tar.gz: b5f256b6b2b1521b48e4ac076b31010da1043990
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edaab91b88145d18426e154620e28b7092ca9cdf77748b981cbe36a13d77a4f20bb1e563b6e88399366198e0f2679ee96524582b3a28de672b4b0f9911b85846
|
7
|
+
data.tar.gz: 2bc7b30d71625185c2412423b14aae660cf4f1ff0e8e1201608204824a97f48aea20c39e53fd42641f6524b5ea7d86278ebc352c9b4345b57c8c73efc9976bf8
|
data/CHANGELOG.txt
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
= rufus-scheduler CHANGELOG.txt
|
3
3
|
|
4
4
|
|
5
|
+
== rufus-scheduler - 3.1.6 released 2015-10-01
|
6
|
+
|
7
|
+
- fix job id uniqueness (JRuby), thanks 김성식 https://github.com/kssminus
|
8
|
+
|
9
|
+
|
5
10
|
== rufus-scheduler - 3.1.5 released 2015-09-25
|
6
11
|
|
7
12
|
- fix for "not a valid cronline" on "mingw" Ruby distributions, gh-166
|
data/CREDITS.txt
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
== Contributors
|
6
6
|
|
7
|
+
- 김성식 (https://github.com/kssminus) job id uniqueness effort
|
7
8
|
- Jesse Willet (https://github.com/jhw-at-prosperworks-com) cron vs "*/10"
|
8
9
|
- Pascal Ouellet (https://github.com/pouellet) Scheduler#timeline loop fix
|
9
10
|
- Ryan Biesemeyer (https://github.com/yaauie) ZoTime.is_timezone? on OSX
|
data/lib/rufus/scheduler.rb
CHANGED
data/lib/rufus/scheduler/jobs.rb
CHANGED
@@ -351,7 +351,7 @@ module Rufus
|
|
351
351
|
self.class.name.split(':').last.downcase[0..-4],
|
352
352
|
@scheduled_at.to_f,
|
353
353
|
@next_time.to_f,
|
354
|
-
|
354
|
+
self.hash.abs
|
355
355
|
].map(&:to_s).join('_')
|
356
356
|
end
|
357
357
|
|
@@ -473,7 +473,7 @@ module Rufus
|
|
473
473
|
[
|
474
474
|
self.class.name.split(':').last.downcase[0..-4],
|
475
475
|
@scheduled_at.to_f,
|
476
|
-
|
476
|
+
self.hash.abs
|
477
477
|
].map(&:to_s).join('_')
|
478
478
|
end
|
479
479
|
|
data/spec/job_spec.rb
CHANGED
@@ -627,5 +627,35 @@ describe Rufus::Scheduler::Job do
|
|
627
627
|
end
|
628
628
|
end
|
629
629
|
end
|
630
|
+
|
631
|
+
context 'one time job' do
|
632
|
+
|
633
|
+
describe '#determine_id' do
|
634
|
+
|
635
|
+
it 'returns unique ids' do
|
636
|
+
|
637
|
+
ids = []
|
638
|
+
|
639
|
+
10_000.times { ids << @scheduler.in('1y') {} }
|
640
|
+
|
641
|
+
expect(ids.uniq.length).to eq(ids.length)
|
642
|
+
end
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
context 'repeat job' do
|
647
|
+
|
648
|
+
describe '#determine_id' do
|
649
|
+
|
650
|
+
it 'returns unique ids' do
|
651
|
+
|
652
|
+
ids = []
|
653
|
+
|
654
|
+
10_000.times { ids << @scheduler.every('1y') {} }
|
655
|
+
|
656
|
+
expect(ids.uniq.length).to eq(ids.length)
|
657
|
+
end
|
658
|
+
end
|
659
|
+
end
|
630
660
|
end
|
631
661
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rufus-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.13.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.13.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: chronic
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: tzinfo
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: job scheduler for Ruby (at, cron, in and every jobs).
|
@@ -73,14 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- CHANGELOG.txt
|
77
|
-
- CREDITS.txt
|
78
|
-
- LICENSE.txt
|
79
|
-
- README.md
|
80
76
|
- Rakefile
|
81
|
-
- TODO.txt
|
82
|
-
- lib/rufus-scheduler.rb
|
83
|
-
- lib/rufus/scheduler.rb
|
84
77
|
- lib/rufus/scheduler/cronline.rb
|
85
78
|
- lib/rufus/scheduler/job_array.rb
|
86
79
|
- lib/rufus/scheduler/jobs.rb
|
@@ -88,7 +81,8 @@ files:
|
|
88
81
|
- lib/rufus/scheduler/util.rb
|
89
82
|
- lib/rufus/scheduler/zones.rb
|
90
83
|
- lib/rufus/scheduler/zotime.rb
|
91
|
-
- rufus
|
84
|
+
- lib/rufus/scheduler.rb
|
85
|
+
- lib/rufus-scheduler.rb
|
92
86
|
- spec/basics_spec.rb
|
93
87
|
- spec/cronline_spec.rb
|
94
88
|
- spec/error_spec.rb
|
@@ -114,6 +108,12 @@ files:
|
|
114
108
|
- spec/spec_helper.rb
|
115
109
|
- spec/threads_spec.rb
|
116
110
|
- spec/zotime_spec.rb
|
111
|
+
- rufus-scheduler.gemspec
|
112
|
+
- CHANGELOG.txt
|
113
|
+
- CREDITS.txt
|
114
|
+
- LICENSE.txt
|
115
|
+
- TODO.txt
|
116
|
+
- README.md
|
117
117
|
homepage: http://github.com/jmettraux/rufus-scheduler
|
118
118
|
licenses:
|
119
119
|
- MIT
|
@@ -124,17 +124,17 @@ require_paths:
|
|
124
124
|
- lib
|
125
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - '>='
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- -
|
132
|
+
- - '>='
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project: rufus
|
137
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.0.14
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: job scheduler for Ruby (at, cron, in and every jobs)
|