delayed_job_unique_key 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/lib/delayed_job_unique_key.rb +8 -0
  2. data/lib/delayed_job_unique_key/active_record_job.rb +12 -0
  3. data/lib/delayed_job_unique_key/base.rb +52 -0
  4. data/lib/delayed_job_unique_key/version.rb +3 -0
  5. data/lib/generators/delayed_job_unique_key/install_generator.rb +17 -0
  6. data/lib/generators/delayed_job_unique_key/templates/add_unique_key_migration.rb +11 -0
  7. metadata +63 -174
  8. data/MIT-LICENSE +0 -20
  9. data/README.textile +0 -246
  10. data/contrib/delayed_job.monitrc +0 -14
  11. data/contrib/delayed_job_multiple.monitrc +0 -23
  12. data/lib/delayed/backend/base.rb +0 -152
  13. data/lib/delayed/backend/shared_spec.rb +0 -566
  14. data/lib/delayed/command.rb +0 -101
  15. data/lib/delayed/deserialization_error.rb +0 -4
  16. data/lib/delayed/lifecycle.rb +0 -84
  17. data/lib/delayed/message_sending.rb +0 -54
  18. data/lib/delayed/performable_mailer.rb +0 -21
  19. data/lib/delayed/performable_method.rb +0 -33
  20. data/lib/delayed/plugin.rb +0 -15
  21. data/lib/delayed/plugins/clear_locks.rb +0 -15
  22. data/lib/delayed/psych_ext.rb +0 -75
  23. data/lib/delayed/railtie.rb +0 -16
  24. data/lib/delayed/recipes.rb +0 -50
  25. data/lib/delayed/serialization/active_record.rb +0 -19
  26. data/lib/delayed/syck_ext.rb +0 -34
  27. data/lib/delayed/tasks.rb +0 -11
  28. data/lib/delayed/worker.rb +0 -222
  29. data/lib/delayed/yaml_ext.rb +0 -10
  30. data/lib/delayed_job.rb +0 -22
  31. data/lib/generators/delayed_job/delayed_job_generator.rb +0 -11
  32. data/lib/generators/delayed_job/templates/script +0 -5
  33. data/recipes/delayed_job.rb +0 -1
  34. data/spec/autoloaded/clazz.rb +0 -7
  35. data/spec/autoloaded/instance_clazz.rb +0 -6
  36. data/spec/autoloaded/instance_struct.rb +0 -6
  37. data/spec/autoloaded/struct.rb +0 -7
  38. data/spec/delayed/backend/test.rb +0 -113
  39. data/spec/delayed/serialization/test.rb +0 -0
  40. data/spec/fixtures/bad_alias.yml +0 -1
  41. data/spec/lifecycle_spec.rb +0 -107
  42. data/spec/message_sending_spec.rb +0 -116
  43. data/spec/performable_mailer_spec.rb +0 -46
  44. data/spec/performable_method_spec.rb +0 -89
  45. data/spec/sample_jobs.rb +0 -75
  46. data/spec/spec_helper.rb +0 -45
  47. data/spec/test_backend_spec.rb +0 -13
  48. data/spec/worker_spec.rb +0 -19
  49. data/spec/yaml_ext_spec.rb +0 -41
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Delayed::Backend::Test::Job do
4
- it_should_behave_like 'a delayed_job backend'
5
-
6
- describe "#reload" do
7
- it 'should cause the payload object to be reloaded' do
8
- job = "foo".delay.length
9
- o = job.payload_object
10
- o.object_id.should_not == job.reload.payload_object.object_id
11
- end
12
- end
13
- end
@@ -1,19 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Delayed::Worker do
4
- describe "backend=" do
5
- before do
6
- @clazz = Class.new
7
- Delayed::Worker.backend = @clazz
8
- end
9
-
10
- it "should set the Delayed::Job constant to the backend" do
11
- Delayed::Job.should == @clazz
12
- end
13
-
14
- it "should set backend with a symbol" do
15
- Delayed::Worker.backend = :test
16
- Delayed::Worker.backend.should == Delayed::Backend::Test::Job
17
- end
18
- end
19
- end
@@ -1,41 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "YAML" do
4
- it "should autoload classes" do
5
- lambda {
6
- yaml = "--- !ruby/class:Autoloaded::Clazz {}\n"
7
- YAML.load(yaml).should == Autoloaded::Clazz
8
- }.should_not raise_error
9
- end
10
-
11
- it "should autoload the class of a struct" do
12
- lambda {
13
- yaml = "--- !ruby/class:Autoloaded::Struct {}\n"
14
- YAML.load(yaml).should == Autoloaded::Struct
15
- }.should_not raise_error
16
- end
17
-
18
- it "should autoload the class for the instance of a struct" do
19
- lambda {
20
- yaml = "--- !ruby/struct:Autoloaded::InstanceStruct {}"
21
- YAML.load(yaml).class.should == Autoloaded::InstanceStruct
22
- }.should_not raise_error
23
- end
24
-
25
- it "should autoload the class for the instance" do
26
- lambda {
27
- yaml = "--- !ruby/object:Autoloaded::InstanceClazz {}\n"
28
- YAML.load(yaml).class.should == Autoloaded::InstanceClazz
29
- }.should_not raise_error
30
- end
31
-
32
- it "should not throw an uninitialized constant Syck::Syck when using YAML.load_file with poorly formed yaml" do
33
- lambda {
34
- YAML.load_file(File.expand_path('spec/fixtures/bad_alias.yml'))
35
- }.should_not raise_error
36
- end
37
-
38
- it "should not throw an uninitialized constant Syck::Syck when using YAML.load with poorly formed yaml" do
39
- lambda { YAML.load(YAML.dump("foo: *bar"))}.should_not raise_error
40
- end
41
- end