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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d602d2ed0abbefe03a33fbe24430d04eda2365be
4
- data.tar.gz: 53909aa737830a9bd80b2df6501d611a12f1139e
3
+ metadata.gz: 0f0f8f7ad6db23b1f57b4489d7b835421c55f4e9
4
+ data.tar.gz: ddf42219103d4f9db984f15381d59fd797ce6834
5
5
  SHA512:
6
- metadata.gz: 45e511c7e495566233afe6c361d66bcd7b54485c2f406ef18e41cdefd3ef37e4a3e8741e785437524bf96ae6eef16d059cc30691078405add74477d15d650b34
7
- data.tar.gz: e12632200eaa662a435e422ff8f730c0a13ecca95f176618801420967cc5228864e1ded0d298caef9f5b1884a9a0c18fe484ede04fbdab9d9379d776d63b5f5d
6
+ metadata.gz: 268b7cb9e19ce1e64cb726e7e9c0fbf573910ede523c9b8aa20dbabf37f6c77f42322349408ccec4db507a6be0a50b84e157ab56f4550dc4c0509bb4123c5565
7
+ data.tar.gz: 7d15177fd390976858af7cd8cb0c35efbf2cea8c3018ded4e7b38df24a2e70395bb9d7dcbfdfac255201fe27e7be00699bc49a72f689e5c2d8364567415f5c31
@@ -5,8 +5,8 @@ module Stagehand
5
5
  @@connection_name_stack = [Rails.env.to_sym]
6
6
 
7
7
  def each(&block)
8
- with_connection(Configuration.staging_connection_name, &block)
9
- with_connection(Configuration.production_connection_name, &block) unless Configuration.single_connection?
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
 
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
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.9.1
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-09 00:00:00.000000000 Z
12
+ date: 2016-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails