extra_print 1.1.1 → 1.1.4
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 +4 -4
- data/lib/extra_print.rb +14 -15
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 452f4942f9ce05acba72cf92e1472d83cda3684a
|
4
|
+
data.tar.gz: '089b882bf26e5af5376f076eb3797bd25f485991'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae04a466c7b6045c303f7937c294fff6b112607169ba65f49551e8701ab36172dc307f0b375caa89e50771740074b57738573022480ad5522635a9189e4db842
|
7
|
+
data.tar.gz: 884c0d4185457618de5615fdae36cf5baed380b49d27dc979bddf14dbd65b8dfb06e5792c2351b4b2c3631b63d20dffb9aad709e20fb9661d26736a33121e490
|
data/lib/extra_print.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
$COLORS = {'red' => '031','green' => '032','yellow' => '033','blue' => '034','magenta' => '035','cyan' => '036'}
|
2
|
+
$EMOJIS = %w"😎 😈 👹 👺 👻 👿 💀 👽 😂 🤣 🎃 🐶 🦊 ⭐ 🌟 🏈 🏀 ⚽ ⛔ ❓ 💽 🎁 🌠 🥓 🍤 🍗 🍖 🍕 🍰 🍦 🍭"
|
2
3
|
|
3
4
|
#### DEBUGGING gems ####
|
4
5
|
# require 'awesome_print'
|
@@ -10,18 +11,18 @@ $COLORS = {'red' => '031','green' => '032','yellow' => '033','blue' => '034','ma
|
|
10
11
|
# There are cleaner ways of doing the color manipulation
|
11
12
|
# But this approach avoids extra dependencies, which is better :-)
|
12
13
|
|
13
|
-
def eap(
|
14
|
+
def eap(*args)
|
14
15
|
@caller_path = caller
|
15
|
-
return display_emoji_break
|
16
|
-
extra_print(
|
17
|
-
|
16
|
+
return display_emoji_break if args.empty?
|
17
|
+
extra_print(args[0], args[1], true)
|
18
|
+
args[0]
|
18
19
|
end
|
19
20
|
|
20
|
-
def ep(
|
21
|
+
def ep(*args)
|
21
22
|
@caller_path = caller
|
22
|
-
return display_emoji_break
|
23
|
-
extra_print(
|
24
|
-
|
23
|
+
return display_emoji_break if args.empty?
|
24
|
+
extra_print(args[0], args[1])
|
25
|
+
args[0]
|
25
26
|
end
|
26
27
|
|
27
28
|
private
|
@@ -48,16 +49,15 @@ def display_variable(add_awesome_print)
|
|
48
49
|
proc = Proc.new { @variable }
|
49
50
|
if add_awesome_print
|
50
51
|
require 'awesome_print'
|
51
|
-
ap proc.call
|
52
|
+
ap proc.call
|
52
53
|
else
|
53
|
-
p proc.call
|
54
|
+
p proc.call
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
57
|
-
#
|
58
|
+
# rando emojis for fun && eye catching line breaks
|
58
59
|
def display_emoji_break
|
59
|
-
|
60
|
-
emoji = chars.sample
|
60
|
+
emoji = $EMOJIS.sample
|
61
61
|
print "#{emoji} " * 15
|
62
62
|
print " #{path_clip} "
|
63
63
|
puts "#{emoji} " * 15
|
@@ -69,13 +69,12 @@ def display_footer
|
|
69
69
|
str += "\033[#{@secondary_color}m #{@msg} "
|
70
70
|
str += "\033[#{@color}m⬆ \033[0m" * ((@length / 4))
|
71
71
|
puts str
|
72
|
-
puts
|
73
72
|
end
|
74
73
|
|
75
74
|
def display_detail_header
|
76
75
|
|
77
76
|
# Initial arrows with a new line padding the top
|
78
|
-
str = "
|
77
|
+
str = ""
|
79
78
|
str += "\033[#{@color}m⬇ \033[m" * 5
|
80
79
|
|
81
80
|
# Variable Class Display
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extra_print
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hunter Chapman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -57,9 +57,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.6.
|
60
|
+
rubygems_version: 2.6.11
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: Easily spot variables printed in a busy console.
|
64
64
|
test_files: []
|
65
|
-
has_rdoc:
|