yap-shell 0.4.5 → 0.4.6

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: d9694f89f2c9e5c706fd5366e9d9cd3d3030137f
4
- data.tar.gz: 45d092310b1f1a1aba4f0c50a356393c123798b5
3
+ metadata.gz: 4cc89c28c4f112f3ff1abef087ca640c1adaa5b4
4
+ data.tar.gz: bf3879fbceac69355832fa42e082510898d0b739
5
5
  SHA512:
6
- metadata.gz: d6cacce91721d91e0aab0a805f22d1b01e006c7de639f4f779f0ae8e2b7c00e48144ab608f43aa8fe686d1720d768f2d1ee47217a659d010c668459d42f7bbb9
7
- data.tar.gz: ef3856b79228091b42dbbbe1b8ea1ef5618c63031433ce40a34549125283f0faaab5ba8e180b67676578e4c0e6a49b88112dd69ee00203bfff7236c2ee30d6be
6
+ metadata.gz: b473a1906ba0a6476ecd08dae4434f450e89f157b459ce45af5d69db6a0b311eaab8fba10cfd893c9fd4f41442f8e89836d31e71bdc440b8f657e9881251c262
7
+ data.tar.gz: 1eb6e01f677f55f4b3203e513b6b2f51334a2546876804f863cbf96c2ec9a27f17b41efc30b04754dbc4f8fed96ad615c3b74f0ce6813a53954b7e5918347bbc
data/bin/yap CHANGED
@@ -12,6 +12,20 @@ trap "SIGTTOU", "IGNORE"
12
12
 
13
13
  $LOAD_PATH.unshift File.dirname(file) + '/../lib'
14
14
 
15
+ ENV['TERM'] ||= 'linux'
16
+
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
+ if key =~ /^(rbenv_|rvm_)/i
23
+ ENV.delete(key)
24
+ end
25
+ end
26
+
27
+ require "term/ansicolor"
28
+ require "pry"
15
29
  require "yap"
16
30
 
17
31
  STDOUT.sync = true
@@ -18,7 +18,8 @@ module Yap
18
18
  ]
19
19
 
20
20
  @rcfiles = [
21
- "#{ENV['HOME']}/.yaprc"
21
+ "#{ENV['HOME']}/.yaprc",
22
+ yap_path.join("yaprc")
22
23
  ]
23
24
  end
24
25
 
@@ -1,5 +1,5 @@
1
1
  module Yap
2
2
  module Shell
3
- VERSION = "0.4.5"
3
+ VERSION = "0.4.6"
4
4
  end
5
5
  end
data/lib/yap/shell.rb CHANGED
@@ -102,7 +102,6 @@ module Yap
102
102
  @world.editor.puts "^C"
103
103
  retry
104
104
  rescue Exception => ex
105
- require 'pry'
106
105
  binding.pry unless ex.is_a?(SystemExit)
107
106
  end
108
107
  end
data/rcfiles/.yaprc CHANGED
@@ -1,36 +1,15 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- # ENV["PATH"] = "/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/share/npm/bin/:/usr/local/heroku/bin:/Users/zdennis/.bin:/Users/zdennis/.rvm/gems/ruby-2.1.5/bin:/Users/zdennis/.rvm/gems/ruby-2.1.5@global/bin:/Users/zdennis/.rvm/rubies/ruby-2.1.5/bin:/usr/local/bin:/usr/local/sbin:/Users/zdennis/bin:/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/CrossPack-AVR/bin:/private/tmp/.tidbits/bin:/Users/zdennis/source/playground/AdobeAir/AdobeAIRSDK/bin:/Users/zdennis/.rvm/bin:/Users/zdennis/Downloads/adt-bundle-mac-x86_64-20130219/sdk/tools/:/Users/zdennis/.rvm/bin"
4
- # ENV["GEM_HOME"] = "/Users/zdennis/.rvm/gems/ruby-2.1.5:/Users/zdennis/.rvm/gems/ruby-2.1.5@global"
5
-
6
- # This is only necessary when starting yap from another shell as it inherits that shell's
7
- # environment.
8
- keys2keep = %w(COLORFGBG DISPLAY EDITOR HOME LANG LOGNAME MAIL PATH PS1 PWD SHELL SHLVL SSH_AUTH_SOCK SUDO_COMMAND SUDO_GID SUDO_UID SUDO_USER TERM USER USERNAME _ __CF_USER_TEXT_ENCODING)
9
- world.env.keys.sort.each do |key|
10
- unless keys2keep.include?(key)
11
- world.env.delete(key)
12
- end
13
- end
14
-
15
3
  world.env["PATH"] = [
16
4
  world.env["HOME"] + "/.rbenv/shims",
17
5
  "/usr/local/bin",
18
6
  world.env["PATH"]
19
7
  ].join(":")
