simple_worker 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/railtie.rb +8 -2
  2. metadata +2 -2
data/lib/railtie.rb CHANGED
@@ -26,8 +26,14 @@ module SimpleWorker
26
26
  c2.models = Dir.glob(models_path)
27
27
  mailers_path = File.join(Rails.root, 'app/mailers/*.rb')
28
28
  c2.mailers = Dir.glob(mailers_path).collect { |m| {:filename=>m, :name => File.basename(m), :path_to_templates=>File.join(Rails.root, "app/views/#{File.basename(m, File.extname(m))}")} }
29
- c2.extra_requires += ['active_support/core_ext', 'active_record', 'action_mailer']
30
- c2.database = Rails.configuration.database_configuration[Rails.env]
29
+ c2.extra_requires += ['active_support/core_ext', 'action_mailer']
30
+ #puts 'DB FILE=' + File.join(Rails.root, 'config', 'database.yml').to_s
31
+ if defined?(ActiveRecord) && File.exist?(File.join(Rails.root, 'config', 'database.yml'))
32
+ c2.extra_requires += ['active_record']
33
+ c2.database = Rails.configuration.database_configuration[Rails.env]
34
+ else
35
+ #puts 'NOT DOING ACTIVERECORD'
36
+ end
31
37
  c2.gems = get_required_gems if defined?(Bundler)
32
38
  SimpleWorker.logger.debug "MODELS " + c2.models.inspect
33
39
  SimpleWorker.logger.debug "MAILERS " + c2.mailers.inspect
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: simple_worker
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.1
5
+ version: 0.7.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Travis Reeder
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-07 00:00:00 Z
13
+ date: 2011-07-14 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: zip