Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved rails 2 init.

  • Loading branch information...
commit b3502eab0668dc745e23a1a52de9940b4bbf92d0 1 parent 437c950
@treeder treeder authored
View
7 lib/rails2_init.rb
@@ -0,0 +1,7 @@
+puts "Initializing list of Rails models..."
+SimpleWorker.configure do |config|
+ path = File.join(Rails.root, 'app/models/*.rb')
+ puts 'path=' + path
+ config.models = Dir.glob(path)
+ puts 'config.models=' + config.models.inspect
+end
View
2  lib/simple_worker.rb
@@ -25,7 +25,7 @@ def configure()
puts 'Rails=' + Rails.inspect
puts 'vers=' + Rails::VERSION::MAJOR.inspect
if Rails::VERSION::MAJOR == 2
- require_relative '../rails/init.rb'
+ require_relative 'rails2_init.rb'
else
require_relative 'railtie'
end
View
7 rails/init.rb
@@ -1,7 +0,0 @@
-puts "Initializing list of Rails models..."
-SimpleWorker.configure do |config|
- path = File.join(Rails.root, 'app/models/*.rb')
- puts 'path=' + path
- config.models = Dir.glob(path)
- puts 'config.models=' + config.models.inspect
-end
View
1  simple_worker.gemspec
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
"README.markdown"
]
s.files = [
+ "lib/railtie.rb",
"lib/simple_worker.rb",
"lib/simple_worker/base.rb",
"lib/simple_worker/config.rb",
Please sign in to comment.
Something went wrong with that request. Please try again.