inst-jobs 0.13.3 → 0.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/db/migrate/20101216224513_create_delayed_jobs.rb +1 -1
  3. data/db/migrate/20110208031356_add_delayed_jobs_tag.rb +1 -1
  4. data/db/migrate/20110426161613_add_delayed_jobs_max_attempts.rb +1 -1
  5. data/db/migrate/20110516225834_add_delayed_jobs_strand.rb +1 -1
  6. data/db/migrate/20110531144916_cleanup_delayed_jobs_indexes.rb +1 -1
  7. data/db/migrate/20110610213249_optimize_delayed_jobs.rb +1 -1
  8. data/db/migrate/20110831210257_add_delayed_jobs_next_in_strand.rb +1 -1
  9. data/db/migrate/20120510004759_delayed_jobs_delete_trigger_lock_for_update.rb +1 -1
  10. data/db/migrate/20120531150712_drop_psql_jobs_pop_fn.rb +1 -1
  11. data/db/migrate/20120607164022_delayed_jobs_use_advisory_locks.rb +1 -1
  12. data/db/migrate/20120607181141_index_jobs_on_locked_by.rb +1 -1
  13. data/db/migrate/20120608191051_add_jobs_run_at_index.rb +1 -1
  14. data/db/migrate/20120927184213_change_delayed_jobs_handler_to_text.rb +1 -1
  15. data/db/migrate/20140505215131_add_failed_jobs_original_job_id.rb +1 -1
  16. data/db/migrate/20140505215510_copy_failed_jobs_original_id.rb +1 -1
  17. data/db/migrate/20140505223637_drop_failed_jobs_original_id.rb +1 -1
  18. data/db/migrate/20140512213941_add_source_to_jobs.rb +1 -1
  19. data/db/migrate/20150807133223_add_max_concurrent_to_jobs.rb +1 -1
  20. data/db/migrate/20151123210429_add_expires_at_to_jobs.rb +1 -1
  21. data/db/migrate/20151210162949_improve_max_concurrent.rb +1 -1
  22. data/db/migrate/20161206323555_add_back_default_string_limits_jobs.rb +1 -1
  23. data/lib/delayed/backend/active_record.rb +1 -1
  24. data/lib/delayed/version.rb +1 -1
  25. data/lib/delayed/work_queue/parent_process/server.rb +5 -1
  26. data/spec/active_record_job_spec.rb +1 -0
  27. data/spec/gemfiles/42.gemfile +1 -0
  28. data/spec/gemfiles/42.gemfile.lock +10 -8
  29. data/spec/gemfiles/50.gemfile.lock +10 -11
  30. data/spec/gemfiles/51.gemfile +7 -0
  31. data/spec/gemfiles/51.gemfile.lock +187 -0
  32. data/spec/migrate/20140924140513_add_story_table.rb +1 -1
  33. data/spec/spec_helper.rb +10 -1
  34. metadata +8 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87a4b51b71b02dd1ab9e4817dffbc6b4780c4224
4
- data.tar.gz: e6a9a26a33f424950c37c83238085233be136e72
3
+ metadata.gz: 53f1867b5ff621c85c51eee5d1c53cd03626c815
4
+ data.tar.gz: da00939fdea142d9d8fd5039b1d0be3bef626753
5
5
  SHA512:
