Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
f480c47dfc Bump rack from 2.2.4 to 2.2.6.3
Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.3.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.4...v2.2.6.3)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 01:34:33 +00:00
12 changed files with 159 additions and 213 deletions

View File

@@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: ['2.7', '3.0', '3.1', '3.2'] # Due to https://github.com/actions/runner/issues/849, we have to use quotes
ruby: ['2.7', '3.0', '3.1'] # Due to https://github.com/actions/runner/issues/849, we have to use quotes
runs-on: ${{ matrix.os }}

3
.gitignore vendored
View File

@@ -9,6 +9,3 @@
log/*.log
.byebug_history
spec/internal
# macOS stuff
.DS_Store

View File

@@ -1,7 +1,3 @@
2.1.0
-----------
- Add Rails 7.2 support (thanks to @janko)
2.0.1
-----------
- Fix a job argument error

View File

@@ -1,242 +1,213 @@
PATH
remote: .
specs:
crono (2.1.0)
crono (2.0.1)
rails (>= 5.2.8)
sprockets-rails
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.0)
actionpack (= 7.2.0)
activesupport (= 7.2.0)
actioncable (7.0.3.1)
actionpack (= 7.0.3.1)
activesupport (= 7.0.3.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
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)
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)
rack-test (>= 0.6.3)
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)
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)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.0)
activesupport (= 7.2.0)
actionview (7.0.3.1)
activesupport (= 7.0.3.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.0)
activesupport (= 7.2.0)
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)
globalid (>= 0.3.6)
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)
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)
marcel (~> 1.0)
activesupport (7.2.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
mini_mime (>= 1.1.0)
activesupport (7.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.3.0)
tzinfo (~> 2.0)
builder (3.2.4)
byebug (11.1.3)
combustion (1.3.6)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
thor (>= 0.14.6)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
concurrent-ruby (1.1.10)
crass (1.0.6)
daemons (1.4.1)
date (3.3.4)
diff-lcs (1.5.1)
drb (2.2.1)
erubi (1.13.0)
globalid (1.2.1)
activesupport (>= 6.1)
diff-lcs (1.5.0)
digest (3.1.0)
erubi (1.10.0)
globalid (1.0.0)
activesupport (>= 5.0)
haml (5.2.2)
temple (>= 0.8.0)
tilt
i18n (1.14.5)
i18n (1.12.0)
concurrent-ruby (~> 1.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)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
mini_mime (1.1.5)
minitest (5.25.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.16.2)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
net-imap (0.4.14)
date
net-imap (0.2.3)
digest
net-protocol
strscan
net-pop (0.1.1)
digest
net-protocol
net-pop (0.1.2)
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol (0.1.3)
timeout
net-smtp (0.3.1)
digest
net-protocol
nio4r (2.7.3)
nokogiri (1.16.7-arm64-darwin)
timeout
nio4r (2.5.8)
nokogiri (1.13.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
nokogiri (1.13.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.13.7-x86_64-linux)
racc (~> 1.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)
racc (1.6.0)
rack (2.2.6.3)
rack-protection (2.2.0)
rack
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)
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)
bundler (>= 1.15.0)
railties (= 7.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
railties (= 7.0.3.1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
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)
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
rake (>= 12.2)
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)
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)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.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)
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)
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)
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)
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.4)
temple (0.8.2)
thor (1.3.1)
thor (1.2.1)
tilt (2.0.10)
timecop (0.9.5)
timeout (0.4.1)
tzinfo (2.0.6)
timeout (0.3.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
useragent (0.16.10)
webrick (1.8.1)
websocket-driver (0.7.6)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.17)
zeitwerk (2.6.0)
PLATFORMS
arm64-darwin-21
arm64-darwin-23
arm64-darwin-24
x86_64-darwin-21
x86_64-darwin-22
x86_64-linux
DEPENDENCIES
@@ -246,7 +217,6 @@ DEPENDENCIES
crono!
daemons
haml
propshaft
rack-test
rake (>= 10.0)
rspec (>= 3.0)
@@ -256,4 +226,4 @@ DEPENDENCIES
timecop (>= 0.7)
BUNDLED WITH
2.4.4
2.3.14

View File

@@ -40,7 +40,7 @@ Now you are ready to move forward to create a job and schedule it.
### The basic usage
You can specify a simple job by editing ```config/cronotab.rb```:
You can specigy 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,20 +207,6 @@ 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

View File

@@ -19,6 +19,7 @@ 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'
@@ -29,5 +30,4 @@ 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

View File

@@ -3,6 +3,7 @@ module Crono
end
require 'rails'
require 'sprockets/railtie'
require 'active_support/all'
require 'crono/version'
require 'crono/engine'

View File

@@ -3,11 +3,7 @@ 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
app.config.assets.precompile += %w( crono/application.css crono/materialize.min.css )
end
config.generators do |g|

View File

@@ -47,7 +47,7 @@ module Crono
@semaphore.synchronize do
update_model
clear_job_log
ActiveRecord::Base.connection_handler.clear_active_connections!
ActiveRecord::Base.clear_active_connections!
end
end

View File

@@ -1,3 +1,3 @@
module Crono
VERSION = '2.1.0'
VERSION = '2.0.1'
end

BIN
spec/internal/:memory Normal file

Binary file not shown.

View File

@@ -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'