blackstack_commons 1.1.44 → 1.1.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/example02.rb +1 -1
- data/lib/functions.rb +15 -13
- 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: a285f7f7c9b60e164dea53722f55772751601015
|
4
|
+
data.tar.gz: f7af18582016a68728fe62946f16179481161b57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 464f9080de6697d80390842497f04ee735443d5cd6e5eb32f8914257fc43b37221b6affc437f47dc56554b87bcad36397e67ed7feed11754fa3aee33e0138763
|
7
|
+
data.tar.gz: dd88350e4ed8011ef87071b5701d275b84448b791d10a4ce0af43ee5f96a620419216e3db81c3d5e5417f436c2e40c25c50fe976bddfba78d9c9c2a5b534196e
|
data/examples/example02.rb
CHANGED
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
|
|
@@ -152,8 +155,7 @@ module BlackStack
|
|
152
155
|
MATCH_DOMAIN = /(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,10}/
|
153
156
|
MATCH_DATE_STANDARD = /\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])/
|
154
157
|
MATCH_PHONE = /(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/
|
155
|
-
MATCH_URL = /(https?:\/\/)?([\da-z\.-]+)
|
156
|
-
MATCH_LINKEDIN_COMPANY_URL = /(https?:\/\/)?(www\\.)?linkedin\.com\/company\//
|
158
|
+
MATCH_URL = /(https?:\/\/)?([\da-z\.-]+)([\.\:])([\da-z]{2,6})([\/[\da-z\.\-]+]*[\da-z])(\/)?(\?)?/i MATCH_LINKEDIN_COMPANY_URL = /(https?:\/\/)?(www\\.)?linkedin\.com\/company\//
|
157
159
|
MATCH_FIXNUM = /[0-9]+/
|
158
160
|
MATCH_CONTENT_SPINNING = /{[^}]+}/
|
159
161
|
MATCH_SPINNED_TEXT = /code me/ # TODO: define this regex for the issue #1226
|
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.48
|
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-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: content_spinning
|