culturecode_stagehand 0.14.2 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36397ac85ad289be7250f91d741897dd785e7e53
4
- data.tar.gz: dc5b55b770856a053e74f722714ced595f04a935
3
+ metadata.gz: 057a8710cbdfb48d9e7214e04f9dd9b506d18caf
4
+ data.tar.gz: 300b3dd8173a519ad7f8c492c1362bf0e939b8e9
5
5
  SHA512:
6
- metadata.gz: 5a3136e6b0146372601116c58a3fae37c07b5994bd742e69b12634b09ccdc09bb21f916a1f5f32fabe5612e09e61351399d857bcd3d026fa4f48141214f37afb
7
- data.tar.gz: c32836f97c7e11e46d4bcebedc98c650f2c1a56391da29463f7edfd956c8cec798f6d5743dcc9bb933db875b373ce970dd3b00c224871c9bf1a32c776074ccfe
6
+ metadata.gz: 2030b34bb3b871e5498bc1b9a4be1e757d07978f34c9106f2456fffdd7e0677f96eb526a72dc5fe2cf42bb8d3e97f6f0aae857cd4dd65e97cbe2f30e5bc03f56
7
+ data.tar.gz: d796af03288f26476ef2d8bac65ead9996ca22a94627eabab589e34eeb19fdc2552ce2fd27388eb7f6c02aa08b5745384bee276c021e06d897c94d706de5a662
@@ -20,11 +20,11 @@ module Stagehand
20
20
  return incomplete.to_h
21
21
  end
22
22
 
23
- def mismatched_records
23
+ def mismatched_records(options = {})
24
24
  output = {}
25
25
 
26
- tables = Database.staging_connection.tables.select {|table_name| Schema::has_stagehand?(table_name) }
27
- tables.each do |table_name|
26
+ tables = options[:tables] || Database.staging_connection.tables.select {|table_name| Schema::has_stagehand?(table_name) }
27
+ Array(tables).each do |table_name|
28
28
  print "\nChecking #{table_name} "
29
29
  mismatched = {}
30
30
  limit = 1000
@@ -9,12 +9,12 @@ module Stagehand
9
9
  with_staging_connection(&block)
10
10
  end
11
11
 
12
- def connected_to_production?(klass = ActiveRecord::Base)
13
- klass.connection.current_database == production_database_name
12
+ def connected_to_production?
13
+ current_connection_name == Configuration.production_connection_name
14
14
  end
15
15
 
16
- def connected_to_staging?(klass = ActiveRecord::Base)
17
- klass.connection.current_database == staging_database_name
16
+ def connected_to_staging?
17
+ current_connection_name == Configuration.staging_connection_name
18
18
  end
19
19
 
20
20
  def production_connection
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.14.2"
2
+ VERSION = "0.14.3"
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.2
4
+ version: 0.14.3
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-09-12 00:00:00.000000000 Z
12
+ date: 2017-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails