lit-cli 0.8.0 → 0.8.1
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/lit_cli.rb +4 -1
- data/lib/lit_pry.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bff5862a0ee594b96b966d6ad15ef676d05596d482d24fdc8a306a56c3da7fb
|
4
|
+
data.tar.gz: 1c9f6b6abbab643a39240b2eb8ce683ed837d61a3ca8566f35503ace57d9dbe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: addedd58a2dfe45a83b19597441735848a9014b9c379ce0864116bf2adfb325f0748d0d3733d5c6df6ca6a5d8731bb91bc86eed887d32ecc001270e64bc9268c
|
7
|
+
data.tar.gz: 03637e11d55ac63c0fe89d28355ce34cdda0159790069a59e8c2039bd803f83771d17cdf6a1b4e3eaa0da8c37d8b18aa65254184e449fbe3749661fb874953bb
|
data/lib/lit_cli.rb
CHANGED
@@ -85,7 +85,10 @@ module LitCLI
|
|
85
85
|
puts "#{indent}🔥 Press ENTER to step or P to Pry:"
|
86
86
|
input = gets.chomp
|
87
87
|
binding while input == nil
|
88
|
-
|
88
|
+
if input.downcase == "p"
|
89
|
+
puts @@pastel.dim("Enter X to exit Pry or !!! to exit program.")
|
90
|
+
@@is_prying = true
|
91
|
+
end
|
89
92
|
end
|
90
93
|
end
|
91
94
|
|
data/lib/lit_pry.rb
CHANGED
@@ -107,3 +107,17 @@ if ENV['LIT_ENABLED'] && ENV['LIT_ENABLED'].to_i >= (Time.now.to_i() - 1) && ENV
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Add custom Pry command for a nicer exiting experience.
|
113
|
+
# @see https://github.com/pry/pry/wiki/Custom-commands
|
114
|
+
##
|
115
|
+
command_description = "Alias for `exit`"
|
116
|
+
|
117
|
+
Pry::Commands.block_command "x", command_description do
|
118
|
+
run "exit"
|
119
|
+
end
|
120
|
+
|
121
|
+
Pry::Commands.block_command "X", command_description do
|
122
|
+
run "exit"
|
123
|
+
end
|