1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

NO_PRY -> DISABLE_PRY for consistency

Thanks @rking
This commit is contained in:
Conrad Irwin 2012-10-31 01:42:55 -07:00
parent ba584a99bc
commit c8212b5dc8
4 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
class Pry
Pry::Commands.create_command "disable-pry" do
group 'Navigating pry'
group 'Navigating Pry'
description 'Stops all future calls to pry and exits the current session.'
banner <<-BANNER
@ -17,7 +17,7 @@ class Pry
BANNER
def process
ENV['NO_PRY'] = 'true'
ENV['DISABLE_PRY'] = 'true'
_pry_.run_command "exit"
end
end

View file

@ -123,7 +123,7 @@ class Pry
# @example
# Pry.start(Object.new, :input => MyInput.new)
def self.start(target=toplevel_binding, options={})
return if ENV['NO_PRY']
return if ENV['DISABLE_PRY']
target = Pry.binding_for(target)
initial_session_setup

View file

@ -6,7 +6,7 @@ describe "disable-pry" do
end
after do
ENV.delete 'NO_PRY'
ENV.delete 'DISABLE_PRY'
end
it 'should quit the current session' do
@ -15,11 +15,11 @@ describe "disable-pry" do
}.should.throw(:breakout)
end
it "should set NO_PRY" do
ENV['NO_PRY'].should == nil
it "should set DISABLE_PRY" do
ENV['DISABLE_PRY'].should == nil
lambda{
@t.process_command 'disable-pry'
}.should.throw(:breakout)
ENV['NO_PRY'].should == 'true'
ENV['DISABLE_PRY'].should == 'true'
end
end

View file

@ -20,13 +20,13 @@ describe Pry do
end
end
describe 'NO_PRY' do
describe 'DISABLE_PRY' do
before do
ENV['NO_PRY'] = 'true'
ENV['DISABLE_PRY'] = 'true'
end
after do
ENV.delete 'NO_PRY'
ENV.delete 'DISABLE_PRY'
end
it 'should not binding.pry' do