lit-cli 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lit_cli.rb +4 -1
  3. data/lib/lit_pry.rb +14 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7d27ec65b3d6ead4109e2ec4509c30ad071645bb2f0cac4b8e9fd0ee27e1e2e
4
- data.tar.gz: efd72529bd96e50d8e286ab9cf3fe610e6077728282a15bd640c5195d15a8562
3
+ metadata.gz: 1bff5862a0ee594b96b966d6ad15ef676d05596d482d24fdc8a306a56c3da7fb
4
+ data.tar.gz: 1c9f6b6abbab643a39240b2eb8ce683ed837d61a3ca8566f35503ace57d9dbe5
5
5
  SHA512:
6
- metadata.gz: c5ab9a686068313a84c120a354303ccdc2d9d24db4e6eafaf0ea45c9adedf8b59952b0503f52268b5765b45a5bb1f0bc0800d0b199d770a3f87b9c90e4d1b700
7
- data.tar.gz: 548cb66165d4f9b9b396dbd7e2d554008d7450d2bafadfdb13a8fe19b61b104bf80428d1ae3c90120bc368bf8ce4d84484594237f82929bd37f8712797c7fe71
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
- @@is_prying = true if input.downcase == "p"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lit-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maedi Prichard