blackstack_commons 1.1.42 → 1.1.46

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
  SHA1:
3
- metadata.gz: 4f72ddf1432211dec45c5288eb7ccd1a3c51824f
4
- data.tar.gz: 23eb0b0027a1b9e3bd07a5798c92760ce2bccb75
3
+ metadata.gz: c6b57c738f8499ebc38d5be99f5937759baf7123
4
+ data.tar.gz: 3de3276efe5a38ade0c72d40b480643e88b290c5
5
5
  SHA512:
6
- metadata.gz: 5ed23e9086cd0dd9e9d0d746b4308142d2443c7fdaefff25297ca0a8d3a3088fbc458233b703a9c50d7d88f71893433c1c405945856c59135880188bd0f3f02c
7
- data.tar.gz: 6f6c9203a3c3fdd0e04c7c14fd7325eae02db3d848e52e99407be302040cfeffd6f7db1f5db1c2b9401c3156fdfd9044c20fa0d1f08cd7f20c4e30464ba972cd
6
+ metadata.gz: cc67e56c192e0ea1686716022bdb587653d0ccfdd0523111fc9f8f31bf5f4361ab4e557ee890115408660a5d9845a4dcfd528dba5f517984c2559fd8f8c8a785
7
+ data.tar.gz: 59c77ba407a165cabb412d010fc3dcb2c4cd81a038d37e367a60feae1e469ced9570aa48439e6db5436b81b72aa4f824629de57f32640630afee4de75374ebd5
@@ -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')
@@ -1,3 +1,4 @@
1
+ require 'pry'
1
2
  require 'content_spinning'
2
3
  require 'uri'
3
4
  require 'json'
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\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?/ # /(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/
158
+ MATCH_URL = /(https?:\/\/)?([\da-z\.-]+)(\.)([\da-z]{2,6})(\/[\da-z\.-]*[\da-z])*(\/)?/
128
159
  MATCH_LINKEDIN_COMPANY_URL = /(https?:\/\/)?(www\\.)?linkedin\.com\/company\//
129
160
  MATCH_FIXNUM = /[0-9]+/
130
161
  MATCH_CONTENT_SPINNING = /{[^}]+}/
@@ -369,13 +400,15 @@ module BlackStack
369
400
  return false if n>1 # Opening spining char '{' inside another spining block.
370
401
  end
371
402
  }
372
-
403
+
404
+ return false if n!=0
405
+
373
406
  # obtengo cada uno de los spinnings
374
407
  s.scan(MATCH_CONTENT_SPINNING).each { |x|
375
408
  a = x.split('|')
376
409
  raise "No variations delimited by '|' inside spinning block." if a.size <= 1
377
410
  }
378
-
411
+
379
412
  true
380
413
  end
381
414
 
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.42
4
+ version: 1.1.46
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-07-19 00:00:00.000000000 Z
11
+ date: 2021-12-29 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: []