Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add rbenv and remove rvm

  • Loading branch information...
commit 276c9fc79167d68c31a1126e79fb19370ffa4e71 1 parent a10fe43
@lucapette authored
Showing with 12 additions and 28 deletions.
  1. +0 −11 irbrc
  2. +7 −9 pryrc
  3. +3 −3 zsh/prompt.zsh
  4. +2 −5 zshrc
View
11 irbrc
@@ -1,14 +1,3 @@
-# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953
-if defined?(::Bundler)
- global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first
- if global_gemset
- all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*")
- all_global_gem_paths.each do |p|
- gem_path = "#{p}/lib"
- $LOAD_PATH << gem_path
- end
- end
-end
# Use Pry everywhere
require "rubygems"
require 'pry'
View
16 pryrc
@@ -1,13 +1,11 @@
-# vim FTW
-Pry.config.editor = 'vim'
-
-# My pry is polite
-Pry.config.hooks.add_hook :after_session, :say_bye do
- puts "bye-bye" if Pry.active_sessions == 1
+def require_without_bundler gem
+ gem_path = Dir.glob("#{Gem.path.first}/gems/#{gem}*/lib").first
+ $LOAD_PATH << gem_path
+ require gem
end
-# Prompt with ruby version
-Pry.prompt = [proc { |obj, nest_level, _| "#{RUBY_VERSION} (#{obj}):#{nest_level} > " }, proc { |obj, nest_level, _| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " }]
+# vim FTW
+Pry.config.editor = 'vim'
# Toys methods
# See https://gist.github.com/807492
@@ -35,7 +33,7 @@ if defined?(Rails) && Rails.env
end
end
- require 'hirb'
+ require_without_bundler 'hirb'
# https://github.com/cldwalker/hirb/issues/46#issuecomment-1870823
Pry.config.print = proc do |output, value|
View
6 zsh/prompt.zsh
@@ -1,8 +1,8 @@
-function rvm_prompt() {
- echo "%{$fg_bold[green]%}$(~/.rvm/bin/rvm-prompt v g)"
+function ruby_prompt() {
+ echo "%{$fg_bold[green]%}$(rbenv_prompt_info)"
}
-PROMPT='$(rvm_prompt) %{$fg_bold[cyan]%}%c%{$reset_color%}$(git_prompt_info)$(git_prompt_status)%{$fg_bold[red]%} ➜%{$reset_color%} '
+PROMPT='$(ruby_prompt) %{$fg_bold[cyan]%}%c%{$reset_color%}$(git_prompt_info)$(git_prompt_status)%{$fg_bold[red]%} ➜%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%} "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
View
7 zshrc
@@ -2,7 +2,7 @@ ZSH=$HOME/.oh-my-zsh
CASE_SENSITIVE="true"
-plugins=(command-not-found rake rvm)
+plugins=(command-not-found rake rbenv)
ZSH_CUSTOM=$HOME/.zsh
@@ -19,7 +19,4 @@ export CDPATH=:$HOME/code
export EDITOR=vim
-# loading rvm
-[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
-
-export PATH=.:./bin:$HOME/bin:$PATH
+export PATH=.:$HOME/bin:$PATH
Please sign in to comment.
Something went wrong with that request. Please try again.