6
- metadata.gz: 21bb8f405b710a970a8e70570934d6344ebdb25d91b811542f6d8cc4fc1008d8550570960497a1f15d8a27c110a61e2dba1a819cf1c7982980f5269cb49bedfe
7
- data.tar.gz: 2eff9e07b7b083bee75d4536d50434f92b12f860c6390160ab90ff1737164fd83917b4d59fe64495278be2f75affe3cf63684d64b3a3930dfeb15a7d9a96feee
6
+ metadata.gz: 26b36ac5aa3dfdc7361d13fc84e0c75f8afa767852317ff174c06ec2f79cdb1d82eb23318b712f1b20fc183bcbe074296046779677486669126d96657ddbb775
7
+ data.tar.gz: fc0dcf2ea9f30756d08de2555c0e40cdad3fdeb997a863d69d01e9ab026d3ff3fc8143b89bc21fe56104fb7711006936f29cde3696901617f15f61e38bfca5a4
@@ -1,4 +1,4 @@
1
- class CreateDelayedJobs < ActiveRecord::Migration
1
+ class CreateDelayedJobs < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDelayedJobsTag < ActiveRecord::Migration
1
+ class AddDelayedJobsTag < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDelayedJobsMaxAttempts < ActiveRecord::Migration
1
+ class AddDelayedJobsMaxAttempts < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDelayedJobsStrand < ActiveRecord::Migration
1
+ class AddDelayedJobsStrand < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class CleanupDelayedJobsIndexes < ActiveRecord::Migration
1
+ class CleanupDelayedJobsIndexes < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class OptimizeDelayedJobs < ActiveRecord::Migration
1
+ class OptimizeDelayedJobs < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDelayedJobsNextInStrand < ActiveRecord::Migration
1
+ class AddDelayedJobsNextInStrand < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class DelayedJobsDeleteTriggerLockForUpdate < ActiveRecord::Migration
1
+ class DelayedJobsDeleteTriggerLockForUpdate < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class DropPsqlJobsPopFn < ActiveRecord::Migration
1
+ class DropPsqlJobsPopFn < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class DelayedJobsUseAdvisoryLocks < ActiveRecord::Migration
1
+ class DelayedJobsUseAdvisoryLocks < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class IndexJobsOnLockedBy < ActiveRecord::Migration
1
+ class IndexJobsOnLockedBy < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction! if respond_to?(:disable_ddl_transaction!)
3
3
 
4
4
  def connection
@@ -1,4 +1,4 @@
1
- class AddJobsRunAtIndex < ActiveRecord::Migration
1
+ class AddJobsRunAtIndex < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction! if respond_to?(:disable_ddl_transaction!)
3
3
 
4
4
  def connection
@@ -1,4 +1,4 @@
1
- class ChangeDelayedJobsHandlerToText < ActiveRecord::Migration
1
+ class ChangeDelayedJobsHandlerToText < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddFailedJobsOriginalJobId < ActiveRecord::Migration
1
+ class AddFailedJobsOriginalJobId < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class CopyFailedJobsOriginalId < ActiveRecord::Migration
1
+ class CopyFailedJobsOriginalId < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class DropFailedJobsOriginalId < ActiveRecord::Migration
1
+ class DropFailedJobsOriginalId < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Backend::ActiveRecord::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddSourceToJobs < ActiveRecord::Migration
1
+ class AddSourceToJobs < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMaxConcurrentToJobs < ActiveRecord::Migration
1
+ class AddMaxConcurrentToJobs < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddExpiresAtToJobs < ActiveRecord::Migration
1
+ class AddExpiresAtToJobs < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class ImproveMaxConcurrent < ActiveRecord::Migration
1
+ class ImproveMaxConcurrent < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Job.connection
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddBackDefaultStringLimitsJobs < ActiveRecord::Migration
1
+ class AddBackDefaultStringLimitsJobs < ActiveRecord::Migration[4.2]
2
2
  def connection
3
3
  Delayed::Job.connection
4
4
  end
@@ -39,7 +39,7 @@ module Delayed
39
39
  before_create :lock_strand_on_create
40
40
  def lock_strand_on_create
41
41
  if strand.present?
42
- self.class.connection.execute("SELECT pg_advisory_xact_lock(#{self.class.connection.quote_table_name('half_md5_as_bigint')}(#{self.class.sanitize(strand)}))")
42
+ self.class.connection.execute("SELECT pg_advisory_xact_lock(#{self.class.connection.quote_table_name('half_md5_as_bigint')}(#{self.class.connection.quote(strand)}))")
43
43
  end
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Delayed
2
- VERSION = "0.13.3"
2
+ VERSION = "0.13.4"
3
3
  end
@@ -40,7 +40,7 @@ class ParentProcess
40
40
  end
41
41
 
42
42
  rescue => e
43
- logger.debug "WorkQueue Server died: #{e.inspect}", :error
43
+ logger.error "WorkQueue Server died: #{e.inspect}"
44
44
  raise
45
45
  ensure
46
46
  unlock_all_prefetched_jobs
@@ -104,6 +104,7 @@ class ParentProcess
104
104
  job = prefetched_jobs.shift
105
105
  client = workers.shift
106
106
  # couldn't re-lock it for some reason
107
+ logger.debug("Transferring prefetched job to #{client.name}")
107
108
  unless job.transfer_lock!(from: prefetch_owner, to: client.name)
108
109
  workers.unshift(client)
109
110
  next
@@ -120,6 +121,7 @@ class ParentProcess
120
121
 
121
122
  next if workers.empty?
122
123
 
