pry 0.9.8 → 0.9.8.1
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.
- data/.travis.yml +3 -2
- data/CHANGELOG +9 -3
- data/CONTRIBUTORS +29 -22
- data/lib/pry/cli.rb +2 -2
- data/lib/pry/command.rb +8 -4
- data/lib/pry/config.rb +0 -1
- data/lib/pry/default_commands/gems.rb +1 -0
- data/lib/pry/version.rb +1 -1
- data/pry.gemspec +14 -14
- data/test/test_command.rb +17 -1
- data/test/test_default_commands/test_gems.rb +5 -1
- data/test/test_input_stack.rb +1 -1
- metadata +15 -15
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
|
1
|
+
30/1/2012 version 0.9.8.1 bugfix
|
2
|
+
* fixed broken --no-plugins option
|
3
|
+
* Ensure ARGV is not mutated during option parsing.
|
4
|
+
* Use a more rbx-friendly test for unicodeness
|
5
|
+
* Use rbx-{18,19}mode as indicated http://about.travis-ci.org/docs/user/languages/ruby/
|
6
|
+
* Don't explode in gem-list [Fixes #453, #454]
|
7
|
+
* Check for command-name collision on assignment [Fixes #450]
|
8
|
+
|
9
|
+
25/1/2012 version 0.9.8
|
2
10
|
|
3
11
|
MAJOR NEW FEATURES
|
4
12
|
- upgraded command api, https://github.com/pry/pry/wiki/Custom-commands
|
@@ -7,7 +15,6 @@ MAJOR NEW FEATURES
|
|
7
15
|
- added save-file command
|
8
16
|
- added gist command (removed gist-method, new gist command is more general)
|
9
17
|
|
10
|
-
|
11
18
|
complete CHANGELOG:
|
12
19
|
* CommandError's no longer cause the current input to be disgarded
|
13
20
|
* Better syntax highlighting for rbx code code
|
@@ -39,7 +46,6 @@ complete CHANGELOG:
|
|
39
46
|
* changed edit-command to no-longer need a command set argument
|
40
47
|
* fixed empty lines so that they don't replace _ by nil
|
41
48
|
* fixed SyntaxErrors at the REPL level so they don't replace _ex_.
|
42
|
-
<TODO: everything that happened after f3262e32700709a6998579a9f71cdc6b8f4a695e>
|
43
49
|
|
44
50
|
5/11/2011 version 0.9.7.4 hotfix
|
45
51
|
* ls -M now works in modules (bugfix)
|
data/CONTRIBUTORS
CHANGED
@@ -1,22 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
18 David Palm
|
8
|
-
13 epitron
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
2
|
15
|
-
2
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
1
|
21
|
-
1
|
22
|
-
1
|
1
|
+
804 John Mair
|
2
|
+
168 Conrad Irwin
|
3
|
+
129 Ryan Fitzgerald
|
4
|
+
84 Rob Gleeson
|
5
|
+
51 Lee Jarvis
|
6
|
+
48 Mon ouïe
|
7
|
+
18 David Palm
|
8
|
+
13 epitron
|
9
|
+
13 Jordon Bedwell
|
10
|
+
9 Yorick Peterse
|
11
|
+
8 Eero Saynatkari
|
12
|
+
3 fowlmouth
|
13
|
+
3 Darrick Wiebe
|
14
|
+
2 Bram Swenson
|
15
|
+
2 Eric Christopherson
|
16
|
+
2 Erik Michaels-Ober
|
17
|
+
2 Kelsey Judson
|
18
|
+
2 Xavier Shay
|
19
|
+
2 robgleeson
|
20
|
+
1 Kirill Lashuk
|
21
|
+
1 Josh Cheek
|
22
|
+
1 Shawn Anderson
|
23
|
+
1 Sherin C
|
24
|
+
1 Tim Pope
|
25
|
+
1 Gosha Arinich
|
26
|
+
1 Jordan Running
|
27
|
+
1 Jonathan Jackson
|
28
|
+
1 Lars Haugseth
|
29
|
+
1 Robert Gleeson
|
data/lib/pry/cli.rb
CHANGED
@@ -52,7 +52,7 @@ class Pry
|
|
52
52
|
self.option_processors = nil
|
53
53
|
end
|
54
54
|
|
55
|
-
def parse_options(args=ARGV)
|
55
|
+
def parse_options(args=ARGV.dup)
|
56
56
|
raise NoOptionsError, "No command line options defined! Use Pry::CLI.add_options to add command line options." if !options
|
57
57
|
|
58
58
|
opts = Slop.parse(args, :help => true, :multiple_switches => false, &options)
|
@@ -99,7 +99,7 @@ Copyright (c) 2011 John Mair (banisterfiend)
|
|
99
99
|
|
100
100
|
on "no-plugins", "Suppress loading of plugins." do
|
101
101
|
# suppress plugins if given --no-plugins optino
|
102
|
-
Pry.config.
|
102
|
+
Pry.config.should_load_plugins = false
|
103
103
|
end
|
104
104
|
|
105
105
|
on "installed-plugins", "List installed plugins." do
|
data/lib/pry/command.rb
CHANGED
@@ -182,9 +182,13 @@ class Pry
|
|
182
182
|
# the current scope.
|
183
183
|
# @param [String] command_name_match The name of the colliding command.
|
184
184
|
# @param [Binding] target The current binding context.
|
185
|
-
def check_for_command_name_collision(command_name_match)
|
186
|
-
|
187
|
-
|
185
|
+
def check_for_command_name_collision(command_name_match, arg_string)
|
186
|
+
collision_type = target.eval("defined?(#{command_name_match})")
|
187
|
+
collision_type ||= 'local-variable' if arg_string.match(%r{\A\s*[-+*/%&|^]*=})
|
188
|
+
|
189
|
+
if collision_type
|
190
|
+
output.puts "#{Pry::Helpers::Text.bold('WARNING:')} Calling Pry command '#{command_name_match}'," +
|
191
|
+
"which conflicts with a #{collision_type}.\n\n"
|
188
192
|
end
|
189
193
|
rescue Pry::RescuableException
|
190
194
|
end
|
@@ -229,7 +233,7 @@ class Pry
|
|
229
233
|
def process_line(line)
|
230
234
|
command_name, arg_string, captures, args = tokenize(line)
|
231
235
|
|
232
|
-
check_for_command_name_collision(command_name) if Pry.config.collision_warning
|
236
|
+
check_for_command_name_collision(command_name, arg_string) if Pry.config.collision_warning
|
233
237
|
|
234
238
|
self.arg_string = arg_string
|
235
239
|
self.captures = captures
|
data/lib/pry/config.rb
CHANGED
@@ -129,7 +129,6 @@ class Pry
|
|
129
129
|
|
130
130
|
# Config option for plugins:
|
131
131
|
# sub-options include:
|
132
|
-
# `plugins.enabled` (Boolean) to toggle the loading of plugins on and off wholesale. (defaults to true)
|
133
132
|
# `plugins.strict_loading` (Boolean) which toggles whether referring to a non-existent plugin should raise an exception (defaults to `false`)
|
134
133
|
# @return [OpenStruct]
|
135
134
|
attr_accessor :plugins
|
data/lib/pry/version.rb
CHANGED
data/pry.gemspec
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
|
-
s.name =
|
5
|
-
s.version = "0.9.
|
4
|
+
s.name = "pry"
|
5
|
+
s.version = "0.9.8.1"
|
6
6
|
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
8
|
-
s.authors = [
|
9
|
-
s.date =
|
10
|
-
s.description =
|
11
|
-
s.email =
|
12
|
-
s.executables = [
|
13
|
-
s.files = [
|
14
|
-
s.homepage =
|
15
|
-
s.require_paths = [
|
16
|
-
s.rubygems_version =
|
17
|
-
s.summary =
|
18
|
-
s.test_files = [
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["John Mair (banisterfiend)"]
|
9
|
+
s.date = "2012-01-30"
|
10
|
+
s.description = "An IRB alternative and runtime developer console"
|
11
|
+
s.email = "jrmair@gmail.com"
|
12
|
+
s.executables = ["pry"]
|
13
|
+
s.files = [".document", ".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "CONTRIBUTORS", "Gemfile", "LICENSE", "README.markdown", "Rakefile", "TODO", "bin/pry", "examples/example_basic.rb", "examples/example_command_override.rb", "examples/example_commands.rb", "examples/example_hooks.rb", "examples/example_image_edit.rb", "examples/example_input.rb", "examples/example_input2.rb", "examples/example_output.rb", "examples/example_print.rb", "examples/example_prompt.rb", "examples/helper.rb", "lib/pry.rb", "lib/pry/cli.rb", "lib/pry/code.rb", "lib/pry/command.rb", "lib/pry/command_set.rb", "lib/pry/commands.rb", "lib/pry/completion.rb", "lib/pry/config.rb", "lib/pry/core_extensions.rb", "lib/pry/custom_completions.rb", "lib/pry/default_commands/basic.rb", "lib/pry/default_commands/context.rb", "lib/pry/default_commands/documentation.rb", "lib/pry/default_commands/easter_eggs.rb", "lib/pry/default_commands/gems.rb", "lib/pry/default_commands/input.rb", "lib/pry/default_commands/introspection.rb", "lib/pry/default_commands/ls.rb", "lib/pry/default_commands/shell.rb", "lib/pry/extended_commands/experimental.rb", "lib/pry/helpers.rb", "lib/pry/helpers/base_helpers.rb", "lib/pry/helpers/command_helpers.rb", "lib/pry/helpers/options_helpers.rb", "lib/pry/helpers/text.rb", "lib/pry/history.rb", "lib/pry/history_array.rb", "lib/pry/hooks.rb", "lib/pry/indent.rb", "lib/pry/method.rb", "lib/pry/plugins.rb", "lib/pry/pry_class.rb", "lib/pry/pry_instance.rb", "lib/pry/rbx_method.rb", "lib/pry/rbx_path.rb", "lib/pry/version.rb", "lib/pry/wrapped_module.rb", "man/pry.1", "man/pry.1.html", "man/pry.1.ronn", "pry.gemspec", "test/helper.rb", "test/test_cli.rb", "test/test_code.rb", "test/test_command.rb", "test/test_command_helpers.rb", "test/test_command_integration.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_defaults.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad", "wiki/Customizing-pry.md", "wiki/Home.md"]
|
14
|
+
s.homepage = "http://pry.github.com"
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
s.rubygems_version = "1.8.15"
|
17
|
+
s.summary = "An IRB alternative and runtime developer console"
|
18
|
+
s.test_files = ["test/helper.rb", "test/test_cli.rb", "test/test_code.rb", "test/test_command.rb", "test/test_command_helpers.rb", "test/test_command_integration.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_defaults.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad"]
|
19
19
|
|
20
20
|
if s.respond_to? :specification_version then
|
21
21
|
s.specification_version = 3
|
data/test/test_command.rb
CHANGED
@@ -300,7 +300,23 @@ describe "Pry::Command" do
|
|
300
300
|
output = StringIO.new
|
301
301
|
cmd.new(:target => binding, :output => output).process_line %(frankie mouse)
|
302
302
|
|
303
|
-
output.string.should =~ /
|
303
|
+
output.string.should =~ /command .* conflicts/
|
304
|
+
|
305
|
+
Pry.config.collision_warning = old
|
306
|
+
end
|
307
|
+
|
308
|
+
it 'should spot collision warnings on assignment if configured' do
|
309
|
+
old = Pry.config.collision_warning
|
310
|
+
Pry.config.collision_warning = true
|
311
|
+
|
312
|
+
cmd = @set.command 'frankie' do
|
313
|
+
|
314
|
+
end
|
315
|
+
|
316
|
+
output = StringIO.new
|
317
|
+
cmd.new(:target => binding, :output => output).process_line %(frankie = mouse)
|
318
|
+
|
319
|
+
output.string.should =~ /command .* conflicts/
|
304
320
|
|
305
321
|
Pry.config.collision_warning = old
|
306
322
|
end
|
@@ -7,7 +7,11 @@ describe "Pry::DefaultCommands::Gems" do
|
|
7
7
|
it 'should not raise when invoked' do
|
8
8
|
str_output = StringIO.new
|
9
9
|
Pry.start self, :input => InputTester.new("gem-list", "exit-all"), :output => str_output
|
10
|
-
str_output.string.should.not =~ /
|
10
|
+
str_output.string.should.not =~ /Error/
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should not raise when invoked with an argument' do
|
14
|
+
mock_pry('gem-list pry').should.not =~ /Error/
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
data/test/test_input_stack.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.8
|
4
|
+
version: 0.9.8.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coderay
|
16
|
-
requirement: &
|
16
|
+
requirement: &70340902709120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.0.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70340902709120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: slop
|
27
|
-
requirement: &
|
27
|
+
requirement: &70340902788280 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -35,10 +35,10 @@ dependencies:
|
|
35
35
|
version: '3'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
|
-
version_requirements: *
|
38
|
+
version_requirements: *70340902788280
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: method_source
|
41
|
-
requirement: &
|
41
|
+
requirement: &70340902786160 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
@@ -46,10 +46,10 @@ dependencies:
|
|
46
46
|
version: '0.7'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
|
-
version_requirements: *
|
49
|
+
version_requirements: *70340902786160
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: bacon
|
52
|
-
requirement: &
|
52
|
+
requirement: &70340902784780 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
@@ -57,10 +57,10 @@ dependencies:
|
|
57
57
|
version: '1.1'
|
58
58
|
type: :development
|
59
59
|
prerelease: false
|
60
|
-
version_requirements: *
|
60
|
+
version_requirements: *70340902784780
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: open4
|
63
|
-
requirement: &
|
63
|
+
requirement: &70340902783480 !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
@@ -68,10 +68,10 @@ dependencies:
|
|
68
68
|
version: '1.3'
|
69
69
|
type: :development
|
70
70
|
prerelease: false
|
71
|
-
version_requirements: *
|
71
|
+
version_requirements: *70340902783480
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: rake
|
74
|
-
requirement: &
|
74
|
+
requirement: &70340902782740 !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
77
77
|
- - ~>
|
@@ -79,7 +79,7 @@ dependencies:
|
|
79
79
|
version: '0.9'
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
|
-
version_requirements: *
|
82
|
+
version_requirements: *70340902782740
|
83
83
|
description: An IRB alternative and runtime developer console
|
84
84
|
email: jrmair@gmail.com
|
85
85
|
executables:
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
207
|
rubyforge_project:
|
208
|
-
rubygems_version: 1.8.
|
208
|
+
rubygems_version: 1.8.15
|
209
209
|
signing_key:
|
210
210
|
specification_version: 3
|
211
211
|
summary: An IRB alternative and runtime developer console
|