clockwork 3.0.0 → 3.0.2

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: 81357fe2cd463fcf64f263400fd180f02a2c6e14fc281c32cd5098dbe6971487
4
- data.tar.gz: 2eec51851477a00654c88adaa7b5e4b5abac252fa808957d1f3cfafda49572f4
3
+ metadata.gz: 4e5a8d520eb475e3eb5b3e75b3b175a4a66c3804584912afc9d4392c1d82f3d7
4
+ data.tar.gz: 558bc615e123ceaf146c2107b71202fef3eaf307215c93aa8f421826e25a8d4a
5
5
  SHA512:
6
- metadata.gz: ee46e6ec0c2da3bda8c38ab24ad29b50d01d058e0e1580c6cc2c0f1a5b000a649453ddc780b5d007b37c25f3a8380303f00344b9c171f5febb2742b11127c25c
7
- data.tar.gz: 1d64979d6c6a494963bf27283aff3da36345441be828c0496fc25858e6c0834d87aaf8283ea3cf7d3bf396dea30e0d27c681b2ea52ab8e04681440491ddbef20
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
@@ -1,3 +1,11 @@
1
+ ## 3.0.2 ##
2
+
3
+ * Fixing clockworkd on Ruby 3.2 (a73a9d5)
4
+
5
+ ## 3.0.1 ##
6
+
7
+ * Notify error using error handler if configured (49075c2)
8
+
1
9
  ## 3.0.0 ##
2
10
 
3
11
  * BREAKING CHANGE: drop Rubinius support
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ rails_version = ENV.fetch("ACTIVE_SUPPORT_VERSION", "7.0")
6
+
7
+ gem "activesupport", "~> #{rails_version}"
8
+ gem "minitest", "~> 5.0"
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.exists?(@options[: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.exists?(@options[:pid_dir])
75
- Dir.mkdir(@options[:log_dir]) unless File.exists?(@options[:log_dir])
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "clockwork"
3
- s.version = "3.0.0"
3
+ s.version = "3.0.2"
4
4
 
5
5
  s.authors = ["Adam Wiggins", "tomykaira"]
6
6
  s.license = 'MIT'
@@ -165,6 +165,7 @@ module Clockwork
165
165
  event.run_now?(t)
166
166
  rescue => e
167
167
  log_error(e)
168
+ handle_error(e)
168
169
  false
169
170
  end
170
171
  end
@@ -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 /Finished 'an event' duration_ms=\d+ error=nil/, @log_output.string
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 /Finished 'an event' duration_ms=\d+ error=#<RuntimeError: boom>/, @log_output.string
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.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: 2021-12-07 00:00:00.000000000 Z
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.2.22
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
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activesupport', '~> 4.2'
4
- gem 'minitest', '~> 5.0'
5
- gemspec :path=>"../"
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activesupport', '~> 5.0'
4
- gem 'minitest', '~> 5.0'
5
- gemspec :path=>"../"
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activesupport', '~> 6.0'
4
- gem 'minitest', '~> 5.0'
5
- gemspec :path=>"../"