rspeckled 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rspeckled/plugins/hooks/foreign_keys.rb +6 -8
- data/lib/rspeckled/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c55403f64a71c1a54c6be017e8e0a3be7ba3ce7d9d33ebbdc76faa0592565250
|
4
|
+
data.tar.gz: 0c2486cfd81fe7685d7e3adc5d07cbf920aae936eca7fd3f0e8d450caf23b023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4fb5c23ceabbb4679a5b13f24e4e1918428ec889682168396a0b027cf462c06f9935663410b1a2ec2614d52975d3d878e8d6f4241ed53cbd48a9e22f2bafe07
|
7
|
+
data.tar.gz: 30d3dd97d15dd19f094b68affdfe1e77adda8ab3b99c982d1ed8cd0f33fcc130cfaf9264b8a087e1d2d8d4adb52d49811cb7e8f027c2d55652c797f92990e47d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -39,15 +39,13 @@ RSpec.configure do |config|
|
|
39
39
|
HEREDOC
|
40
40
|
|
41
41
|
unless options[:tables] == :all
|
42
|
-
foreign_key_names_sql +=
|
42
|
+
foreign_key_names_sql += " AND\n"
|
43
43
|
|
44
|
-
table_constraint_sql = options[:tables]
|
45
|
-
|
46
|
-
|
44
|
+
table_constraint_sql = options[:tables]
|
45
|
+
.map { |table_name| "'#{table_name}'" }
|
46
|
+
.join(', ')
|
47
47
|
|
48
|
-
foreign_key_names_sql +=
|
49
|
-
|
50
|
-
foreign_key_names_sql += ')'
|
48
|
+
foreign_key_names_sql += %Q{ "pg_class"."relname" IN (#{table_constraint_sql})}
|
51
49
|
end
|
52
50
|
|
53
51
|
foreign_keys_to_disable = ::ActiveRecord::Base.connection.select_values(foreign_key_names_sql).join(',')
|
@@ -55,7 +53,7 @@ RSpec.configure do |config|
|
|
55
53
|
if foreign_keys_to_disable.blank?
|
56
54
|
puts 'You asked to disable foreign keys but there were no foreign keys found to disable'
|
57
55
|
else
|
58
|
-
::ActiveRecord::Base.connection.execute('SET CONSTRAINTS %<key_pattern>s DEFERRED' % { :key_pattern => foreign_keys_to_disable })
|
56
|
+
::ActiveRecord::Base.connection.execute('SET CONSTRAINTS %<key_pattern>s DEFERRED' % { :key_pattern => foreign_keys_to_disable })
|
59
57
|
end
|
60
58
|
|
61
59
|
example.run
|
data/lib/rspeckled/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspeckled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thegranddesign
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
eUgMp+qKjyM1NGj/222soSUpWqOE16L23vv8sWIbMIADdR8dephQ6jMovYylUmE5
|
36
36
|
KHp+JJQviSN0i4z8gVL2zloo+xZf791LiJH8Kcjpx43jhg0WdR4=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2018-11-
|
38
|
+
date: 2018-11-10 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rspec
|
metadata.gz.sig
CHANGED
Binary file
|