124
+ logger.debug("Fetching new work for #{workers.length} workers")
123
125
  Delayed::Worker.lifecycle.run_callbacks(:work_queue_pop, self, worker_config) do
124
126
  recipients = workers.map(&:name)
125
127
 
@@ -130,9 +132,11 @@ class ParentProcess
130
132
  worker_config[:max_priority],
131
133
  prefetch: Settings.fetch_batch_size * (worker_config[:workers] || 1) - recipients.length,
132
134
  prefetch_owner: prefetch_owner)
135
+ logger.debug("Fetched and locked #{response.values.flatten.size} new jobs for workers (#{response.keys.join(', ')}).")
133
136
  response.each do |(worker_name, job)|
134
137
  if worker_name == prefetch_owner
135
138
  # it's actually an array of all the extra jobs
139
+ logger.debug("Adding prefetched jobs #{job.length} to prefetched array (size: #{prefetched_jobs.count})")
136
140
  prefetched_jobs.concat(job)
137
141
  next
138
142
  end
@@ -61,6 +61,7 @@ describe 'Delayed::Backed::ActiveRecord::Job' do
61
61
  it "should unlock a successfully locked job and persist the job's unlocked state" do
62
62
  job = Delayed::Job.create :payload_object => SimpleJob.new
63
63
  job.send(:lock_exclusively!, 'worker1').should == true
64
+ job.reload
64
65
  job.unlock
65
66
  job.save!
66
67
  job.reload
@@ -3,3 +3,4 @@ source "https://rubygems.org"
3
3
  gemspec :path=>"../../"
4
4
 
5
5
  gem "rails", "~> 4.2.5"
6
+ gem 'test_after_commit', '0.4.1'
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- inst-jobs (0.12.2)
4
+ inst-jobs (0.13.3)
5
5
  after_transaction_commit (~> 1.0)
6
6
  rails (>= 4.2)
7
7
  redis (> 3.0)
8
8
  redis-scripting (~> 1.0.1)
9
- rufus-scheduler (~> 3.3.2)
9
+ rufus-scheduler (~> 3.4)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -46,7 +46,7 @@ GEM
46
46
  minitest (~> 5.1)
47
47
  thread_safe (~> 0.3, >= 0.3.4)
48
48
  tzinfo (~> 1.1)
49
- after_transaction_commit (1.1.1)
49
+ after_transaction_commit (1.1.2)
50
50
  activerecord (>= 4.0)
51
51
  arel (6.0.4)
52
52
  backports (3.6.8)
@@ -55,9 +55,11 @@ GEM
55
55
  byebug (9.0.6)
56
56
  coderay (1.1.1)
57
57
  concurrent-ruby (1.0.4)
58
- database_cleaner (1.3.0)
58
+ database_cleaner (1.6.1)
59
59
  diff-lcs (1.3)
60
60
  erubis (2.7.0)
61
+ et-orbi (1.0.3)
62
+ tzinfo
61
63
  globalid (0.3.7)
62
64
  activesupport (>= 4.1.0)
63
65
  i18n (0.7.0)
@@ -126,8 +128,8 @@ GEM
126
128
  diff-lcs (>= 1.2.0, < 2.0)
127
129
  rspec-support (~> 3.4.0)
128
130
  rspec-support (3.4.1)
129
- rufus-scheduler (3.3.3)
130
- tzinfo
131
+ rufus-scheduler (3.4.0)
132
+ et-orbi (~> 1.0)
131
133
  sinatra (1.4.7)
132
134
  rack (~> 1.5)
133
135
  rack-protection (~> 1.4)
@@ -163,7 +165,7 @@ PLATFORMS
163
165
  DEPENDENCIES
164
166
  bump
165
167
  byebug
166
- database_cleaner (= 1.3.0)
168
+ database_cleaner (= 1.6.1)
167
169
  inst-jobs!
168
170
  pg
169
171
  pry
@@ -178,4 +180,4 @@ DEPENDENCIES
178
180
  wwtd (~> 1.3.0)
179
181
 
180
182
  BUNDLED WITH
181
- 1.14.3
183
+ 1.14.6
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- inst-jobs (0.12.2)
4
+ inst-jobs (0.13.3)
5
5
  after_transaction_commit (~> 1.0)
6
6
  rails (>= 4.2)
7
7
  redis (> 3.0)
8
8
  redis-scripting (~> 1.0.1)
9
- rufus-scheduler (~> 3.3.2)
9
+ rufus-scheduler (~> 3.4)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -48,7 +48,7 @@ GEM
48
48
  i18n (~> 0.7)
