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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af627626dd5cab004774299caee7665e952fb547
4
- data.tar.gz: 2a9d96e2c05e971528015a01dfb53a1beeb038cf
3
+ metadata.gz: a285f7f7c9b60e164dea53722f55772751601015
4
+ data.tar.gz: f7af18582016a68728fe62946f16179481161b57
5
5
  SHA512:
6
- metadata.gz: 9ff40e6c37b33d171adbf310779c55386f89105d2509d9fc6a9f87e7ec58e6f4bf06ef263fe6837c6c8a229e3631f6900dd3f27f996700b7207bc16dc1686fe0
7
- data.tar.gz: 9e6f8aeff75ef5bb189dbb6da813b13c9c979d97fc7d411312f3d833c1ea3bcd3586405df18ce7326474040e0dad92b35f92b058e19b4d9df72ae17bd0b12c25
6
+ metadata.gz: 464f9080de6697d80390842497f04ee735443d5cd6e5eb32f8914257fc43b37221b6affc437f47dc56554b87bcad36397e67ed7feed11754fa3aee33e0138763
7
+ data.tar.gz: dd88350e4ed8011ef87071b5701d275b84448b791d10a4ce0af43ee5f96a620419216e3db81c3d5e5417f436c2e40c25c50fe976bddfba78d9c9c2a5b534196e
@@ -1,3 +1,3 @@
1
1
  require_relative '../lib/blackstack_commons'
2
2
 
3
- BlackStack::Netting::api_call('https://connectionsphere.com/api1.4/ping.json')
3
+ BlackStack::Netting::api_call('https://connectionsphere.com/api1.3/pampa/ping.json')
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
- end
19
+ @@verbose = h[:verbose] if h[:verbose].is_a?(TrueClass)
19
20
 
20
- # BlackStack::Debugging.breakpoint can be invoked in the middle of a running program.
21
- # It opens a Pry session at the point it's called and makes all program state at that point available.
22
- # When the session ends the program continues with any modifications you made to it.
23
- #
24
- # BlackStack::Debugging.breakpoint is just calling the Pry's `binding.pry` method, but only if the @@allow_breakpoints is true.
25
- #
26
- def self.breakpoint()
27
- # start a REPL session, if breakpoints are allowed
28
- binding.pry if @@allow_breakpoints
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\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?/ # /(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/
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.44
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-10-30 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: content_spinning