delayed_cron_job 0.7.1 → 0.7.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
  SHA1:
3
- metadata.gz: ef66952c36796b2dfa66c343a31631d061d09bd1
4
- data.tar.gz: fba9ad110c34d1e475bc8057d818b9d0c0fa02d4
3
+ metadata.gz: 2b6628291d42c1bc4beef0cb884fb06474d5fea7
4
+ data.tar.gz: 3676a138edd3bece7b144579d4c013e0311b40bb
5
5
  SHA512:
6
- metadata.gz: da230b6a7fef72f96129ff81f32f8e1345b025a6f0b54cc6bcc482d44a11e823480a2f3a0715c46687a98226d8f9c7e210ccf3f6892b08723ce6f78fd884e498
7
- data.tar.gz: 150cd81fe161e5cd030a99924345902e47788877c861db22975ad6db80aa9eeb593e09abbd11a67c35054eb13603eddcb8313b85f4698368e78e879e0e1229ec
6
+ metadata.gz: 3b4856da97ea1a3f57d085f4df9bace1322d6d02ebb7835a50ddf64c469bbcd30c15a93f80d906a78955b6e6e743f5ccf2b02f3f7628245e410e5b377f8c33d9
7
+ data.tar.gz: a8fb3f19c7096e2d800bef4a7824e6f8d7e28ea420eae2764664ca28f2c6c7b9729d1bbaa7957740a7277373a43d546f244d42d871041e4103c57dbe6ecf06dd
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Pascal Zumkehr
1
+ Copyright (c) 2014-2017 Pascal Zumkehr
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  # Delayed::Cron::Job
2
2
 
3
+ {<img src="https://secure.travis-ci.org/codez/delayed_cron_job.png" />}[http://travis-ci.org/codez/delayed_cron_job]
4
+
3
5
  Delayed::Cron::Job is an extension to Delayed::Job that allows you to set
4
6
  cron expressions for your jobs to run repeatedly.
5
7
 
6
8
  ## Installation
7
9
 
8
- Add this line to your application's Gemfile:
10
+ Add the following line to your application's Gemfile. Add it after the lines for all other `delayed_job*` gems so the gem can properly integrate with the Delayed::Job code.
9
11
 
10
12
  gem 'delayed_cron_job'
11
13
 
@@ -36,7 +38,7 @@ Any crontab compatible cron expressions are supported (see `man 5 crontab`).
36
38
  The credits for the `Cronline` class used go to
37
39
  [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler).
38
40
 
39
- ## Details
41
+ ## Details
40
42
 
41
43
  The initial `run_at` value is computed during the `#enqueue` method call.
42
44
  If you create `Delayed::Job` database entries directly, make sure to set
@@ -65,3 +67,8 @@ jobs.
65
67
  3. Commit your changes (`git commit -am 'Add some feature'`)
66
68
  4. Push to the branch (`git push origin my-new-feature`)
67
69
  5. Create a new Pull Request
70
+
71
+ ## License
72
+
73
+ Delayed::Cron::Job is released under the terms of the MIT License.
74
+ Copyright 2014-2017 Pascal Zumkehr. See LICENSE for further information.
@@ -5,6 +5,14 @@ require 'delayed_cron_job/plugin'
5
5
  require 'delayed_cron_job/version'
6
6
  require 'delayed_cron_job/backend/updatable_cron'
7
7
 
8
+ begin
9
+ require 'delayed_job_active_record'
10
+ rescue LoadError; end
11
+
12
+ begin
13
+ require 'delayed_job_mongoid'
14
+ rescue LoadError; end
15
+
8
16
  module DelayedCronJob
9
17
 
10
18
  end
@@ -74,7 +74,7 @@ module DelayedCronJob
74
74
 
75
75
  raise ArgumentError.new(
76
76
  "invalid cronline: '#{line}'"
77
- ) if es && es.find { |e| ! e.is_a?(Fixnum) }
77
+ ) if es && es.find { |e| ! e.is_a?(Integer) }
78
78
  end
79
79
  end
80
80
 
@@ -1,3 +1,3 @@
1
1
  module DelayedCronJob
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
@@ -12,11 +12,22 @@ module DelayedJob
12
12
  self.source_paths << File.join(File.dirname(__FILE__), 'templates')
13
13
 
14
14
  def create_migration_file
15
- migration_template('cron_migration.rb', 'db/migrate/add_cron_to_delayed_jobs.rb')
15
+ migration_template('cron_migration.rb',
16
+ 'db/migrate/add_cron_to_delayed_jobs.rb',
17
+ migration_version: migration_version)
16
18
  end
17
19
 
18
20
  def self.next_migration_number(dirname)
19
21
  ActiveRecord::Generators::Base.next_migration_number(dirname)
20
22
  end
23
+
24
+ private
25
+
26
+ def migration_version
27
+ if ActiveRecord::VERSION::MAJOR >= 5
28
+ "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
29
+ end
30
+ end
31
+
21
32
  end
22
- end
33
+ end
@@ -1,4 +1,4 @@
1
- class AddCronToDelayedJobs < ActiveRecord::Migration
1
+ class AddCronToDelayedJobs < ActiveRecord::Migration<%= migration_version %>
2
2
  def self.up
3
3
  add_column :delayed_jobs, :cron, :string
4
4
  end
@@ -6,4 +6,4 @@ class AddCronToDelayedJobs < ActiveRecord::Migration
6
6
  def self.down
7
7
  remove_column :delayed_jobs, :cron
8
8
  end
9
- end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_cron_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pascal Zumkehr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-26 00:00:00.000000000 Z
11
+ date: 2017-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: delayed_job
@@ -122,7 +122,7 @@ files:
122
122
  - ".rspec"
123
123
  - ".travis.yml"
124
124
  - Gemfile
125
- - LICENSE.txt
125
+ - LICENSE
126
126
  - README.md
127
127
  - Rakefile
128
128
  - delayed_cron_job.gemspec
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 2.4.8
161
+ rubygems_version: 2.4.5.1
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: An extension to Delayed::Job that allows you to set cron expressions for