culturecode_stagehand 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e8e470e10c36d55ed09a55577353f992f4dce33
4
- data.tar.gz: 8ff3559aa8264aba97054676c4829cd8930bad1d
3
+ metadata.gz: 198fa7c00c0c7374576db8bc52a5e3263a0d7960
4
+ data.tar.gz: ba863f7b3aab4b7c969d3de8c718e932fab1af67
5
5
  SHA512:
6
- metadata.gz: 72c42cf30acae539d585e1d8c07abcc8a1bb48c2ac6d0d540e324aa92407bcff9f86acfb86d433abf5fadf7e672472c7ff1694c5e764116d63cfbdaab1111514
7
- data.tar.gz: c2da536ed22c74a74db0ba20f41e0891898d02f779cfc870e2d5f46d9aaf7f2e3dd34ed08b0e5917a07e2a36571293dac382ee17f9b4e2d9db83efab1fbb0b93
6
+ metadata.gz: 7dc0bf126e23ce4bfbf77eff18924e894bfd660b716f329c0bbb611cd92b44d383183ccbe4431e59a0ca2beed3f4a5baa30283fac15b801c8cc48d5e8b9f4ff8
7
+ data.tar.gz: 8f285239f66c670aa4d42ef99d9f870ba7b63d915fd83b5e52d50dc84a3063eb7900e67b6f3da99899dfe947f672628a917f3af22184351ebb05fba85d87f456
@@ -5,8 +5,8 @@ module Stagehand
5
5
  @@connection_name_stack = [Rails.env.to_sym]
6
6
 
7
7
  def each(&block)
8
- with_staging_connection(&block)
9
8
  with_production_connection(&block) unless Configuration.single_connection?
9
+ with_staging_connection(&block)
10
10
  end
11
11
 
12
12
  def connected_to_production?
@@ -52,15 +52,19 @@ module Stagehand
52
52
  def with_connection(connection_name)
53
53
  different = current_connection_name != connection_name.to_sym
54
54
 
55
- @@connection_name_stack.push(connection_name.to_sym)
56
- Rails.logger.debug "Connecting to #{current_connection_name}"
57
- connect_to(current_connection_name) if different
55
+ if different
56
+ @@connection_name_stack.push(connection_name.to_sym)
57
+ Rails.logger.debug "Connecting to #{current_connection_name}"
58
+ connect_to(current_connection_name)
59
+ end
58
60
 
59
61
  yield connection_name
60
62
  ensure
61
- @@connection_name_stack.pop
62
- Rails.logger.debug "Restoring connection to #{current_connection_name}"
63
- connect_to(current_connection_name) if different
63
+ if different
64
+ @@connection_name_stack.pop
65
+ Rails.logger.debug "Restoring connection to #{current_connection_name}"
66
+ connect_to(current_connection_name)
67
+ end
64
68
  end
65
69
 
66
70
  def transaction
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
3
3
  end
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.10.0
4
+ version: 0.10.1
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-22 00:00:00.000000000 Z
12
+ date: 2016-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.5.1
112
+ rubygems_version: 2.4.5.1
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Simplify the management of a sandbox database that can sync content to a