offshore 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/offshore/server/database.rb +3 -0
- data/lib/offshore/tasks.rb +3 -0
- data/lib/offshore/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -50,6 +50,9 @@ module Offshore
|
|
50
50
|
# should it be per test
|
51
51
|
# what about db reconnections?
|
52
52
|
Logger.info(" Database.init")
|
53
|
+
|
54
|
+
Offshore::Database.unlock unless ENV['MULTI_OFFSHORE'] # no reason to keep everyone waiting if I'm the only one
|
55
|
+
|
53
56
|
if redis.get(SHUTDOWN_KEY)
|
54
57
|
Logger.info(" .... databse shutting down. Exiting.")
|
55
58
|
raise "Database shutting down. No new connections, please."
|
data/lib/offshore/tasks.rb
CHANGED
@@ -14,6 +14,7 @@ namespace :offshore do
|
|
14
14
|
Offshore::Database.snapshoter.rollback
|
15
15
|
end
|
16
16
|
|
17
|
+
desc "Unlock the database"
|
17
18
|
task :unlock => [:preload, :setup] do
|
18
19
|
Offshore::Database.unlock
|
19
20
|
end
|
@@ -26,10 +27,12 @@ namespace :offshore do
|
|
26
27
|
Offshore::Database.startup(false)
|
27
28
|
end
|
28
29
|
|
30
|
+
desc "Reset the db"
|
29
31
|
task :reset => [:preload, :setup] do
|
30
32
|
Offshore::Database.reset
|
31
33
|
end
|
32
34
|
|
35
|
+
desc "seed the databse if needed"
|
33
36
|
task :seed_schema => [ :preload, :setup, :seed, :schema_snapshot ]
|
34
37
|
|
35
38
|
end
|
data/lib/offshore/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: offshore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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:
|
12
|
+
date: 2013-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|