foreman-tasks 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,7 +71,16 @@ module ForemanTasks
71
71
  def default_sequel_adapter_options
72
72
  db_config = ActiveRecord::Base.configurations[Rails.env].dup
73
73
  db_config['adapter'] = 'postgres' if db_config['adapter'] == 'postgresql'
74
- db_config['adapter'] = 'sqlite' if db_config['adapter'] == 'sqlite3'
74
+
75
+ if db_config['adapter'] == 'sqlite3'
76
+ db_config['adapter'] = 'sqlite'
77
+ database = db_config['database']
78
+ unless database == ':memory:'
79
+ # We need to create separate database for sqlite
80
+ # to avoid lock conflicts on the database
81
+ db_config['database'] = "#{File.dirname(database)}/dynflow-#{File.basename(database)}"
82
+ end
83
+ end
75
84
  return db_config
76
85
  end
77
86
 
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-23 00:00:00.000000000 Z
12
+ date: 2014-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails