culturecode_stagehand 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stagehand/database.rb +10 -2
- data/lib/stagehand/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f0f8f7ad6db23b1f57b4489d7b835421c55f4e9
|
4
|
+
data.tar.gz: ddf42219103d4f9db984f15381d59fd797ce6834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268b7cb9e19ce1e64cb726e7e9c0fbf573910ede523c9b8aa20dbabf37f6c77f42322349408ccec4db507a6be0a50b84e157ab56f4550dc4c0509bb4123c5565
|
7
|
+
data.tar.gz: 7d15177fd390976858af7cd8cb0c35efbf2cea8c3018ded4e7b38df24a2e70395bb9d7dcbfdfac255201fe27e7be00699bc49a72f689e5c2d8364567415f5c31
|
data/lib/stagehand/database.rb
CHANGED
@@ -5,8 +5,8 @@ module Stagehand
|
|
5
5
|
@@connection_name_stack = [Rails.env.to_sym]
|
6
6
|
|
7
7
|
def each(&block)
|
8
|
-
|
9
|
-
|
8
|
+
with_staging_connection(&block)
|
9
|
+
with_production_connection(&block) unless Configuration.single_connection?
|
10
10
|
end
|
11
11
|
|
12
12
|
def connected_to_production?
|
@@ -41,6 +41,14 @@ module Stagehand
|
|
41
41
|
Stagehand::Database.production_connection.select_values(versions_scope)
|
42
42
|
end
|
43
43
|
|
44
|
+
def with_staging_connection(&block)
|
45
|
+
with_connection(Configuration.staging_connection_name, &block)
|
46
|
+
end
|
47
|
+
|
48
|
+
def with_production_connection(&block)
|
49
|
+
with_connection(Configuration.production_connection_name, &block)
|
50
|
+
end
|
51
|
+
|
44
52
|
def with_connection(connection_name)
|
45
53
|
different = current_connection_name != connection_name.to_sym
|
46
54
|
|
data/lib/stagehand/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: culturecode_stagehand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Jakobsen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|