mirror of
https://github.com/plashchynski/crono.git
synced 2026-01-11 21:10:24 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c7ff2f7b1 | ||
|
|
2e663c2104 | ||
|
|
ab4e1e808d | ||
|
|
9a8e8049f9 | ||
|
|
6bf1ec9cfd | ||
|
|
d3dc79e4f1 | ||
|
|
e0f41858e0 | ||
|
|
e277fd9fb7 | ||
|
|
d4cc325685 | ||
|
|
0bfdc6996b | ||
|
|
7dffc5c77b | ||
|
|
bfbb8733cd | ||
|
|
4294bad43a |
2
.github/workflows/rspec.yml
vendored
2
.github/workflows/rspec.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
ruby: ['2.7', '3.0', '3.1'] # Due to https://github.com/actions/runner/issues/849, we have to use quotes
|
||||
ruby: ['2.7', '3.0', '3.1', '3.2'] # Due to https://github.com/actions/runner/issues/849, we have to use quotes
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -9,3 +9,6 @@
|
||||
log/*.log
|
||||
.byebug_history
|
||||
spec/internal
|
||||
|
||||
# macOS stuff
|
||||
.DS_Store
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2.1.0
|
||||
-----------
|
||||
- Add Rails 7.2 support (thanks to @janko)
|
||||
|
||||
2.0.1
|
||||
-----------
|
||||
- Fix a job argument error
|
||||
|
||||
330
Gemfile.lock
330
Gemfile.lock
@@ -1,213 +1,242 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
crono (2.0.0)
|
||||
crono (2.1.0)
|
||||
rails (>= 5.2.8)
|
||||
sprockets-rails
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
actioncable (7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activestorage (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
mail (>= 2.7.1)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
actionmailer (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
actionview (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (7.0.3.1)
|
||||
actionview (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
zeitwerk (~> 2.6)
|
||||
actionmailbox (7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
activejob (= 7.2.0)
|
||||
activerecord (= 7.2.0)
|
||||
activestorage (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
mail (>= 2.8.0)
|
||||
actionmailer (7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
actionview (= 7.2.0)
|
||||
activejob (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
mail (>= 2.8.0)
|
||||
rails-dom-testing (~> 2.2)
|
||||
actionpack (7.2.0)
|
||||
actionview (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
nokogiri (>= 1.8.5)
|
||||
racc
|
||||
rack (>= 2.2.4, < 3.2)
|
||||
rack-session (>= 1.0.1)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activestorage (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
rails-dom-testing (~> 2.2)
|
||||
rails-html-sanitizer (~> 1.6)
|
||||
useragent (~> 0.16)
|
||||
actiontext (7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
activerecord (= 7.2.0)
|
||||
activestorage (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
globalid (>= 0.6.0)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
actionview (7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
erubi (~> 1.11)
|
||||
rails-dom-testing (~> 2.2)
|
||||
rails-html-sanitizer (~> 1.6)
|
||||
activejob (7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
activerecord (7.0.3.1)
|
||||
activemodel (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
activestorage (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
activemodel (7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
activerecord (7.2.0)
|
||||
activemodel (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
timeout (>= 0.4.0)
|
||||
activestorage (7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
activejob (= 7.2.0)
|
||||
activerecord (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (7.0.3.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
activesupport (7.2.0)
|
||||
base64
|
||||
bigdecimal
|
||||
concurrent-ruby (~> 1.0, >= 1.3.1)
|
||||
connection_pool (>= 2.2.5)
|
||||
drb
|
||||
i18n (>= 1.6, < 2)
|
||||
logger (>= 1.4.2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
builder (3.2.4)
|
||||
securerandom (>= 0.3)
|
||||
tzinfo (~> 2.0, >= 2.0.5)
|
||||
base64 (0.2.0)
|
||||
bigdecimal (3.1.8)
|
||||
builder (3.3.0)
|
||||
byebug (11.1.3)
|
||||
combustion (1.3.6)
|
||||
activesupport (>= 3.0.0)
|
||||
railties (>= 3.0.0)
|
||||
thor (>= 0.14.6)
|
||||
concurrent-ruby (1.1.10)
|
||||
concurrent-ruby (1.3.4)
|
||||
connection_pool (2.4.1)
|
||||
crass (1.0.6)
|
||||
daemons (1.4.1)
|
||||
diff-lcs (1.5.0)
|
||||
digest (3.1.0)
|
||||
erubi (1.10.0)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
date (3.3.4)
|
||||
diff-lcs (1.5.1)
|
||||
drb (2.2.1)
|
||||
erubi (1.13.0)
|
||||
globalid (1.2.1)
|
||||
activesupport (>= 6.1)
|
||||
haml (5.2.2)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
i18n (1.12.0)
|
||||
i18n (1.14.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
loofah (2.18.0)
|
||||
io-console (0.7.2)
|
||||
irb (1.14.0)
|
||||
rdoc (>= 4.0.0)
|
||||
reline (>= 0.4.2)
|
||||
logger (1.6.0)
|
||||
loofah (2.22.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
nokogiri (>= 1.12.0)
|
||||
mail (2.8.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (1.0.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
minitest (5.16.2)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
marcel (1.0.4)
|
||||
mini_mime (1.1.5)
|
||||
minitest (5.25.1)
|
||||
mustermann (1.1.1)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
net-imap (0.2.3)
|
||||
digest
|
||||
net-imap (0.4.14)
|
||||
date
|
||||
net-protocol
|
||||
strscan
|
||||
net-pop (0.1.1)
|
||||
digest
|
||||
net-pop (0.1.2)
|
||||
net-protocol (0.2.2)
|
||||
timeout
|
||||
net-smtp (0.5.0)
|
||||
net-protocol
|
||||
timeout
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
net-smtp (0.3.1)
|
||||
digest
|
||||
net-protocol
|
||||
timeout
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.7-arm64-darwin)
|
||||
nio4r (2.7.3)
|
||||
nokogiri (1.16.7-arm64-darwin)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.13.7-x86_64-darwin)
|
||||
nokogiri (1.16.7-x86_64-darwin)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.13.7-x86_64-linux)
|
||||
nokogiri (1.16.7-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
racc (1.6.0)
|
||||
rack (2.2.4)
|
||||
propshaft (0.9.1)
|
||||
actionpack (>= 7.0.0)
|
||||
activesupport (>= 7.0.0)
|
||||
rack
|
||||
railties (>= 7.0.0)
|
||||
psych (5.1.2)
|
||||
stringio
|
||||
racc (1.8.1)
|
||||
rack (2.2.9)
|
||||
rack-protection (2.2.0)
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (7.0.3.1)
|
||||
actioncable (= 7.0.3.1)
|
||||
actionmailbox (= 7.0.3.1)
|
||||
actionmailer (= 7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
actiontext (= 7.0.3.1)
|
||||
actionview (= 7.0.3.1)
|
||||
activejob (= 7.0.3.1)
|
||||
activemodel (= 7.0.3.1)
|
||||
activerecord (= 7.0.3.1)
|
||||
activestorage (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
rack-session (1.0.2)
|
||||
rack (< 3)
|
||||
rack-test (2.1.0)
|
||||
rack (>= 1.3)
|
||||
rackup (1.0.0)
|
||||
rack (< 3)
|
||||
webrick
|
||||
rails (7.2.0)
|
||||
actioncable (= 7.2.0)
|
||||
actionmailbox (= 7.2.0)
|
||||
actionmailer (= 7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
actiontext (= 7.2.0)
|
||||
actionview (= 7.2.0)
|
||||
activejob (= 7.2.0)
|
||||
activemodel (= 7.2.0)
|
||||
activerecord (= 7.2.0)
|
||||
activestorage (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 7.0.3.1)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
railties (= 7.2.0)
|
||||
rails-dom-testing (2.2.0)
|
||||
activesupport (>= 5.0.0)
|
||||
minitest
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.3)
|
||||
loofah (~> 2.3)
|
||||
railties (7.0.3.1)
|
||||
actionpack (= 7.0.3.1)
|
||||
activesupport (= 7.0.3.1)
|
||||
method_source
|
||||
rails-html-sanitizer (1.6.0)
|
||||
loofah (~> 2.21)
|
||||
nokogiri (~> 1.14)
|
||||
railties (7.2.0)
|
||||
actionpack (= 7.2.0)
|
||||
activesupport (= 7.2.0)
|
||||
irb (~> 1.13)
|
||||
rackup (>= 1.0.0)
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
zeitwerk (~> 2.5)
|
||||
rake (13.0.6)
|
||||
rspec (3.11.0)
|
||||
rspec-core (~> 3.11.0)
|
||||
rspec-expectations (~> 3.11.0)
|
||||
rspec-mocks (~> 3.11.0)
|
||||
rspec-core (3.11.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-expectations (3.11.0)
|
||||
thor (~> 1.0, >= 1.2.2)
|
||||
zeitwerk (~> 2.6)
|
||||
rake (13.2.1)
|
||||
rdoc (6.7.0)
|
||||
psych (>= 4.0.0)
|
||||
reline (0.5.9)
|
||||
io-console (~> 0.5)
|
||||
rspec (3.13.0)
|
||||
rspec-core (~> 3.13.0)
|
||||
rspec-expectations (~> 3.13.0)
|
||||
rspec-mocks (~> 3.13.0)
|
||||
rspec-core (3.13.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-expectations (3.13.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-mocks (3.11.1)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-mocks (3.13.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-rails (5.1.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
rspec-core (~> 3.10)
|
||||
rspec-expectations (~> 3.10)
|
||||
rspec-mocks (~> 3.10)
|
||||
rspec-support (~> 3.10)
|
||||
rspec-support (3.11.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-rails (6.1.4)
|
||||
actionpack (>= 6.1)
|
||||
activesupport (>= 6.1)
|
||||
railties (>= 6.1)
|
||||
rspec-core (~> 3.13)
|
||||
rspec-expectations (~> 3.13)
|
||||
rspec-mocks (~> 3.13)
|
||||
rspec-support (~> 3.13)
|
||||
rspec-support (3.13.1)
|
||||
ruby2_keywords (0.0.5)
|
||||
securerandom (0.3.1)
|
||||
sinatra (2.2.0)
|
||||
mustermann (~> 1.0)
|
||||
rack (~> 2.2)
|
||||
rack-protection (= 2.2.0)
|
||||
tilt (~> 2.0)
|
||||
sprockets (4.1.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.4.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
sqlite3 (1.4.2)
|
||||
strscan (3.0.3)
|
||||
sqlite3 (2.0.4-arm64-darwin)
|
||||
sqlite3 (2.0.4-x86_64-darwin)
|
||||
sqlite3 (2.0.4-x86_64-linux-gnu)
|
||||
stringio (3.1.1)
|
||||
temple (0.8.2)
|
||||
thor (1.2.1)
|
||||
thor (1.3.1)
|
||||
tilt (2.0.10)
|
||||
timecop (0.9.5)
|
||||
timeout (0.3.0)
|
||||
tzinfo (2.0.4)
|
||||
timeout (0.4.1)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
websocket-driver (0.7.5)
|
||||
useragent (0.16.10)
|
||||
webrick (1.8.1)
|
||||
websocket-driver (0.7.6)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
zeitwerk (2.6.0)
|
||||
zeitwerk (2.6.17)
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin-21
|
||||
arm64-darwin-23
|
||||
arm64-darwin-24
|
||||
x86_64-darwin-21
|
||||
x86_64-darwin-22
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
@@ -217,6 +246,7 @@ DEPENDENCIES
|
||||
crono!
|
||||
daemons
|
||||
haml
|
||||
propshaft
|
||||
rack-test
|
||||
rake (>= 10.0)
|
||||
rspec (>= 3.0)
|
||||
@@ -226,4 +256,4 @@ DEPENDENCIES
|
||||
timecop (>= 0.7)
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.14
|
||||
2.4.4
|
||||
|
||||
20
README.md
20
README.md
@@ -40,7 +40,7 @@ Now you are ready to move forward to create a job and schedule it.
|
||||
|
||||
### The basic usage
|
||||
|
||||
You can specigy a simple job by editing ```config/cronotab.rb```:
|
||||
You can specify a simple job by editing ```config/cronotab.rb```:
|
||||
|
||||
```ruby
|
||||
# config/cronotab.rb
|
||||
@@ -166,7 +166,7 @@ Usage: crono [options] [start|stop|restart|run]
|
||||
-e, --environment ENV Application environment (Default: development)
|
||||
```
|
||||
|
||||
#### Run as a daemon
|
||||
### Run as a daemon
|
||||
|
||||
To run Crono as a daemon, please add to your Gemfile:
|
||||
|
||||
@@ -194,7 +194,7 @@ Rails.application.routes.draw do
|
||||
|
||||
Access management and other questions described in the [wiki](https://github.com/plashchynski/crono/wiki/Web-UI).
|
||||
|
||||
#### Known issues
|
||||
## Known issues
|
||||
|
||||
For Rails 5, in case of the errors:
|
||||
```
|
||||
@@ -207,6 +207,20 @@ See the related issue [#52](https://github.com/plashchynski/crono/issues/52)
|
||||
|
||||
Use the `capistrano-crono` gem ([github](https://github.com/plashchynski/capistrano-crono/)).
|
||||
|
||||
## Development
|
||||
|
||||
### Running tests
|
||||
|
||||
To run the tests, you need to have a database. You can use the default SQLite database:
|
||||
|
||||
bundle exec rspec
|
||||
|
||||
### Publishing
|
||||
|
||||
To publish a new version, you need to update the version number in `lib/crono/version.rb` and then run:
|
||||
|
||||
bundle exec rake release
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
|
||||
s.require_paths = ["lib"]
|
||||
|
||||
s.add_dependency 'rails', '>= 5.2.8'
|
||||
s.add_dependency 'sprockets-rails'
|
||||
s.add_development_dependency 'rake', '>= 13.0.1'
|
||||
s.add_development_dependency 'bundler', '>= 2'
|
||||
s.add_development_dependency 'rspec', '>= 3.10'
|
||||
@@ -30,4 +29,5 @@ Gem::Specification.new do |s|
|
||||
s.add_development_dependency 'haml'
|
||||
s.add_development_dependency 'rack-test'
|
||||
s.add_development_dependency 'daemons'
|
||||
s.add_development_dependency 'propshaft'
|
||||
end
|
||||
|
||||
@@ -3,7 +3,6 @@ module Crono
|
||||
end
|
||||
|
||||
require 'rails'
|
||||
require 'sprockets/railtie'
|
||||
require 'active_support/all'
|
||||
require 'crono/version'
|
||||
require 'crono/engine'
|
||||
|
||||
@@ -3,7 +3,11 @@ module Crono
|
||||
isolate_namespace Crono
|
||||
|
||||
initializer 'crono.assets.precompile' do |app|
|
||||
if app.config.respond_to?(:assets)
|
||||
app.config.assets.precompile += %w( crono/application.css crono/materialize.min.css )
|
||||
else
|
||||
fail "Crono requires either Propshaft or Sprockets to be installed."
|
||||
end
|
||||
end
|
||||
|
||||
config.generators do |g|
|
||||
|
||||
@@ -47,7 +47,7 @@ module Crono
|
||||
@semaphore.synchronize do
|
||||
update_model
|
||||
clear_job_log
|
||||
ActiveRecord::Base.clear_active_connections!
|
||||
ActiveRecord::Base.connection_handler.clear_active_connections!
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Crono
|
||||
VERSION = '2.0.1'
|
||||
VERSION = '2.1.0'
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -23,7 +23,7 @@ ActiveRecord::Base.logger = Logger.new($stdout)
|
||||
|
||||
ActiveRecord::Base.establish_connection(
|
||||
adapter: 'sqlite3',
|
||||
database: ':memory'
|
||||
database: ':memory:'
|
||||
)
|
||||
ActiveRecord::Schema.define do
|
||||
require_relative '../lib/generators/crono/install/templates/migrations/create_crono_jobs.rb'
|
||||
|
||||
Reference in New Issue
Block a user