clockwork 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +36 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +5 -0
- data/bin/clockworkd +3 -3
- data/clockwork.gemspec +1 -1
- data/lib/clockwork/manager.rb +1 -0
- data/test/clockwork_test.rb +2 -2
- metadata +7 -10
- data/.travis.yml +0 -30
- data/gemfiles/activesupport4.gemfile +0 -5
- data/gemfiles/activesupport5.gemfile +0 -5
- data/gemfiles/activesupport6.gemfile +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e5a8d520eb475e3eb5b3e75b3b175a4a66c3804584912afc9d4392c1d82f3d7
|
4
|
+
data.tar.gz: 558bc615e123ceaf146c2107b71202fef3eaf307215c93aa8f421826e25a8d4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d60240815eee8a5001004f854ccfd1fe94f01023ca5099799100bcc04a99ae982bc96f14b746b4965c4afc2aba77d2138ebae96c41da075bb7b8c4f15b863493
|
7
|
+
data.tar.gz: 4beb2d7f2cd09940e9159e5d4e1d1e62db2268f82b75ff86c344e7b11076a2e6d57865039fe19c361208c1fee8e5af8c3f72657880f6183107e8f90f33129e47
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby: [ "2.7", "3.0", "3.1", "3.2", jruby ]
|
15
|
+
active_support: [ "6.0", "7.0" ]
|
16
|
+
exclude:
|
17
|
+
- ruby: "3.0"
|
18
|
+
active_support: "6.0"
|
19
|
+
- ruby: "3.1"
|
20
|
+
active_support: "6.0"
|
21
|
+
- ruby: "3.2"
|
22
|
+
active_support: "6.0"
|
23
|
+
name: Ruby ${{ matrix.ruby }} - ActiveSupport ${{ matrix.active_support }}
|
24
|
+
env:
|
25
|
+
ACTIVE_SUPPORT_VERSION: ${{ matrix.active_support }}
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v3
|
28
|
+
- uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
31
|
+
bundler-cache: true
|
32
|
+
- name: Run Tests
|
33
|
+
env:
|
34
|
+
RUBYOPT: "-W:deprecated" # Show Ruby's deprecation warnings
|
35
|
+
run: |
|
36
|
+
bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/bin/clockworkd
CHANGED
@@ -63,7 +63,7 @@ def optparser_abort(opts,message)
|
|
63
63
|
end
|
64
64
|
|
65
65
|
optparser_abort opts, "ERROR: --clock=FILE is required." unless @options[:file]
|
66
|
-
optparser_abort opts, "ERROR: clock file #{@options[:file]} does not exist." unless File.
|
66
|
+
optparser_abort opts, "ERROR: clock file #{@options[:file]} does not exist." unless File.exist?(@options[:file])
|
67
67
|
optparser_abort opts, "ERROR: File extension specified in --clock must be '.rb'" unless File.extname(@options[:file]) == ".rb"
|
68
68
|
|
69
69
|
@options[:identifier] ||= "#{File.basename(@options[:file],'.*')}"
|
@@ -71,8 +71,8 @@ process_name = "#{bin_basename}.#{@options[:identifier]}"
|
|
71
71
|
|
72
72
|
@options[:log_dir] ||= @options[:pid_dir]
|
73
73
|
|
74
|
-
Dir.mkdir(@options[:pid_dir]) unless File.
|
75
|
-
Dir.mkdir(@options[:log_dir]) unless File.
|
74
|
+
Dir.mkdir(@options[:pid_dir]) unless File.exist?(@options[:pid_dir])
|
75
|
+
Dir.mkdir(@options[:log_dir]) unless File.exist?(@options[:log_dir])
|
76
76
|
|
77
77
|
puts "#{process_name}: pid file: #{File.expand_path(File.join(@options[:pid_dir],process_name + '.pid'))}"
|
78
78
|
|
data/clockwork.gemspec
CHANGED
data/lib/clockwork/manager.rb
CHANGED
data/test/clockwork_test.rb
CHANGED
@@ -40,7 +40,7 @@ describe Clockwork do
|
|
40
40
|
Clockwork.run
|
41
41
|
assert run
|
42
42
|
assert @log_output.string.include?("Triggering 'an event'")
|
43
|
-
assert_match
|
43
|
+
assert_match(/Finished 'an event' duration_ms=\d+ error=nil/, @log_output.string)
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'should log exceptions' do
|
@@ -54,7 +54,7 @@ describe Clockwork do
|
|
54
54
|
Clockwork.run
|
55
55
|
assert run
|
56
56
|
assert @log_output.string.include?("Triggering 'an event'")
|
57
|
-
assert_match
|
57
|
+
assert_match(/Finished 'an event' duration_ms=\d+ error=#<RuntimeError: boom>/, @log_output.string)
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'should pass event without modification to handler' do
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Wiggins
|
8
8
|
- tomykaira
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: tzinfo
|
@@ -121,8 +121,8 @@ extensions: []
|
|
121
121
|
extra_rdoc_files:
|
122
122
|
- README.md
|
123
123
|
files:
|
124
|
+
- ".github/workflows/tests.yml"
|
124
125
|
- ".gitignore"
|
125
|
-
- ".travis.yml"
|
126
126
|
- CHANGELOG.md
|
127
127
|
- Gemfile
|
128
128
|
- LICENSE
|
@@ -133,9 +133,6 @@ files:
|
|
133
133
|
- clockwork.gemspec
|
134
134
|
- clockworkd.1
|
135
135
|
- example.rb
|
136
|
-
- gemfiles/activesupport4.gemfile
|
137
|
-
- gemfiles/activesupport5.gemfile
|
138
|
-
- gemfiles/activesupport6.gemfile
|
139
136
|
- lib/clockwork.rb
|
140
137
|
- lib/clockwork/at.rb
|
141
138
|
- lib/clockwork/database_events.rb
|
@@ -160,7 +157,7 @@ homepage: http://github.com/Rykian/clockwork
|
|
160
157
|
licenses:
|
161
158
|
- MIT
|
162
159
|
metadata: {}
|
163
|
-
post_install_message:
|
160
|
+
post_install_message:
|
164
161
|
rdoc_options: []
|
165
162
|
require_paths:
|
166
163
|
- lib
|
@@ -175,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
172
|
- !ruby/object:Gem::Version
|
176
173
|
version: '0'
|
177
174
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
179
|
-
signing_key:
|
175
|
+
rubygems_version: 3.0.3.1
|
176
|
+
signing_key:
|
180
177
|
specification_version: 4
|
181
178
|
summary: A scheduler process to replace cron.
|
182
179
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
cache: bundler
|
4
|
-
before_install:
|
5
|
-
- gem update --system
|
6
|
-
# This is required to support ActiveSupport 4
|
7
|
-
# https://docs.travis-ci.com/user/languages/ruby/#bundler-20
|
8
|
-
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
9
|
-
- gem install bundler -v '< 2'
|
10
|
-
rvm:
|
11
|
-
- 2.3.8
|
12
|
-
- 2.4.9
|
13
|
-
- 2.5.7
|
14
|
-
- 2.6.5
|
15
|
-
- 2.7.0
|
16
|
-
- 3.0.2
|
17
|
-
- jruby-9.1.17.0
|
18
|
-
- jruby-9.2.11.0
|
19
|
-
gemfile:
|
20
|
-
- gemfiles/activesupport4.gemfile
|
21
|
-
- gemfiles/activesupport5.gemfile
|
22
|
-
- gemfiles/activesupport6.gemfile
|
23
|
-
matrix:
|
24
|
-
exclude:
|
25
|
-
- rvm: 2.3.8
|
26
|
-
gemfile: gemfiles/activesupport6.gemfile
|
27
|
-
- rvm: 2.4.9
|
28
|
-
gemfile: gemfiles/activesupport6.gemfile
|
29
|
-
- rvm: jruby-9.1.17.0
|
30
|
-
gemfile: gemfiles/activesupport6.gemfile
|