Update ruby configs
This commit is contained in:
parent
26952e5b1b
commit
cdcd4bffa8
13
home/.gemrc
13
home/.gemrc
@ -1,10 +1,9 @@
|
||||
---
|
||||
:verbose: true
|
||||
gem: --no-rdoc
|
||||
:update_sources: true
|
||||
:sources:
|
||||
- http://gems.rubyforge.org
|
||||
- http://gems.github.com
|
||||
gem: --no-document
|
||||
:backtrace: false
|
||||
:benchmark: false
|
||||
:bulk_threshold: 1000
|
||||
:benchmark: false
|
||||
:update_sources: true
|
||||
:verbose: true
|
||||
:sources:
|
||||
- http://rubygems.org
|
||||
|
@ -1,5 +0,0 @@
|
||||
require 'rubygems'
|
||||
require 'pp'
|
||||
|
||||
alias q exit
|
||||
alias r require
|
45
home/.pryrc
45
home/.pryrc
@ -1,45 +0,0 @@
|
||||
Pry.config.pager = false
|
||||
Pry.config.editor = 'vim'
|
||||
Pry.config.prompt = [proc{'? '}, proc{'| '}]
|
||||
|
||||
Pry.config.commands.import(Pry::CommandSet.new do
|
||||
$wl__reload_file = nil
|
||||
|
||||
command 'reload', 'Reload specified source file or previously reloaded file by default.' do |file|
|
||||
unless file
|
||||
if $wl__reload_file
|
||||
load($wl__reload_file)
|
||||
next
|
||||
end
|
||||
|
||||
files = Dir['*.rb']
|
||||
case files.size
|
||||
when 0
|
||||
output.puts "No Ruby files in #{Dir.pwd}"
|
||||
next
|
||||
when 1
|
||||
file = files.first
|
||||
else
|
||||
output.puts "Many Ruby files in #{Dir.pwd}:"
|
||||
output.puts files.map{|f| "\t#{f}"}
|
||||
next
|
||||
end
|
||||
end
|
||||
|
||||
file = file.sub(/(\.rb)?$/, '.rb')
|
||||
$wl__reload_file = file
|
||||
load(file)
|
||||
end
|
||||
|
||||
alias_command 'r', 'reload'
|
||||
end)
|
||||
|
||||
def quick(repetitions = 100, &block)
|
||||
require 'benchmark'
|
||||
Benchmark.bm{|b| b.report{repetitions.times(&block)}}
|
||||
end
|
||||
|
||||
def beep
|
||||
putc ?\a
|
||||
nil
|
||||
end
|
Loading…
Reference in New Issue
Block a user