Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix/column_name_quotes' into develop

  • Loading branch information...
commit 04e450947e958fa56fa7b94bf560552335bdad3a 2 parents 31c6a7a + 8bdd0b6
@jeffkreeftmeijer authored
Showing with 13 additions and 11 deletions.
  1. +5 −3 README.textile
  2. +5 −5 lib/navvy/job/active_record.rb
  3. +3 −3 navvy.gemspec
View
8 README.textile
@@ -1,16 +1,18 @@
h1. Navvy
-Navvy is a simple Ruby background job processor inspired by "delayed_job":http://github.com/tobi/delayed_job, but aiming for database agnosticism. Currently Navvy supports ActiveRecord, MongoMapper, Sequel and DataMapper but it's extremely easy to write an adapter for your favorite ORM. Besides plain Ruby (1.8 & 1.9) it completely supports Rails Edge.
+Navvy is a simple Ruby background job processor inspired by "delayed_job":http://github.com/tobi/delayed_job, but aiming for database agnosticism. Currently Navvy supports ActiveRecord, MongoMapper, Sequel, DataMapper and Mongoid but it's extremely easy to write an adapter for your favorite ORM.
+
+Navvy doesn't depend on Rails, it's a pure Ruby library. There are generators for Rails 2 and Rails 3, though.
??“Navvy is a shorter form of navigator (UK) or navigational engineer (USA) and is particularly applied to describe the manual labourers working on major civil engineering projects. The term was coined in the late 18th century in Britain when numerous canals were being built, which were also sometimes known as "navigations". Canal navvies typically worked with shovels, pickaxes and barrows.”?? - "Wikipedia":http://en.wikipedia.org/wiki/Navvy
h2. Using Navvy
-There are some "Installation Guide":http://wiki.github.com/jeffkreeftmeijer/navvy/installation (even for "Rails 3":http://wiki.github.com/jeffkreeftmeijer/navvy/installation-on-rails-edge) and a "Getting Started Guide":http://wiki.github.com/jeffkreeftmeijer/navvy/getting-started to put you on the right track. Any questions? Don't hesitate to "ask":http://github.com/inbox/new/jeffkreeftmeijer.
+Check out the "Installation Guide":http://wiki.github.com/jeffkreeftmeijer/navvy/installation and the "Getting Started Guide":http://wiki.github.com/jeffkreeftmeijer/navvy/getting-started to get up and running. If you have any questions or problems, don't hesitate to "ask":http://github.com/inbox/new/jeffkreeftmeijer.
h2. Contributing
-Found any issues? Have a great idea? Want to help? Great! Create an issue "issue":http://github.com/jeffkreeftmeijer/navvy/issues for it, or even better; "fork the project":http://github.com/jeffkreeftmeijer/navvy/fork. Pull requests are always welcome. :)
+Found an issue? Have a great idea? Want to help? Great! Create an issue "issue":http://github.com/jeffkreeftmeijer/navvy/issues for it, "ask":http://github.com/inbox/new/jeffkreeftmeijer, or even better; fork the project and fix the problem yourself. Pull requests are always welcome. :)
h2. License
View
10 lib/navvy/job/active_record.rb
@@ -43,8 +43,8 @@ def self.enqueue(object, method_name, *args)
def self.next(limit = self.limit)
all(
- :conditions => [
- '`failed_at` IS NULL AND `completed_at` IS NULL AND `run_at` <= ?',
+ :conditions => [
+ "#{connection.quote_column_name('failed_at')} IS NULL AND #{connection.quote_column_name('completed_at')} IS NULL AND #{connection.quote_column_name('run_at')} <= ?",
Time.now
],
:limit => limit,
@@ -62,12 +62,12 @@ def self.next(limit = self.limit)
def self.cleanup
if keep.is_a? Fixnum
delete_all([
- '`completed_at` <= ?',
+ "#{connection.quote_column_name('completed_at')} <= ?",
keep.ago
])
else
delete_all(
- '`completed_at` IS NOT NULL'
+ "#{connection.quote_column_name('completed_at')} IS NOT NULL"
) unless keep?
end
end
@@ -127,7 +127,7 @@ def failed(message = nil)
def times_failed
i = parent_id || id
self.class.count(
- :conditions => "(`id` = '#{i}' OR `parent_id` = '#{i}') AND `failed_at` IS NOT NULL"
+ :conditions => "(#{connection.quote_column_name('id')} = '#{i}' OR #{connection.quote_column_name('parent_id')} = '#{i}') AND #{connection.quote_column_name('failed_at')} IS NOT NULL"
)
end
end
View
6 navvy.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |gem|
gem.name = 'navvy'
- gem.version = '0.2.3'
+ gem.version = '0.3.0'
gem.date = Date.today.to_s
gem.summary = "Simple background job processor inspired by delayed_job, but aiming for database agnosticism."
@@ -12,6 +12,6 @@ Gem::Specification.new do |gem|
gem.files = Dir['{generators,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z`.split("\0")
- gem.add_dependency('rspec', [">= 1.2.9"])
- gem.add_dependency('yard', [">= 0.5.2"])
+ gem.add_development_dependency('rspec', [">= 1.2.9"])
+ gem.add_development_dependency('yard', [">= 0.5.2"])
end
Please sign in to comment.
Something went wrong with that request. Please try again.