49
49
  minitest (~> 5.1)
50
50
  tzinfo (~> 1.1)
51
- after_transaction_commit (1.1.1)
51
+ after_transaction_commit (1.1.2)
52
52
  activerecord (>= 4.0)
53
53
  arel (7.1.4)
54
54
  backports (3.6.8)
@@ -57,9 +57,11 @@ GEM
57
57
  byebug (9.0.6)
58
58
  coderay (1.1.1)
59
59
  concurrent-ruby (1.0.4)
60
- database_cleaner (1.3.0)
60
+ database_cleaner (1.6.1)
61
61
  diff-lcs (1.3)
62
62
  erubis (2.7.0)
63
+ et-orbi (1.0.3)
64
+ tzinfo
63
65
  globalid (0.3.7)
64
66
  activesupport (>= 4.1.0)
65
67
  i18n (0.7.0)
@@ -128,8 +130,8 @@ GEM
128
130
  diff-lcs (>= 1.2.0, < 2.0)
129
131
  rspec-support (~> 3.4.0)
130
132
  rspec-support (3.4.1)
131
- rufus-scheduler (3.3.3)
132
- tzinfo
133
+ rufus-scheduler (3.4.0)
134
+ et-orbi (~> 1.0)
133
135
  sinatra (2.0.0.beta2)
134
136
  mustermann (= 1.0.0.beta2)
135
137
  rack (~> 2.0)
@@ -151,8 +153,6 @@ GEM
151
153
  actionpack (>= 4.0)
152
154
  activesupport (>= 4.0)
153
155
  sprockets (>= 3.0.0)
154
- test_after_commit (0.4.1)
155
- activerecord (>= 3.2)
156
156
  thor (0.19.4)
157
157
  thread_safe (0.3.5)
158
158
  tilt (2.0.5)
@@ -170,7 +170,7 @@ PLATFORMS
170
170
  DEPENDENCIES
171
171
  bump
172
172
  byebug
173
- database_cleaner (= 1.3.0)
173
+ database_cleaner (= 1.6.1)
174
174
  inst-jobs!
175
175
  pg
176
176
  pry
@@ -180,9 +180,8 @@ DEPENDENCIES
180
180
  rspec (= 3.4.0)
181
181
  sinatra (= 2.0.0.beta2)
182
182
  sinatra-contrib (= 2.0.0.beta2)
183
- test_after_commit (= 0.4.1)
184
183
  timecop (= 0.7.1)
185
184
  wwtd (~> 1.3.0)
186
185
 
187
186
  BUNDLED WITH
