Permalink
Browse files

Cleanup trailing whitespace

  • Loading branch information...
1 parent 06d0b5e commit 9630e4b0652b5efbff0803c52aaca72a4e24c1bc @sferik sferik committed Dec 29, 2011
View
@@ -1,2 +1,2 @@
Gemfile.lock
-.DS_Store
+.DS_Store
View
@@ -1,2 +1,3 @@
-source :rubygems
-gemspec
+source 'https://rubygems.org'
+
+gemspec
View
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOa AND
NONINFRINGEMENT. IN NO EVENT SaALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -10,4 +10,4 @@ Run `bundle install`
If you're using Rails, run the generator to create the migration for the delayed_job table: `rails g delayed_job:active_record`
-That's it. Use [delayed_job as normal](http://github.com/collectiveidea/delayed_job).
+That's it. Use [delayed_job as normal](http://github.com/collectiveidea/delayed_job).
@@ -10,11 +10,11 @@ class Job < ::ActiveRecord::Base
set_table_name :delayed_jobs
before_save :set_default_run_at
-
+
def self.rails3?
::ActiveRecord::VERSION::MAJOR == 3
end
-
+
if rails3?
scope :ready_to_run, lambda{|worker_name, max_run_time|
where('(run_at <= ? AND (locked_at IS NULL OR locked_at < ?) OR locked_by = ?) AND failed_at IS NULL', db_time_now, db_time_now - max_run_time, worker_name)
@@ -87,7 +87,7 @@ def self.db_time_now
Time.now
end
end
-
+
def reload(*args)
reset
super
@@ -2,4 +2,4 @@
require 'delayed_job'
require 'delayed/backend/active_record'
-Delayed::Worker.backend = :active_record
+Delayed::Worker.backend = :active_record
@@ -7,11 +7,11 @@ module DelayedJob
class ActiveRecordGenerator < ::DelayedJobGenerator
include Rails::Generators::Migration
extend ActiveRecord::Generators::Migration
-
+
self.source_paths << File.join(File.dirname(__FILE__), 'templates')
-
+
def create_migration_file
migration_template 'migration.rb', 'db/migrate/create_delayed_jobs.rb'
end
end
-end
+end
@@ -12,11 +12,11 @@ def self.up
table.string :queue # The name of the queue this job is in
table.timestamps
end
-
+
add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
end
-
+
def self.down
- drop_table :delayed_jobs
+ drop_table :delayed_jobs
end
-end
+end
View
@@ -5,4 +5,4 @@ sqlite:
mysql:
adapter: mysql
database: delayed_job
- uesrname: root
+ uesrname: root
@@ -33,7 +33,7 @@
Delayed::Backend::ActiveRecord::Job.after_fork
end
end
-
+
describe "enqueue" do
it "should allow enqueue hook to modify job at DB level" do
later = described_class.db_time_now + 20.minutes
@@ -4,12 +4,12 @@
it 'should load classes with non-default primary key' do
lambda {
YAML.load(Story.create.to_yaml)
- }.should_not raise_error
+ }.should_not raise_error
end
it 'should load classes even if not in default scope' do
lambda {
YAML.load(Story.create(:scoped => false).to_yaml)
- }.should_not raise_error
+ }.should_not raise_error
end
end
View
@@ -50,4 +50,4 @@ def whatever(n, _); tell*n; end
end
# Add this directory so the ActiveSupport autoloading works
-ActiveSupport::Dependencies.autoload_paths << File.dirname(__FILE__)
+ActiveSupport::Dependencies.autoload_paths << File.dirname(__FILE__)

0 comments on commit 9630e4b

Please sign in to comment.