delayed_job_active_record 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -2,12 +2,46 @@
|
|
2
2
|
|
3
3
|
## Installation
|
4
4
|
|
5
|
-
Add the
|
5
|
+
Add the gem to your Gemfile:
|
6
6
|
|
7
7
|
gem 'delayed_job_active_record'
|
8
8
|
|
9
|
-
Run `bundle install
|
9
|
+
Run `bundle install`.
|
10
10
|
|
11
|
-
If you're using Rails, run the generator to create the migration for the delayed_job table
|
11
|
+
If you're using Rails, run the generator to create the migration for the delayed_job table.
|
12
|
+
|
13
|
+
rails g delayed_job:active_record
|
14
|
+
rake db:migrate
|
15
|
+
|
16
|
+
## Upgrading from 2.x to 3.0.0
|
17
|
+
|
18
|
+
If you're upgrading from Delayed Job 2.x, run the upgrade generator to create a migration to add a column to your delayed_jobs table.
|
19
|
+
|
20
|
+
rails g delayed_job:upgrade
|
21
|
+
rake db:migrate
|
12
22
|
|
13
23
|
That's it. Use [delayed_job as normal](http://github.com/collectiveidea/delayed_job).
|
24
|
+
|
25
|
+
## Build Status
|
26
|
+
|
27
|
+
[![Build Status](http://travis-ci.org/collectiveidea/delayed_job_active_record.png)](https://travis-ci.org/collectiveidea/delayed_job_active_record)
|
28
|
+
|
29
|
+
|
30
|
+
## Dependency Status
|
31
|
+
|
32
|
+
[![Dependency Status](https://gemnasium.com/collectiveidea/delayed_job_active_record.png)](https://gemnasium.com/collectiveidea/delayed_job_active_record)
|
33
|
+
|
34
|
+
## How to contribute
|
35
|
+
|
36
|
+
If you find what looks like a bug:
|
37
|
+
|
38
|
+
* Search the [mailing list](http://groups.google.com/group/delayed_job) to see if anyone else had the same issue.
|
39
|
+
* Check the [GitHub issue tracker](http://github.com/collectiveidea/delayed_job_active_record/issues/) to see if anyone else has reported issue.
|
40
|
+
* If you don't see anything, create an issue with information on how to reproduce it.
|
41
|
+
|
42
|
+
If you want to contribute an enhancement or a fix:
|
43
|
+
|
44
|
+
* Fork the project on github.
|
45
|
+
* Make your changes with tests.
|
46
|
+
* Commit the changes without making changes to the Rakefile or any other files that aren't related to your enhancement or fix
|
47
|
+
* Send a pull request.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'generators/delayed_job/delayed_job_generator'
|
2
|
+
require 'rails/generators/migration'
|
3
|
+
require 'rails/generators/active_record/migration'
|
4
|
+
|
5
|
+
# Extend the DelayedJobGenerator so that it creates an AR migration
|
6
|
+
module DelayedJob
|
7
|
+
class UpgradeGenerator < ::DelayedJobGenerator
|
8
|
+
include Rails::Generators::Migration
|
9
|
+
extend ActiveRecord::Generators::Migration
|
10
|
+
|
11
|
+
self.source_paths << File.join(File.dirname(__FILE__), 'templates')
|
12
|
+
|
13
|
+
def create_migration_file
|
14
|
+
migration_template 'upgrade_migration.rb', 'db/migrate/add_queue_to_delayed_jobs.rb'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -12,7 +12,6 @@ Delayed::Worker.logger = Logger.new('/tmp/dj.log')
|
|
12
12
|
ENV['RAILS_ENV'] = 'test'
|
13
13
|
|
14
14
|
config = YAML.load(File.read('spec/database.yml'))
|
15
|
-
# ActiveRecord::Base.configurations = {'test' => config['sqlite']}
|
16
15
|
ActiveRecord::Base.establish_connection config['sqlite']
|
17
16
|
ActiveRecord::Base.logger = Delayed::Worker.logger
|
18
17
|
ActiveRecord::Migration.verbose = false
|
metadata
CHANGED
@@ -5,12 +5,13 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Griffin
|
14
|
+
- Brian Ryckbost
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
@@ -39,13 +40,12 @@ dependencies:
|
|
39
40
|
requirements:
|
40
41
|
- - ~>
|
41
42
|
- !ruby/object:Gem::Version
|
42
|
-
hash:
|
43
|
+
hash: 7
|
43
44
|
segments:
|
44
45
|
- 3
|
45
46
|
- 0
|
46
47
|
- 0
|
47
|
-
|
48
|
-
version: 3.0.0.pre
|
48
|
+
version: 3.0.0
|
49
49
|
requirement: *id002
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
@@ -108,6 +108,8 @@ files:
|
|
108
108
|
- lib/delayed_job_active_record.rb
|
109
109
|
- lib/generators/delayed_job/active_record_generator.rb
|
110
110
|
- lib/generators/delayed_job/templates/migration.rb
|
111
|
+
- lib/generators/delayed_job/templates/upgrade_migration.rb
|
112
|
+
- lib/generators/delayed_job/upgrade_generator.rb
|
111
113
|
- spec/database.yml
|
112
114
|
- spec/delayed/backend/active_record_spec.rb
|
113
115
|
- spec/delayed/serialization/active_record_spec.rb
|