yap-shell 0.4.8 → 0.4.9
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/bin/yap +41 -23
- data/lib/yap/shell/version.rb +1 -1
- data/yap-shell.gemspec +2 -2
- metadata +11 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a1ba2e75f86000c31cb6cfaff1d70dd723b5fd3
|
|
4
|
+
data.tar.gz: 5f2e8e4895adadbaa8f17d467990c6364c717478
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb0bc319917d0aafde0fddeb14a8d269c8cd3c2419dbb8057c22c55277cfb1785d74da3d7953f1199a2148880cf0d2faf0e2c00606872aab11c86153e74301b3
|
|
7
|
+
data.tar.gz: 087b233e0a51f4b7c6e5becdd249a27c1adf36cd2e86c835079e4ab5b8bc77615d0c363ac0b8e76116e1adfe0edd8b8e19f3252310e201156470e9d773497d5d
|
data/bin/yap
CHANGED
|
@@ -1,32 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
if ENV["YAP_SHELL"].nil?
|
|
4
|
+
# Start YAP with a pristine environment
|
|
5
|
+
env2keep = {
|
|
6
|
+
'PATH' => ENV['PATH'],
|
|
7
|
+
'HOME' => ENV['HOME'],
|
|
8
|
+
'RUBYOPT' => '-rubygems -EUTF-8',
|
|
9
|
+
'TREEFELL_OUT' => ENV['TREEFELL_OUT'],
|
|
10
|
+
'DEBUG' => ENV['DEBUG'],
|
|
11
|
+
'YAP_SHELL' => 'active'
|
|
12
|
+
}
|
|
13
|
+
env_params = env2keep.each_with_object([]) do |(key,value),arr|
|
|
14
|
+
next if value.nil?
|
|
15
|
+
arr << %|#{key}="#{value}"|
|
|
16
|
+
end.join(' ')
|
|
17
|
+
cmd = %|env -i #{env_params} #{$0}|
|
|
18
|
+
exec cmd
|
|
19
|
+
else
|
|
20
|
+
file = __FILE__
|
|
21
|
+
if File.symlink?(file)
|
|
22
|
+
file = File.readlink(file)
|
|
23
|
+
end
|
|
7
24
|
|
|
8
|
-
trap "SIGTSTP", "IGNORE"
|
|
9
|
-
trap "SIGINT", "IGNORE"
|
|
10
|
-
trap "SIGTTIN", "IGNORE"
|
|
11
|
-
trap "SIGTTOU", "IGNORE"
|
|
25
|
+
trap "SIGTSTP", "IGNORE"
|
|
26
|
+
trap "SIGINT", "IGNORE"
|
|
27
|
+
trap "SIGTTIN", "IGNORE"
|
|
28
|
+
trap "SIGTTOU", "IGNORE"
|
|
12
29
|
|
|
13
|
-
$LOAD_PATH.unshift File.dirname(file) + '/../lib'
|
|
30
|
+
$LOAD_PATH.unshift File.dirname(file) + '/../lib'
|
|
14
31
|
|
|
15
|
-
ENV['TERM'] ||= 'linux'
|
|
32
|
+
ENV['TERM'] ||= 'linux'
|
|
16
33
|
|
|
17
|
-
# Delete all RBENV/RVM environment variables
|
|
18
|
-
# Once we're booted, we don't want them being inherited
|
|
19
|
-
# by other child processes since those children cannot
|
|
20
|
-
# modify Yap's ENV, only their own child env.
|
|
21
|
-
ENV.keys.each do |key|
|
|
22
|
-
|
|
23
|
-
|
|
34
|
+
# Delete all RBENV/RVM environment variables
|
|
35
|
+
# Once we're booted, we don't want them being inherited
|
|
36
|
+
# by other child processes since those children cannot
|
|
37
|
+
# modify Yap's ENV, only their own child env.
|
|
38
|
+
ENV.keys.each do |key|
|
|
39
|
+
if key =~ /^(rbenv_|rvm_)/i
|
|
40
|
+
ENV.delete(key)
|
|
41
|
+
end
|
|
24
42
|
end
|
|
25
|
-
end
|
|
26
43
|
|
|
27
|
-
require "term/ansicolor"
|
|
28
|
-
require "pry"
|
|
29
|
-
require "yap"
|
|
44
|
+
require "term/ansicolor"
|
|
45
|
+
require "pry"
|
|
46
|
+
require "yap"
|
|
30
47
|
|
|
31
|
-
STDOUT.sync = true
|
|
32
|
-
Yap.run_shell
|
|
48
|
+
STDOUT.sync = true
|
|
49
|
+
Yap.run_shell
|
|
50
|
+
end
|
data/lib/yap/shell/version.rb
CHANGED
data/yap-shell.gemspec
CHANGED
|
@@ -28,11 +28,11 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
|you just installed it for. For example, with rbenv I use the below
|
|
29
29
|
|alias in my ~/.profile file:
|
|
30
30
|
|
|
|
31
|
-
| alias yap='
|
|
31
|
+
| alias yap='rbenv local 2.2.3 && yap'
|
|
32
32
|
|
|
|
33
33
|
|If you are interested in tracing yap's execution you can add the DEBUG and TREEFELL_OUT options:
|
|
34
34
|
|
|
|
35
|
-
| alias yap-debug='
|
|
35
|
+
| alias yap-debug='rbenv local 2.2.3 ; DEBUG=* TREEFELL_OUT=/tmp/yap-debug.log yap'
|
|
36
36
|
|
|
|
37
37
|
|Then, `source ~/.profile` or reload your shell. Now you can finally run:
|
|
38
38
|
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yap-shell
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zach Dennis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-05-
|
|
11
|
+
date: 2016-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry-byebug
|
|
@@ -231,17 +231,15 @@ post_install_message: "\nGreetings forward-thinking traveler!\n\nLet's waste no
|
|
|
231
231
|
this is my beta's beta. Yap has many cool ideas. I dare\nsay some of those made
|
|
232
232
|
it into this very release.\n\n\e[033mLastly\e[0m, create an alias to the yap executable
|
|
233
233
|
using the ruby version\nyou just installed it for. For example, with rbenv I use
|
|
234
|
-
the below\nalias in my ~/.profile file:\n\n alias yap='
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
yap
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
emoji friends waiting to hear your\nthoughts. All day. All night.\n\nUntil the next
|
|
244
|
-
update: Happy coding!\n\nSincerely,\n\n \e[51mThe Lagniappe (Yap) Shell\e[0m\n\n\e[033mP.S.\e[0m
|
|
234
|
+
the below\nalias in my ~/.profile file:\n\n alias yap='rbenv local 2.2.3 && yap'\n\nIf
|
|
235
|
+
you are interested in tracing yap's execution you can add the DEBUG and TREEFELL_OUT
|
|
236
|
+
options:\n\n alias yap-debug='rbenv local 2.2.3 ; DEBUG=* TREEFELL_OUT=/tmp/yap-debug.log
|
|
237
|
+
yap'\n\nThen, `source ~/.profile` or reload your shell. Now you can finally run:\n\n
|
|
238
|
+
\ yap\n\nYou know your tooling better than me. If you need things to go a little\ndifferently
|
|
239
|
+
than above you go right ahead. If any questions arise don't\nhesitate to holler
|
|
240
|
+
over at Github. I may not always be home, but there will\nalways be a cozy textarea
|
|
241
|
+
with dozens of emoji friends waiting to hear your\nthoughts. All day. All night.\n\nUntil
|
|
242
|
+
the next update: Happy coding!\n\nSincerely,\n\n \e[51mThe Lagniappe (Yap) Shell\e[0m\n\n\e[033mP.S.\e[0m
|
|
245
243
|
If you have ideas for loading other than the hard-coded\nalias, do tell, right over
|
|
246
244
|
here:\n\n \e[1mhttp://github.com/zdennis/yap-shell/issues\e[0m\n\n\e[033mP.P.S.\e[0m
|
|
247
245
|
OSX support? YES! Linux? I assume YES! Windows? Um...\n\n"
|