hecks 3.0.0 → 3.0.1
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d36051842e6b18aa1f52af8b4c4a3b8e4d36cf69b66b62cf4d9119a8a160f68
|
|
4
|
+
data.tar.gz: ad1ed152aafd1c09c7aadd890ce80aa2690fda9e51fdbb9a231fdd7c97dfcb55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f711d13656e8af3eb9a3023436979beff389ba3e07804b49031631e114d1063ac983657757a3fce5f67c55f91d12bac1c2e99b7c8e4e239e25bf37f5f5e506b4
|
|
7
|
+
data.tar.gz: bf9daee0b3e0b4b8e1660bd2143fdbac674a8b59a65cf2f2ca6b0958c4e9c1bf5c6b7a1f55aac9d5bcdde09154c7937aa445fb9036c9e10c7ced434e864434f7
|
|
@@ -49,7 +49,11 @@ module Hecks
|
|
|
49
49
|
# **Lazy, on purpose** — same reasoning as PostgresEra's own
|
|
50
50
|
# connect_for: a domain that never wires Postgres should never
|
|
51
51
|
# need the gem installed.
|
|
52
|
-
|
|
52
|
+
begin
|
|
53
|
+
require "pg"
|
|
54
|
+
rescue LoadError
|
|
55
|
+
raise LoadError, "#{name} binds Postgres, which needs the pg gem: add `gem \"pg\"` to the Gemfile"
|
|
56
|
+
end
|
|
53
57
|
|
|
54
58
|
declared = settings.key?(:database) ? settings[:database] : settings["database"]
|
|
55
59
|
if declared.to_s.empty?
|
|
@@ -75,7 +79,10 @@ module Hecks
|
|
|
75
79
|
# boot after the first, not news.
|
|
76
80
|
connection.exec("SET client_min_messages = warning")
|
|
77
81
|
connection
|
|
78
|
-
rescue
|
|
82
|
+
rescue StandardError => e
|
|
83
|
+
# PG is only defined once the gem loads, so the clause cannot name it.
|
|
84
|
+
raise unless defined?(PG::Error) && e.is_a?(PG::Error)
|
|
85
|
+
|
|
79
86
|
raise Runtime::WiringError,
|
|
80
87
|
"cannot bind Postgres at #{declared} for #{name}: #{e.message.strip}"
|
|
81
88
|
end
|
|
@@ -43,10 +43,14 @@ module Hecks
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
options = Options.new(strict, profile, root && File.join(root, "rust"))
|
|
46
|
-
ok =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
ok = begin
|
|
47
|
+
if argv.any? then check_domains(argv, options)
|
|
48
|
+
elsif root then check_corpus(root, options)
|
|
49
|
+
else abort "usage: #{program} [--strict] [--profile client] <domain> [<domain> …]"
|
|
50
|
+
end
|
|
51
|
+
rescue Bluebook::DSL::Malformed => e
|
|
52
|
+
abort "#{program}: #{e.message}"
|
|
53
|
+
end
|
|
50
54
|
|
|
51
55
|
puts
|
|
52
56
|
puts ok ? "No dead states, no unreachable protocol steps." : "THE MODEL HAS FINDINGS."
|
|
@@ -85,7 +85,11 @@ module Hecks
|
|
|
85
85
|
# @raise [Runtime::WiringError] if `database` is missing or Postgres refuses a statement
|
|
86
86
|
def self.connect_for(name, settings)
|
|
87
87
|
# Lazy so a domain that never wires PostgresEra does not need the pg gem.
|
|
88
|
-
|
|
88
|
+
begin
|
|
89
|
+
require "pg"
|
|
90
|
+
rescue LoadError
|
|
91
|
+
raise LoadError, "#{name} binds PostgresEra, which needs the pg gem: add `gem \"pg\"` to the Gemfile"
|
|
92
|
+
end
|
|
89
93
|
|
|
90
94
|
declared = setting(settings, :database)
|
|
91
95
|
if declared.to_s.empty?
|
|
@@ -114,7 +118,10 @@ module Hecks
|
|
|
114
118
|
# Warnings and above still surface.
|
|
115
119
|
connection.exec("SET client_min_messages = warning")
|
|
116
120
|
connection
|
|
117
|
-
rescue
|
|
121
|
+
rescue StandardError => e
|
|
122
|
+
# PG is only defined once the gem loads, so the clause cannot name it.
|
|
123
|
+
raise unless defined?(PG::Error) && e.is_a?(PG::Error)
|
|
124
|
+
|
|
118
125
|
raise Runtime::WiringError,
|
|
119
126
|
"cannot bind PostgresEra at #{declared} for #{name}: #{e.message.strip}"
|
|
120
127
|
end
|
data/lib/hecks/version.rb
CHANGED
data/rust/host/HECKS_RELEASE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1
|