From 11350e83d965fd5d9d62324016434c4e5f1123d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20G=C3=B3mez?= Date: Wed, 11 Apr 2018 10:50:45 -0300 Subject: [PATCH 01/11] fix: rails 4.0.x Patch time_atts when `compact` is not defined in Hash class. --- lib/crono/period.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/crono/period.rb b/lib/crono/period.rb index 802145e..ffa9b62 100644 --- a/lib/crono/period.rb +++ b/lib/crono/period.rb @@ -78,7 +78,8 @@ module Crono end def time_atts - { hour: @at_hour, min: @at_min }.compact + atts = { hour: @at_hour, min: @at_min } + atts.respond_to?(:compact) ? atts.compact : atts.select { |_, value| !value.nil? } end end end From 87b5726919aa774040f7c671b87b9d2d7a7e9657 Mon Sep 17 00:00:00 2001 From: Chris Seelus Date: Wed, 10 Feb 2021 16:57:48 +0100 Subject: [PATCH 02/11] Use Ruby 3 conversion kwargs --- lib/crono/job.rb | 2 +- lib/crono/performer_proxy.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/crono/job.rb b/lib/crono/job.rb index be8ee1a..342bf09 100644 --- a/lib/crono/job.rb +++ b/lib/crono/job.rb @@ -76,7 +76,7 @@ module Crono end def perform_job - performer.new.perform *JSON.parse(job_args) + performer.new.perform JSON.parse(job_args) rescue StandardError => e handle_job_fail(e) else diff --git a/lib/crono/performer_proxy.rb b/lib/crono/performer_proxy.rb index 3c1d75e..7bf2699 100644 --- a/lib/crono/performer_proxy.rb +++ b/lib/crono/performer_proxy.rb @@ -7,8 +7,8 @@ module Crono @job_args = job_args end - def every(period, *args) - @job = Job.new(@performer, Period.new(period, *args), @job_args, @options) + def every(period, **options) + @job = Job.new(@performer, Period.new(period, **options), @job_args, @options) @scheduler.add_job(@job) self end From a8e80b6160c7fd684ed6a54926d77b98cfaa5ddf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 21:13:19 +0000 Subject: [PATCH 03/11] Bump sinatra from 1.4.7 to 2.2.0 Bumps [sinatra](https://github.com/sinatra/sinatra) from 1.4.7 to 2.2.0. - [Release notes](https://github.com/sinatra/sinatra/releases) - [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinatra/sinatra/compare/v1.4.7...v2.2.0) --- updated-dependencies: - dependency-name: sinatra dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ed889d8..970c5af 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,8 +28,10 @@ GEM tilt i18n (0.7.0) minitest (5.9.1) - rack (1.6.5) - rack-protection (1.5.3) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + rack (2.2.3) + rack-protection (2.2.0) rack rack-test (0.6.3) rack (>= 1.0) @@ -47,13 +49,15 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) + ruby2_keywords (0.0.5) + sinatra (2.2.0) + mustermann (~> 1.0) + rack (~> 2.2) + rack-protection (= 2.2.0) + tilt (~> 2.0) sqlite3 (1.3.12) thread_safe (0.3.5) - tilt (2.0.5) + tilt (2.0.10) timecop (0.8.1) tzinfo (1.2.2) thread_safe (~> 0.1) From 757310951907bfa299cf1d28e21a8a3485c7cb68 Mon Sep 17 00:00:00 2001 From: Dzmitry Plashchynski Date: Fri, 20 May 2022 12:40:54 +0300 Subject: [PATCH 04/11] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0df379b..022476f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Crono — Job scheduler for Rails +:no_entry: [DEPRECATED] Crono — Job scheduler for Rails ------------------------ [![Gem Version](https://badge.fury.io/rb/crono.svg)](http://badge.fury.io/rb/crono) [![Build Status](https://travis-ci.org/plashchynski/crono.svg?branch=master)](https://travis-ci.org/plashchynski/crono) @@ -7,6 +7,9 @@ Crono — Job scheduler for Rails Crono is a time-based background job scheduler daemon (just like Cron) for Ruby on Rails. +## Deprecated + +Unfortunately, I don't have time to support this project. ## The Purpose From 0391dac2e944c6f997febda3e347475fc7ab7038 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 May 2022 09:42:13 +0000 Subject: [PATCH 05/11] Bump activesupport from 5.0.0.1 to 7.0.3 Bumps [activesupport](https://github.com/rails/rails) from 5.0.0.1 to 7.0.3. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.0.3/activesupport/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v5.0.0.1...v7.0.3) --- updated-dependencies: - dependency-name: activesupport dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 970c5af..d203499 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,26 +8,25 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (5.0.0.1) - activesupport (= 5.0.0.1) - activerecord (5.0.0.1) - activemodel (= 5.0.0.1) - activesupport (= 5.0.0.1) - arel (~> 7.0) - activesupport (5.0.0.1) + activemodel (7.0.3) + activesupport (= 7.0.3) + activerecord (7.0.3) + activemodel (= 7.0.3) + activesupport (= 7.0.3) + activesupport (7.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (7.1.4) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) byebug (9.0.6) - concurrent-ruby (1.0.2) + concurrent-ruby (1.1.10) daemons (1.2.4) diff-lcs (1.2.5) haml (4.0.7) tilt - i18n (0.7.0) - minitest (5.9.1) + i18n (1.10.0) + concurrent-ruby (~> 1.0) + minitest (5.15.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) rack (2.2.3) @@ -56,11 +55,10 @@ GEM rack-protection (= 2.2.0) tilt (~> 2.0) sqlite3 (1.3.12) - thread_safe (0.3.5) tilt (2.0.10) timecop (0.8.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) PLATFORMS ruby From 610046d0feb7ab113b2c8d02464468cf12eab65b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 May 2022 09:42:14 +0000 Subject: [PATCH 06/11] Bump activerecord from 5.0.0.1 to 7.0.3 Bumps [activerecord](https://github.com/rails/rails) from 5.0.0.1 to 7.0.3. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.0.3/activerecord/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v5.0.0.1...v7.0.3) --- updated-dependencies: - dependency-name: activerecord dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 970c5af..d203499 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,26 +8,25 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (5.0.0.1) - activesupport (= 5.0.0.1) - activerecord (5.0.0.1) - activemodel (= 5.0.0.1) - activesupport (= 5.0.0.1) - arel (~> 7.0) - activesupport (5.0.0.1) + activemodel (7.0.3) + activesupport (= 7.0.3) + activerecord (7.0.3) + activemodel (= 7.0.3) + activesupport (= 7.0.3) + activesupport (7.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (7.1.4) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) byebug (9.0.6) - concurrent-ruby (1.0.2) + concurrent-ruby (1.1.10) daemons (1.2.4) diff-lcs (1.2.5) haml (4.0.7) tilt - i18n (0.7.0) - minitest (5.9.1) + i18n (1.10.0) + concurrent-ruby (~> 1.0) + minitest (5.15.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) rack (2.2.3) @@ -56,11 +55,10 @@ GEM rack-protection (= 2.2.0) tilt (~> 2.0) sqlite3 (1.3.12) - thread_safe (0.3.5) tilt (2.0.10) timecop (0.8.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) PLATFORMS ruby From a6f8354e898287de1947792157c6f7a7ac3ebbb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 17:59:38 +0000 Subject: [PATCH 07/11] Bump rack from 2.2.3 to 2.2.3.1 Bumps [rack](https://github.com/rack/rack) from 2.2.3 to 2.2.3.1. - [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.3...2.2.3.1) --- updated-dependencies: - dependency-name: rack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 970c5af..1a173dc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,7 +30,7 @@ GEM minitest (5.9.1) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - rack (2.2.3) + rack (2.2.3.1) rack-protection (2.2.0) rack rack-test (0.6.3) From e6f5e4299bb2dfb8872b3f2235025246ee85b48f Mon Sep 17 00:00:00 2001 From: Dzmitry Plashchynski Date: Sun, 29 May 2022 19:07:44 +0300 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 022476f..72236cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -:no_entry: [DEPRECATED] Crono — Job scheduler for Rails +Job scheduler for Rails ------------------------ [![Gem Version](https://badge.fury.io/rb/crono.svg)](http://badge.fury.io/rb/crono) [![Build Status](https://travis-ci.org/plashchynski/crono.svg?branch=master)](https://travis-ci.org/plashchynski/crono) From ae78de420ff1d14048b80cd75bc1b1ba3b249e95 Mon Sep 17 00:00:00 2001 From: Dzmitry Plashchynski Date: Sun, 29 May 2022 19:44:44 +0300 Subject: [PATCH 09/11] Update crono.gemspec --- Gemfile.lock | 2 +- bin/console | 14 ------------ {exe => bin}/crono | 0 bin/setup | 7 ------ crono.gemspec | 55 +++++++++++++++++++++++----------------------- 5 files changed, 28 insertions(+), 50 deletions(-) delete mode 100755 bin/console rename {exe => bin}/crono (100%) delete mode 100644 bin/setup diff --git a/Gemfile.lock b/Gemfile.lock index 970c5af..1b271ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,7 +55,7 @@ GEM rack (~> 2.2) rack-protection (= 2.2.0) tilt (~> 2.0) - sqlite3 (1.3.12) + sqlite3 (1.4.2) thread_safe (0.3.5) tilt (2.0.10) timecop (0.8.1) diff --git a/bin/console b/bin/console deleted file mode 100755 index db0b023..0000000 --- a/bin/console +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby - -require "bundler/setup" -require "crono" - -# You can add fixtures and/or initialization code here to make experimenting -# with your gem easier. You can also use a different console, if you like. - -# (If you use this, don't forget to add pry to your Gemfile!) -# require "pry" -# Pry.start - -require "irb" -IRB.start diff --git a/exe/crono b/bin/crono similarity index 100% rename from exe/crono rename to bin/crono diff --git a/bin/setup b/bin/setup deleted file mode 100644 index b65ed50..0000000 --- a/bin/setup +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -euo pipefail -IFS=$'\n\t' - -bundle install - -# Do any other automated setup that you need to do here diff --git a/crono.gemspec b/crono.gemspec index 4e153f5..1c04fd8 100644 --- a/crono.gemspec +++ b/crono.gemspec @@ -1,34 +1,33 @@ -# coding: utf-8 -lib = File.expand_path('../lib', __FILE__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +# -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) require 'crono/version' -Gem::Specification.new do |spec| - spec.name = 'crono' - spec.version = Crono::VERSION - spec.authors = ['Dzmitry Plashchynski'] - spec.email = ['plashchynski@gmail.com'] +Gem::Specification.new do |s| + s.name = 'crono' + s.version = Crono::VERSION + s.authors = ['Dzmitry Plashchynski'] + s.email = ['plashchynski@gmail.com'] - spec.summary = 'Job scheduler for Rails' - spec.description = 'A time-based background job scheduler daemon (just like Cron) for Rails' - spec.homepage = 'https://github.com/plashchynski/crono' - spec.license = 'Apache-2.0' + s.summary = 'Job scheduler for Rails' + s.description = 'A time-based background job scheduler daemon (just like Cron) for Rails' + s.homepage = 'https://github.com/plashchynski/crono' + s.license = 'Apache-2.0' - spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - spec.bindir = 'exe' # http://bundler.io/blog/2015/03/20/moving-bins-to-exe.html - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = ['lib'] + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- spec/*`.split("\n") + s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + s.require_paths = ["lib"] - spec.add_runtime_dependency 'activesupport', '>= 4.0' - spec.add_runtime_dependency 'activerecord', '>= 4.0' - spec.add_development_dependency 'rake', '>= 10.0' - spec.add_development_dependency 'bundler', '>= 1.0.0' - spec.add_development_dependency 'rspec', '>= 3.0' - spec.add_development_dependency 'timecop', '>= 0.7' - spec.add_development_dependency 'sqlite3' - spec.add_development_dependency 'byebug' - spec.add_development_dependency 'sinatra' - spec.add_development_dependency 'haml' - spec.add_development_dependency 'rack-test' - spec.add_development_dependency 'daemons' + s.add_runtime_dependency 'activesupport', '>= 4.0' + s.add_runtime_dependency 'activerecord', '>= 4.0' + s.add_development_dependency 'rake', '>= 10.0' + s.add_development_dependency 'bundler', '>= 1.0.0' + s.add_development_dependency 'rspec', '>= 3.0' + s.add_development_dependency 'timecop', '>= 0.7' + s.add_development_dependency 'sqlite3' + s.add_development_dependency 'byebug' + s.add_development_dependency 'sinatra' + s.add_development_dependency 'haml' + s.add_development_dependency 'rack-test' + s.add_development_dependency 'daemons' end From 8ea181397e5923cdc3fab64846c06a692ec860bd Mon Sep 17 00:00:00 2001 From: Dzmitry Plashchynski Date: Sun, 29 May 2022 20:22:19 +0300 Subject: [PATCH 10/11] Bundle with bundler 2 --- Gemfile.lock | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1b271ed..796f9af 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,47 +8,47 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (5.0.0.1) - activesupport (= 5.0.0.1) - activerecord (5.0.0.1) - activemodel (= 5.0.0.1) - activesupport (= 5.0.0.1) - arel (~> 7.0) - activesupport (5.0.0.1) + activemodel (7.0.3) + activesupport (= 7.0.3) + activerecord (7.0.3) + activemodel (= 7.0.3) + activesupport (= 7.0.3) + activesupport (7.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (7.1.4) - byebug (9.0.6) - concurrent-ruby (1.0.2) - daemons (1.2.4) - diff-lcs (1.2.5) - haml (4.0.7) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + byebug (11.1.3) + concurrent-ruby (1.1.10) + daemons (1.4.1) + diff-lcs (1.5.0) + haml (5.2.2) + temple (>= 0.8.0) tilt - i18n (0.7.0) - minitest (5.9.1) + i18n (1.10.0) + concurrent-ruby (~> 1.0) + minitest (5.15.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - rack (2.2.3) + rack (2.2.3.1) rack-protection (2.2.0) rack - rack-test (0.6.3) - rack (>= 1.0) - rake (11.3.0) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rack-test (1.1.0) + rack (>= 1.0, < 3) + 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.5.0) - rspec-mocks (3.5.0) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) ruby2_keywords (0.0.5) sinatra (2.2.0) mustermann (~> 1.0) @@ -56,14 +56,14 @@ GEM rack-protection (= 2.2.0) tilt (~> 2.0) sqlite3 (1.4.2) - thread_safe (0.3.5) + temple (0.8.2) tilt (2.0.10) - timecop (0.8.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) + timecop (0.9.5) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) PLATFORMS - ruby + arm64-darwin-21 DEPENDENCIES bundler (>= 1.0.0) @@ -79,4 +79,4 @@ DEPENDENCIES timecop (>= 0.7) BUNDLED WITH - 1.13.6 + 2.3.14 From 9e8a6f0e05e129fa58d50c4a3c3a11eb80c2eabb Mon Sep 17 00:00:00 2001 From: Dzmitry Plashchynski Date: Sun, 29 May 2022 20:24:45 +0300 Subject: [PATCH 11/11] Update dependencies --- Gemfile.lock | 10 +++++----- crono.gemspec | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 796f9af..7bdd34d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,8 +2,8 @@ PATH remote: . specs: crono (1.1.2) - activerecord (>= 4.0) - activesupport (>= 4.0) + activerecord (>= 5.2.8) + activesupport (>= 5.2.8) GEM remote: https://rubygems.org/ @@ -66,14 +66,14 @@ PLATFORMS arm64-darwin-21 DEPENDENCIES - bundler (>= 1.0.0) + bundler (>= 2) byebug crono! daemons haml rack-test - rake (>= 10.0) - rspec (>= 3.0) + rake (>= 13.0.1) + rspec (>= 3.10) sinatra sqlite3 timecop (>= 0.7) diff --git a/crono.gemspec b/crono.gemspec index 1c04fd8..f26e87a 100644 --- a/crono.gemspec +++ b/crono.gemspec @@ -18,11 +18,11 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_runtime_dependency 'activesupport', '>= 4.0' - s.add_runtime_dependency 'activerecord', '>= 4.0' - s.add_development_dependency 'rake', '>= 10.0' - s.add_development_dependency 'bundler', '>= 1.0.0' - s.add_development_dependency 'rspec', '>= 3.0' + s.add_runtime_dependency 'activesupport', '>= 5.2.8' + s.add_runtime_dependency 'activerecord', '>= 5.2.8' + s.add_development_dependency 'rake', '>= 13.0.1' + s.add_development_dependency 'bundler', '>= 2' + s.add_development_dependency 'rspec', '>= 3.10' s.add_development_dependency 'timecop', '>= 0.7' s.add_development_dependency 'sqlite3' s.add_development_dependency 'byebug'