blackstack_commons 1.1.43 → 1.1.44

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: fea045fbb95c6711f478a1a55c0be53aa80358c5
4
- data.tar.gz: ef7365454f7635ee90b2d0a222c6e2c6e40f5139
3
+ metadata.gz: af627626dd5cab004774299caee7665e952fb547
4
+ data.tar.gz: 2a9d96e2c05e971528015a01dfb53a1beeb038cf
5
5
  SHA512:
6
- metadata.gz: a8e5d5254b58e2230a93ddd32b5ea42de658ebf075af6f91148e6035f640de5ad00aea96e63f68d02b08e21cbd4b9a20928bf0aa0b27aff667581287a3b78fcc
7
- data.tar.gz: c6883e896e9805a3351be11370118170a9bb546b386edd3478d371f86e5469bcae2472eb6262a34f4381413eb126f65a7d379043ca3ae9e5b2ed520d4ccdfc36
6
+ metadata.gz: 9ff40e6c37b33d171adbf310779c55386f89105d2509d9fc6a9f87e7ec58e6f4bf06ef263fe6837c6c8a229e3631f6900dd3f27f996700b7207bc16dc1686fe0
7
+ data.tar.gz: 9e6f8aeff75ef5bb189dbb6da813b13c9c979d97fc7d411312f3d833c1ea3bcd3586405df18ce7326474040e0dad92b35f92b058e19b4d9df72ae17bd0b12c25
@@ -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,34 @@
1
1
 
2
2
  module BlackStack
3
3
 
4
+ # -----------------------------------------------------------------------------------------
5
+ # PRY Supporting Functions
6
+ # -----------------------------------------------------------------------------------------
7
+ module Debugging
8
+ @@allow_breakpoints = false
9
+
10
+ # return true if breakpoints are allowed
11
+ def self.allow_breakpoints
12
+ @@allow_breakpoints
13
+ end
14
+
15
+ # set breakpoints allowed if the hash contains a key :allow_breakpoints with a value of true
16
+ def self.set(h)
17
+ @@allow_breakpoints = h[:allow_breakpoints] if h[:allow_breakpoints].is_a?(TrueClass)
18
+ end
19
+
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
29
+ end
30
+ end
31
+
4
32
  # -----------------------------------------------------------------------------------------
5
33
  # OCRA Supporting Functions
6
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.43
4
+ version: 1.1.44
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-09-05 00:00:00.000000000 Z
11
+ date: 2021-10-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: []