blackstack_commons 1.1.44 → 1.1.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/functions.rb +14 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78fbaedcc54afdcf8afc8b911be0b2dabd1a1a09
|
4
|
+
data.tar.gz: f96e8330817679e7db3eddca99003ca56f46b51d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03360144799b037c7ac529fabb6e84d90994812df8c3f8e172287d7357458f932fc4a2cf38d29e50a57ddac7cfbcca7bccb28c8758efeff416ca485f534adf72
|
7
|
+
data.tar.gz: 61a37703f38eb16749a708255a9f948d24119c50b2f77682af847d04953cd1bf562652970fa4e3fabeede949a55e91dc303c3812e886e76247592bb981e08c7b
|
data/lib/functions.rb
CHANGED
@@ -6,7 +6,8 @@ module BlackStack
|
|
6
6
|
# -----------------------------------------------------------------------------------------
|
7
7
|
module Debugging
|
8
8
|
@@allow_breakpoints = false
|
9
|
-
|
9
|
+
@@verbose = false
|
10
|
+
|
10
11
|
# return true if breakpoints are allowed
|
11
12
|
def self.allow_breakpoints
|
12
13
|
@@allow_breakpoints
|
@@ -15,17 +16,19 @@ module BlackStack
|
|
15
16
|
# set breakpoints allowed if the hash contains a key :allow_breakpoints with a value of true
|
16
17
|
def self.set(h)
|
17
18
|
@@allow_breakpoints = h[:allow_breakpoints] if h[:allow_breakpoints].is_a?(TrueClass)
|
18
|
-
|
19
|
+
@@verbose = h[:verbose] if h[:verbose].is_a?(TrueClass)
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
if !@@allow_breakpoints
|
22
|
+
# monkey patching the pry method to not break on breakpoints
|
23
|
+
new_pry = lambda do
|
24
|
+
print "Breakpoint are not allowed" if @@verbose
|
25
|
+
end
|
26
|
+
|
27
|
+
Binding.class_eval do
|
28
|
+
alias_method :old_pry, :pry
|
29
|
+
define_method :pry, new_pry
|
30
|
+
end
|
31
|
+
end
|
29
32
|
end
|
30
33
|
end
|
31
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackstack_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro Daniel Sardi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: content_spinning
|