culturecode_stagehand 0.14.4 → 0.15.0

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: e0691ceae72d5001db6bd38f259157f4a82dff1e
4
- data.tar.gz: 09816a1e820606659d76695e32854109979e024a
3
+ metadata.gz: e9d9b08d666b45682ff43da53ba2086f89cd9a5c
4
+ data.tar.gz: 70088b1cea4eecd3f9ecfc2837c596f8b3c47b53
5
5
  SHA512:
6
- metadata.gz: dbe697859ad03c61ece9f6f0e986933dcb6266f86eeecc6d3a13c3775ae1d8063c5721888637055f8bf93ef5099d384d2ea6ee0e5d937001f4cc87f2da2f2100
7
- data.tar.gz: 68dbd5120d87b68da524d3de44d77368ce810ca1a205ab6cc73d0ac5b5ae0702f89750f58068a215642aa871ad4796dde4701bfa0484159fbbd0a1240acd0976
6
+ metadata.gz: 6d39beaebb5322b8b48f346856c433c60ac6cdd7d6c439f6e90155a8945129e1a89d5971faa353b48545575354bbc9ab6b976bb1a9157ce25a08d7c754ebc0f7
7
+ data.tar.gz: e062f7ad0a92320c091374c8379b41f2de395a118a3acbbe1311dc2d4dfc5e616be163cbb6b8cd6ec853589cbfaacf974f72a37f1e5b6b595d40433e6bfa9766
@@ -12,7 +12,7 @@ module Stagehand
12
12
  mattr_accessor :checklist_confirmation_filter, :checklist_association_filter, :checklist_relation_filter
13
13
 
14
14
  def staging_connection_name
15
- Rails.configuration.x.stagehand.staging_connection_name || Rails.env.to_sym
15
+ Rails.env.to_sym
16
16
  end
17
17
 
18
18
  def production_connection_name
@@ -50,12 +50,14 @@ module Stagehand
50
50
  end
51
51
 
52
52
  def with_connection(connection_name)
53
- different = current_connection_name != connection_name.to_sym
53
+ different = database_name(current_connection_name) != database_name(connection_name)
54
54
 
55
55
  if different
56
56
  @@connection_name_stack.push(connection_name.to_sym)
57
57
  Rails.logger.debug "Connecting to #{current_connection_name}"
58
58
  connect_to(current_connection_name)
59
+ else
60
+ Rails.logger.debug "Already connected to #{connection_name}"
59
61
  end
60
62
 
61
63
  yield connection_name
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.14.4"
2
+ VERSION = "0.15.0"
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.14.4
4
+ version: 0.15.0
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: 2017-10-10 00:00:00.000000000 Z
12
+ date: 2017-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails