binding.repl 0.1.1 → 0.1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.pryrc +1 -0
- data/ChangeLog.txt +9 -0
- data/README.md +42 -0
- data/lib/binding.repl.rb +3 -7
- metadata +4 -2
data/.pryrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "./lib/binding.repl"
|
data/ChangeLog.txt
ADDED
data/README.md
CHANGED
@@ -43,6 +43,48 @@ class BlogsController < ActionController::Base
|
|
43
43
|
end
|
44
44
|
```
|
45
45
|
|
46
|
+
__NOTES__
|
47
|
+
|
48
|
+
_CAVAETS_
|
49
|
+
|
50
|
+
Ripl and Pry can be customized by passing a set of key-value pairs but
|
51
|
+
IRB cannot. ripl can be invoked with options that are forwarded to
|
52
|
+
`Ripl.start(…)`:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
class Foo
|
56
|
+
binding.repl.ripl riplrc: false
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
Pry can be configured in the same way. options are forwarded to `Pry.start(…)`:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
class Foo
|
64
|
+
binding.repl.pry quiet: true
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
I have only used Ripl once(to write this library) and I don't use IRB
|
69
|
+
much anymore. If I can improve support for either please let me know
|
70
|
+
via an issue or pull request/e-note.
|
71
|
+
|
72
|
+
|
73
|
+
_DEPENDENCIES_
|
74
|
+
|
75
|
+
binding.repl doesn't depend on anything. it's up to you to meet the
|
76
|
+
dependencies(pry, irb, and/or ripl). `binding.repl.{ripl,pry,irb}`
|
77
|
+
will try to load the appropiate console for you if it looks like it
|
78
|
+
hasn't been loaded yet.
|
79
|
+
|
80
|
+
__INSTALL__
|
81
|
+
|
82
|
+
ruby 1.9+ only.
|
83
|
+
|
84
|
+
```
|
85
|
+
gem install binding.repl
|
86
|
+
```
|
87
|
+
|
46
88
|
__CREDIT__
|
47
89
|
|
48
90
|
- [banisterfiend](https://github.com/banister) (John Mair)
|
data/lib/binding.repl.rb
CHANGED
@@ -6,7 +6,7 @@ klass = Class.new do
|
|
6
6
|
}
|
7
7
|
|
8
8
|
def self.version
|
9
|
-
"0.1.1"
|
9
|
+
"0.1.1.1"
|
10
10
|
end
|
11
11
|
|
12
12
|
def initialize(binding)
|
@@ -48,11 +48,7 @@ private
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
Binding.
|
52
|
-
define_singleton_method(:repl)
|
53
|
-
# I can't figure out a good name for this class yet.
|
54
|
-
# return an anonymous class (for now).
|
55
|
-
klass
|
56
|
-
end
|
51
|
+
Binding.class_eval do
|
52
|
+
define_singleton_method(:repl) { klass }
|
57
53
|
include Binding.repl::BindingMixin
|
58
54
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binding.repl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1
|
4
|
+
version: 0.1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -51,6 +51,8 @@ extensions: []
|
|
51
51
|
extra_rdoc_files: []
|
52
52
|
files:
|
53
53
|
- .gitignore
|
54
|
+
- .pryrc
|
55
|
+
- ChangeLog.txt
|
54
56
|
- Gemfile
|
55
57
|
- LICENSE.txt
|
56
58
|
- README.md
|
@@ -78,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
80
|
version: '0'
|
79
81
|
segments:
|
80
82
|
- 0
|
81
|
-
hash: -
|
83
|
+
hash: -3088308682955123081
|
82
84
|
requirements: []
|
83
85
|
rubyforge_project:
|
84
86
|
rubygems_version: 1.8.23
|