188
- 1.14.3
187
+ 1.14.6
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path=>"../../"
4
+
5
+ gem "rails", "~> 5.1.0"
6
+ gem 'sinatra', "2.0.0.beta2"
7
+ gem 'sinatra-contrib', "2.0.0.beta2"
@@ -0,0 +1,187 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ inst-jobs (0.13.3)
5
+ after_transaction_commit (~> 1.0)
6
+ rails (>= 4.2)
7
+ redis (> 3.0)
8
+ redis-scripting (~> 1.0.1)
9
+ rufus-scheduler (~> 3.4)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actioncable (5.1.1)
15
+ actionpack (= 5.1.1)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (~> 0.6.1)
18
+ actionmailer (5.1.1)
19
+ actionpack (= 5.1.1)
20
+ actionview (= 5.1.1)
21
+ activejob (= 5.1.1)
22
+ mail (~> 2.5, >= 2.5.4)
23
+ rails-dom-testing (~> 2.0)
24
+ actionpack (5.1.1)
25
+ actionview (= 5.1.1)
26
+ activesupport (= 5.1.1)
27
+ rack (~> 2.0)
28
+ rack-test (~> 0.6.3)
29
+ rails-dom-testing (~> 2.0)
30
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
+ actionview (5.1.1)
32
+ activesupport (= 5.1.1)
33
+ builder (~> 3.1)
34
+ erubi (~> 1.4)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
37
+ activejob (5.1.1)
38
+ activesupport (= 5.1.1)
39
+ globalid (>= 0.3.6)
40
+ activemodel (5.1.1)
41
+ activesupport (= 5.1.1)
42
+ activerecord (5.1.1)
43
+ activemodel (= 5.1.1)
44
+ activesupport (= 5.1.1)
45
+ arel (~> 8.0)
46
+ activesupport (5.1.1)
47
+ concurrent-ruby (~> 1.0, >= 1.0.2)
48
+ i18n (~> 0.7)
49
+ minitest (~> 5.1)
50
+ tzinfo (~> 1.1)
51
+ after_transaction_commit (1.1.2)
52
+ activerecord (>= 4.0)
53
+ arel (8.0.0)
54
+ backports (3.7.0)
55
+ builder (3.2.3)
56
+ bump (0.5.3)
57
+ byebug (9.0.6)
58
+ coderay (1.1.1)
59
+ concurrent-ruby (1.0.5)
60
+ database_cleaner (1.6.1)
61
+ diff-lcs (1.3)
62
+ erubi (1.6.0)
63
+ et-orbi (1.0.3)
64
+ tzinfo
65
+ globalid (0.4.0)
66
+ activesupport (>= 4.2.0)
67
+ i18n (0.8.4)
68
+ loofah (2.0.3)
69
+ nokogiri (>= 1.5.9)
70
+ mail (2.6.6)
71
+ mime-types (>= 1.16, < 4)
72
+ method_source (0.8.2)
73
+ mime-types (3.1)
74
+ mime-types-data (~> 3.2015)
75
+ mime-types-data (3.2016.0521)
76
+ mini_portile2 (2.2.0)
77
+ minitest (5.10.2)
78
+ multi_json (1.12.1)
79
+ mustermann (1.0.0.beta2)
80
+ nio4r (2.1.0)
81
+ nokogiri (1.8.0)
82
+ mini_portile2 (~> 2.2.0)
83
+ pg (0.21.0)
84
+ pry (0.10.4)
85
+ coderay (~> 1.1.0)
86
+ method_source (~> 0.8.1)
87
+ slop (~> 3.4)
88
+ rack (2.0.3)
89
+ rack-protection (2.0.0.beta2)
90
+ rack
91
+ rack-test (0.6.3)
92
+ rack (>= 1.0)
93
+ rails (5.1.1)
94
+ actioncable (= 5.1.1)
95
+ actionmailer (= 5.1.1)
96
+ actionpack (= 5.1.1)
97
+ actionview (= 5.1.1)
98
+ activejob (= 5.1.1)
99
+ activemodel (= 5.1.1)
100
+ activerecord (= 5.1.1)
101
+ activesupport (= 5.1.1)
102
+ bundler (>= 1.3.0, < 2.0)
103
+ railties (= 5.1.1)
104
+ sprockets-rails (>= 2.0.0)
105
+ rails-dom-testing (2.0.3)
106
+ activesupport (>= 4.2.0)
107
+ nokogiri (>= 1.6)
108
+ rails-html-sanitizer (1.0.3)
109
+ loofah (~> 2.0)
110
+ railties (5.1.1)
111
+ actionpack (= 5.1.1)
112
+ activesupport (= 5.1.1)
113
+ method_source
114
+ rake (>= 0.8.7)
115
+ thor (>= 0.18.1, < 2.0)
116
+ rake (12.0.0)
117
+ redis (3.3.3)
118
+ redis-scripting (1.0.1)
119
+ redis (>= 3.0)
120
+ rspec (3.4.0)
121
+ rspec-core (~> 3.4.0)
122
+ rspec-expectations (~> 3.4.0)
123
+ rspec-mocks (~> 3.4.0)
124
+ rspec-core (3.4.4)
125
+ rspec-support (~> 3.4.0)
126
+ rspec-expectations (3.4.0)
127
+ diff-lcs (>= 1.2.0, < 2.0)
128
+ rspec-support (~> 3.4.0)
129
+ rspec-mocks (3.4.1)
130
+ diff-lcs (>= 1.2.0, < 2.0)
131
+ rspec-support (~> 3.4.0)
132
+ rspec-support (3.4.1)
133
+ rufus-scheduler (3.4.0)
134
+ et-orbi (~> 1.0)
135
+ sinatra (2.0.0.beta2)
136
+ mustermann (= 1.0.0.beta2)
137
+ rack (~> 2.0)
138
+ rack-protection (= 2.0.0.beta2)
139
+ tilt (~> 2.0)
140
+ sinatra-contrib (2.0.0.beta2)
141
+ backports (>= 2.0)
142
+ multi_json
143
+ mustermann (= 1.0.0.beta2)
144
+ rack-protection (= 2.0.0.beta2)
145
+ rack-test
146
+ sinatra (= 2.0.0.beta2)
147
+ tilt (>= 1.3, < 3)
148
+ slop (3.6.0)
149
+ sprockets (3.7.1)
150
+ concurrent-ruby (~> 1.0)
151
+ rack (> 1, < 3)
152
+ sprockets-rails (3.2.0)
153
+ actionpack (>= 4.0)
154
+ activesupport (>= 4.0)
155
+ sprockets (>= 3.0.0)
156
+ thor (0.19.4)
157
+ thread_safe (0.3.6)
158
+ tilt (2.0.7)
159
+ timecop (0.7.1)
160
+ tzinfo (1.2.3)
161
+ thread_safe (~> 0.1)
162
+ websocket-driver (0.6.5)
163
+ websocket-extensions (>= 0.1.0)
164
+ websocket-extensions (0.1.2)
165
+ wwtd (1.3.0)
166
+
167
+ PLATFORMS
168
+ ruby
169
+
170
+ DEPENDENCIES
171
+ bump
172
+ byebug
173
+ database_cleaner (= 1.6.1)
174
+ inst-jobs!
175
+ pg
176
+ pry
177
+ rack-test
178
+ rails (~> 5.1.0)
179
+ rake
180
+ rspec (= 3.4.0)
181
+ sinatra (= 2.0.0.beta2)
182
+ sinatra-contrib (= 2.0.0.beta2)
183
+ timecop (= 0.7.1)
184
+ wwtd (~> 1.3.0)
185
+
186
+ BUNDLED WITH
187
+ 1.14.6
@@ -1,4 +1,4 @@
1
- class AddStoryTable < ActiveRecord::Migration
1
+ class AddStoryTable < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :stories do |table|
4
4
  table.string :text
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,7 @@ require 'delayed/testing'
3
3
 
