journaled 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -6
- data/Rakefile +7 -1
- data/app/jobs/journaled/application_job.rb +4 -0
- data/app/jobs/journaled/delivery_job.rb +96 -0
- data/app/models/concerns/journaled/changes.rb +5 -5
- data/app/models/journaled/change.rb +3 -0
- data/app/models/journaled/change_writer.rb +1 -0
- data/app/models/journaled/delivery.rb +5 -2
- data/app/models/journaled/event.rb +5 -2
- data/app/models/journaled/writer.rb +10 -8
- data/lib/journaled.rb +26 -5
- data/lib/journaled/engine.rb +5 -0
- data/lib/journaled/relation_change_protection.rb +1 -1
- data/lib/journaled/version.rb +1 -1
- data/spec/dummy/config/application.rb +1 -2
- data/spec/dummy/config/database.yml +4 -19
- data/spec/dummy/config/environments/development.rb +0 -13
- data/spec/dummy/config/environments/test.rb +3 -5
- data/spec/dummy/db/schema.rb +3 -16
- data/spec/jobs/journaled/delivery_job_spec.rb +221 -0
- data/spec/lib/journaled_spec.rb +39 -0
- data/spec/models/concerns/journaled/changes_spec.rb +11 -0
- data/spec/models/database_change_protection_spec.rb +19 -25
- data/spec/models/journaled/change_writer_spec.rb +5 -0
- data/spec/models/journaled/delivery_spec.rb +33 -0
- data/spec/models/journaled/event_spec.rb +23 -16
- data/spec/models/journaled/writer_spec.rb +34 -18
- data/spec/rails_helper.rb +1 -2
- data/spec/spec_helper.rb +1 -3
- metadata +38 -62
- data/config/routes.rb +0 -2
- data/lib/journaled/job_priority.rb +0 -5
- data/spec/dummy/config/environments/production.rb +0 -78
- data/spec/dummy/config/initializers/assets.rb +0 -8
- data/spec/dummy/db/migrate/20180606205114_create_delayed_jobs.rb +0 -18
- data/spec/dummy/log/development.log +0 -29
- data/spec/dummy/log/test.log +0 -2482
- data/spec/support/delayed_job_spec_helper.rb +0 -11
@@ -1,11 +0,0 @@
|
|
1
|
-
module DelayedJobSpecHelper
|
2
|
-
def with_jobs_delayed(opts = {})
|
3
|
-
work_off = opts.fetch(:work_off, true)
|
4
|
-
original = Delayed::Worker.delay_jobs
|
5
|
-
Delayed::Worker.delay_jobs = true
|
6
|
-
yield
|
7
|
-
ensure
|
8
|
-
Delayed::Worker.delay_jobs = original
|
9
|
-
Delayed::Worker.new.work_off if work_off
|
10
|
-
end
|
11
|
-
end
|