diff --git a/Gemfile.lock b/Gemfile.lock index 9c43d96..a634fa3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,8 @@ PATH remote: . specs: crono (1.1.2) - rails (>= 4.0) + rails (>= 5.2.8) + GEM remote: https://rubygems.org/ @@ -61,6 +62,12 @@ GEM marcel (~> 0.3.1) mimemagic (~> 0.3.2) activesupport (6.1.2.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 (>= 1.6, < 2) minitest (>= 5.1) @@ -168,16 +175,66 @@ PLATFORMS arm64-darwin-20 DEPENDENCIES + 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 (1.10.0) + concurrent-ruby (~> 1.0) + minitest (5.15.0) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + rack (2.2.3.1) + rack-protection (2.2.0) + rack + 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.11.0) + rspec-mocks (3.11.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) + 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.4.2) + temple (0.8.2) + tilt (2.0.10) + timecop (0.9.5) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + +PLATFORMS + arm64-darwin-21 + +DEPENDENCIES + bundler (>= 2) byebug combustion (~> 1.3) crono! daemons rack-test - rake (>= 10.0) - rspec (>= 3.0) - rspec-rails (>= 4.0) + rake (>= 13.0.1) + rspec (>= 3.10) + sinatra sqlite3 timecop (>= 0.7) BUNDLED WITH - 2.2.7 + 2.3.14 + diff --git a/README.md b/README.md index c8e629f..cdfeb1d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -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) @@ -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 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 9e046b4..a3795c2 100644 --- a/crono.gemspec +++ b/crono.gemspec @@ -1,21 +1,32 @@ +# -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) require_relative 'lib/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 = Dir['{app,config,db,lib}/**/*', 'LICENSE', 'Rakefile', 'README.rdoc'] - spec.bindir = 'exe' # http://bundler.io/blog/2015/03/20/moving-bins-to-exe.html - spec.executables = ['crono'] - spec.require_paths = ['lib'] - spec.test_files = Dir['spec/**/*'] + s.files = Dir['{app,config,db,lib}/**/*', 'LICENSE', 'Rakefile', 'README.rdoc'] + s.test_files = Dir['spec/**/*'] + s.executables = ['crono'] + s.require_paths = ["lib"] - spec.add_dependency 'rails', '>= 4.0' + s.add_dependency 'rails', '>= 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' + s.add_development_dependency 'sinatra' + s.add_development_dependency 'haml' + s.add_development_dependency 'rack-test' + s.add_development_dependency 'daemons' end 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