20
8
 
21
- world.env.delete("RBENV_DIR")
22
- world.env.delete("RBENV_DIR")
23
- world.env.delete("RBENV_HOOK_PATH")
24
- world.env.delete("RBENV_ROOT")
25
- world.env.delete("RBENV_VERSION")
26
-
27
9
  require 'chronic'
28
10
  require 'term/ansicolor'
29
11
  require 'terminfo'
30
12
 
31
- env.delete("BUNDLE_GEMFILE")
32
- env.delete("BUNDLE_BIN_PATH")
33
-
34
13
  # Resize history to be infinite
35
14
  infinity = 1 / 0.0
36
15
  world.history.resize(infinity)
data/yap-shell.gemspec CHANGED
@@ -28,7 +28,7 @@ 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="rbenv local 2.2.3 && rbenv exec yap"
31
+ | alias yap='env -i PATH=$PATH RUBYOPT="-rubygems -EUTF-8" HOME=$HOME sh -c "rbenv local 2.2.3 && yap"'
32
32
  |
33
33
  |Then, `source ~/.profile` or reload your shell. Now you can finally run:
34
34
  |
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yap-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis
@@ -231,15 +231,16 @@ 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=\"rbenv local 2.2.3 &&
235
- rbenv exec yap\"\n\nThen, `source ~/.profile` or reload your shell. Now you can
236
- finally run:\n\n yap\n\nYou know your tooling better than me. If you need things
237
- to go a little\ndifferently than above you go right ahead. If any questions arise
238
- don't\nhesitate to holler over at Github. I may not always be home, but there will\nalways
239
- be a cozy textarea with dozens of emoji friends waiting to hear your\nthoughts.
240
- All day. All night.\n\nUntil the next update: Happy coding!\n\nSincerely,\n\n \e[51mThe
241
- Lagniappe (Yap) Shell\e[0m\n\n\e[033mP.S.\e[0m If you have ideas for loading other
242
- than the hard-coded\nalias, do tell, right over here:\n\n \e[1mhttp://github.com/zdennis/yap-shell/issues\e[0m\n\n\e[033mP.P.S.\e[0m
234
+ the below\nalias in my ~/.profile file:\n\n alias yap='env -i PATH=$PATH RUBYOPT=\"-rubygems
235
+ -EUTF-8\" HOME=$HOME sh -c \"rbenv local 2.2.3 && yap\"'\n\nThen, `source ~/.profile`
236
+ or reload your shell. Now you can finally run:\n\n yap\n\nYou know your tooling
237
+ better than me. If you need things to go a little\ndifferently than above you go
238
+ right ahead. If any questions arise don't\nhesitate to holler over at Github. I
239
+ may not always be home, but there will\nalways be a cozy textarea with dozens of
240
+ emoji friends waiting to hear your\nthoughts. All day. All night.\n\nUntil the next
241
+ update: Happy coding!\n\nSincerely,\n\n \e[51mThe Lagniappe (Yap) Shell\e[0m\n\n\e[033mP.S.\e[0m
242
+ If you have ideas for loading other than the hard-coded\nalias, do tell, right over
243
+ here:\n\n \e[1mhttp://github.com/zdennis/yap-shell/issues\e[0m\n\n\e[033mP.P.S.\e[0m
243
244
  OSX support? YES! Linux? I assume YES! Windows? Um...\n\n"
244
245
  rdoc_options: []
245
246
  require_paths: