Permalink
Browse files

Version 0.2.1

  • Loading branch information...
1 parent cd6ad30 commit cd6c78601ba58c05d26839c96026d9b9dd1a71e4 @nixme committed Dec 26, 2012
Showing with 29 additions and 10 deletions.
  1. +11 −0 CHANGELOG.md
  2. +8 −1 README.md
  3. +7 −6 lib/pry-debugger/breakpoints.rb
  4. +1 −1 lib/pry-debugger/version.rb
  5. +2 −2 pry-debugger.gemspec
View
@@ -1,3 +1,13 @@
+## 0.2.1 (2012-12-26)
+
+* Support breakpoints on methods defined in the pry console. (@banister)
+* Fix support for specifying breakpoints by *file:line_number*. (@nviennot)
+* Validate breakpoint conditionals are real Ruby expressions.
+* Support for [debugger][debugger] ~> 1.2.0. (@jshou)
+* Safer `alias_method_chain`-style patching of `Pry.start` and
+ `PryRemote::Server#teardown`. (@benizi)
+
+
## 0.2.0 (2012-06-11)
* Breakpoints
@@ -12,3 +22,4 @@
[pry-remote]: https://github.com/Mon-Ouie/pry-remote
+[debugger]: https://github.com/cldwalker/debugger
View
@@ -123,7 +123,14 @@ Pry.commands.alias_command 'f', 'finish'
```
-## Contributions
+## Contributors
+
+* Gopal Patel (@nixme)
+* John Mair (@banister)
+* Nicolas Viennot (@nviennot)
+* Benjamin R. Haskell (@benizi)
+* Joshua Hou (@jshou)
+* ...and others who helped with [pry-nav][pry-nav]
Patches and bug reports are welcome. Just send a [pull request][pullrequests] or
file an [issue][issues]. [Project changelog][changelog].
@@ -10,14 +10,13 @@ module Breakpoints
# Add a new breakpoint.
def add(file, line, expression = nil)
- if !File.exist?(file) && file != Pry.eval_path
- raise ArgumentError, 'Invalid file!' unless File.exist?(file)
- end
+ real_file = (file != Pry.eval_path)
+ raise ArgumentError, 'Invalid file!' if real_file && !File.exist?(file)
validate_expression expression
Pry.processor.debugging = true
- path = file == Pry.eval_path ? file : File.expand_path(file)
+ path = (real_file ? File.expand_path(file) : file)
Debugger.add_breakpoint(path, line, expression)
end
@@ -89,8 +88,10 @@ def change_status(id, enabled = true)
end
def validate_expression(expression)
- # `complete_expression?` throws a SyntaxError on invalid input.
- expression && Pry::Code.complete_expression?(expression)
+ if expression && # `nil` implies no expression given, so pass
+ (expression.empty? || !Pry::Code.complete_expression?(expression))
+ raise "Invalid breakpoint conditional: #{expression}"
+ end
end
end
end
@@ -1,3 +1,3 @@
module PryDebugger
- VERSION = '0.2.0'
+ VERSION = '0.2.1'
end
View
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
# Dependencies
gem.required_ruby_version = '>= 1.9.2'
- gem.add_runtime_dependency 'pry', '~> 0.9.9'
+ gem.add_runtime_dependency 'pry', '~> 0.9.10'
gem.add_runtime_dependency 'debugger', '~> 1.2.0'
- gem.add_development_dependency 'pry-remote', '~> 0.1.4'
+ gem.add_development_dependency 'pry-remote', '~> 0.1.6'
end

0 comments on commit cd6c786

Please sign in to comment.