blackstack_commons 1.1.43 → 1.1.47
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/blackstack_commons.rb +1 -0
- data/lib/functions.rb +32 -1
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 563076f1c03c1a12d6d0f7095aa38aa69fd1e763
|
4
|
+
data.tar.gz: 5fd40c6852dd6608145a17c609588b957a07f5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73f8afd6e2a5f7ad813d22b24274e1999a75c5a925f3962d0cea270fd043973c5ef1fdf3f3bb3150dc1828ce3d9ad2355e53b5d81ee24566344168ee974bb17
|
7
|
+
data.tar.gz: 33a8ee4f858010097c213e5401ac9aa2d50e58b9ea038ba0328045ccbf3301d1418fc3975158f3841602646cd2ce009df7593fa7eae500735651002881d39067
|
data/examples/example02.rb
CHANGED
data/lib/blackstack_commons.rb
CHANGED
data/lib/functions.rb
CHANGED
@@ -1,6 +1,37 @@
|
|
1
1
|
|
2
2
|
module BlackStack
|
3
3
|
|
4
|
+
# -----------------------------------------------------------------------------------------
|
5
|
+
# PRY Supporting Functions
|
6
|
+
# -----------------------------------------------------------------------------------------
|
7
|
+
module Debugging
|
8
|
+
@@allow_breakpoints = false
|
9
|
+
@@verbose = false
|
10
|
+
|
11
|
+
# return true if breakpoints are allowed
|
12
|
+
def self.allow_breakpoints
|
13
|
+
@@allow_breakpoints
|
14
|
+
end
|
15
|
+
|
16
|
+
# set breakpoints allowed if the hash contains a key :allow_breakpoints with a value of true
|
17
|
+
def self.set(h)
|
18
|
+
@@allow_breakpoints = h[:allow_breakpoints] if h[:allow_breakpoints].is_a?(TrueClass)
|
19
|
+
@@verbose = h[:verbose] if h[:verbose].is_a?(TrueClass)
|
20
|
+
|
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
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
4
35
|
# -----------------------------------------------------------------------------------------
|
5
36
|
# OCRA Supporting Functions
|
6
37
|
# -----------------------------------------------------------------------------------------
|
@@ -124,7 +155,7 @@ module BlackStack
|
|
124
155
|
MATCH_DOMAIN = /(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,10}/
|
125
156
|
MATCH_DATE_STANDARD = /\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])/
|
126
157
|
MATCH_PHONE = /(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/
|
127
|
-
MATCH_URL = /(https?:\/\/)?([\da-z\.-]+)
|
158
|
+
MATCH_URL = /(https?:\/\/)?([\da-z\.-]+)([\.\:])([\da-z]{2,6})([\/[\da-z\.\-]+]*)(\/)?(\?)?/i
|
128
159
|
MATCH_LINKEDIN_COMPANY_URL = /(https?:\/\/)?(www\\.)?linkedin\.com\/company\//
|
129
160
|
MATCH_FIXNUM = /[0-9]+/
|
130
161
|
MATCH_CONTENT_SPINNING = /{[^}]+}/
|
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.47
|
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
|
@@ -50,6 +50,26 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 1.8.1
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: pry
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 0.14.1
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.14.1
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.14.1
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.14.1
|
53
73
|
description: 'THIS GEM IS STILL IN DEVELOPMENT STAGE. Find documentation here: https://github.com/leandrosardi/blackstack_commons.'
|
54
74
|
email: leandro.sardi@expandedventure.com
|
55
75
|
executables: []
|