rack-webconsole-pry 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-webconsole-pry (0.1.5)
4
+ rack-webconsole-pry (0.1.6)
5
5
  json
6
6
  multi_json (>= 1.0.3)
7
7
  pry
data/Readme.md CHANGED
@@ -1,6 +1,6 @@
1
- #rack-webconsole [![Build Status](http://travis-ci.org/mrbrdo/rack-webconsole.png)](http://travis-ci.org/mrbrdo/rack-webconsole.png)
1
+ #rack-webconsole-pry [![Build Status](http://travis-ci.org/mrbrdo/rack-webconsole.png)](http://travis-ci.org/mrbrdo/rack-webconsole.png)
2
2
 
3
- Rack-webconsole is a Rack-based interactive console (à la Rails console) in
3
+ rack-webconsole-pry is a Rack-based interactive console (à la Rails console) in
4
4
  your web application's frontend. That means you can interact with your
5
5
  application's backend from within the browser itself!
6
6
 
@@ -8,7 +8,7 @@ To get a clearer idea, you can check out this video showing a live example :)
8
8
 
9
9
  [![YouTube video](http://img.youtube.com/vi/yKK5J01Dqts/0.jpg)](http://youtu.be/yKK5J01Dqts?hd=1)
10
10
 
11
- Rack-webconsole is a Rack middleware designed to be unobtrusive. With Rails 3,
11
+ rack-webconsole-pry is a Rack middleware designed to be unobtrusive. With Rails 3,
12
12
  for example, you only have to include the gem in your Gemfile and it already
13
13
  works. Without any configuration.
14
14
 
@@ -37,9 +37,9 @@ In your Gemfile:
37
37
  gem 'rack-webconsole-pry', :require => 'rack-webconsole'
38
38
  ```
39
39
 
40
- Rack-webconsole **needs JQuery**. If you are using Rails 3, JQuery is loaded by
40
+ rack-webconsole-pry **needs JQuery**. If you are using Rails 3, JQuery is loaded by
41
41
  default. In case you don't want to use JQuery in your application,
42
- **rack-webconsole can inject it for you** only when it needs it. To do that you
42
+ **rack-webconsole-pry can inject it for you** only when it needs it. To do that you
43
43
  should put this line somewhere in your application (a Rails initializer, or
44
44
  some configuration file):
45
45
 
@@ -78,7 +78,11 @@ module Rack
78
78
  pry = $pry
79
79
 
80
80
  # repl loop
81
- target = Pry.binding_for(pry.binding_stack.last || TOPLEVEL_BINDING)
81
+ if pry.binding_stack.last
82
+ target = Pry.binding_for(pry.binding_stack.last)
83
+ else
84
+ target = Pry.binding_for(TOPLEVEL_BINDING)
85
+ end
82
86
  pry.repl_prologue(target) unless pry.binding_stack.last == target
83
87
  pry.inject_sticky_locals(target)
84
88
  code = params['query']
@@ -2,6 +2,6 @@
2
2
  module Rack
3
3
  class Webconsole
4
4
  # rack-webconsole version number.
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.6"
6
6
  end
7
7
  end
@@ -151,7 +151,7 @@
151
151
 
152
152
  $(document).ready(function() {
153
153
  $(this).keypress(function(event) {
154
- if (event.which == $KEY_CODE) {
154
+ if ($KEY_CODE.indexOf(event.which) >= 0) {
155
155
  $("#rack-webconsole").slideToggle('fast', function() {
156
156
  if ($(this).is(':visible')) {
157
157
  $("#rack-webconsole form input").focus();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-webconsole-pry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -203,7 +203,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  segments:
205
205
  - 0
206
- hash: 1304411900807532056
206
+ hash: 3719169181226662823
207
207
  required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  none: false
209
209
  requirements:
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  version: '0'
213
213
  segments:
214
214
  - 0
215
- hash: 1304411900807532056
215
+ hash: 3719169181226662823
216
216
  requirements: []
217
217
  rubyforge_project: rack-webconsole-pry
218
218
  rubygems_version: 1.8.24