4
4
  require 'database_cleaner'
5
5
  require 'rack/test'
6
- require 'test_after_commit'
6
+ require 'test_after_commit' if ::Rails.version < '5'
7
7
  require 'timecop'
8
8
  require 'pry'
9
9
 
@@ -46,6 +46,15 @@ connection_config = {
46
46
  username: ENV['TEST_DB_USERNAME'],
47
47
  database: ENV['TEST_DB_DATABASE'],
48
48
  }
49
+
50
+ if ::Rails.version < '5'
51
+ class ActiveRecord::Migration
52
+ class << self
53
+ def [](_version); self; end
54
+ end
55
+ end
56
+ end
57
+
49
58
  # create the test db if it does not exist, to help out wwtd
50
59
  ActiveRecord::Base.establish_connection(connection_config.merge(database: 'postgres'))
51
60
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inst-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-27 00:00:00.000000000 Z
12
+ date: 2017-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: after_transaction_commit
@@ -115,14 +115,14 @@ dependencies:
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 1.3.0
118
+ version: 1.6.1
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - '='
124
124
  - !ruby/object:Gem::Version
125
- version: 1.3.0
125
+ version: 1.6.1
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: pg
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -179,20 +179,6 @@ dependencies:
179
179
  - - '='
180
180
  - !ruby/object:Gem::Version
181
181
  version: 3.4.0
182
- - !ruby/object:Gem::Dependency
183
- name: test_after_commit
184
- requirement: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - '='
187
- - !ruby/object:Gem::Version
188
- version: 0.4.1
189
- type: :development
190
- prerelease: false
191
- version_requirements: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - '='
194
- - !ruby/object:Gem::Version
195
- version: 0.4.1
196
182
  - !ruby/object:Gem::Dependency
197
183
  name: timecop
198
184
  requirement: !ruby/object:Gem::Requirement
@@ -350,6 +336,8 @@ files:
350
336
  - spec/gemfiles/42.gemfile.lock
351
337
  - spec/gemfiles/50.gemfile
352
338
  - spec/gemfiles/50.gemfile.lock
339
+ - spec/gemfiles/51.gemfile
340
+ - spec/gemfiles/51.gemfile.lock
353
341
  - spec/migrate/20140924140513_add_story_table.rb
354
342
  - spec/redis_job_spec.rb
355
343
  - spec/sample_jobs.rb
@@ -399,6 +387,8 @@ test_files:
399
387
  - spec/gemfiles/42.gemfile.lock
400
388
  - spec/gemfiles/50.gemfile
401
389
  - spec/gemfiles/50.gemfile.lock
390
+ - spec/gemfiles/51.gemfile
391
+ - spec/gemfiles/51.gemfile.lock
402
392
  - spec/migrate/20140924140513_add_story_table.rb
403
393
  - spec/redis_job_spec.rb
404
394
  - spec/sample_jobs.rb