ripl-multi_line 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/.gemspec +1 -1
  2. data/CHANGELOG.rdoc +7 -0
  3. data/lib/ripl/multi_line.rb +13 -28
  4. metadata +7 -7
data/.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.summary = "A ripl plugin for multi-line eval."
12
12
  s.description = "This ripl plugin allows you to evaluate multiple lines of Ruby code."
13
13
  s.required_rubygems_version = ">= 1.3.6"
14
- s.add_dependency 'ripl', '>= 0.2.3'
14
+ s.add_dependency 'ripl', '>= 0.2.4'
15
15
  s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc} ext/**/*.{rb,c} **/deps.rip]) + %w{Rakefile .gemspec}
16
16
  s.extra_rdoc_files = ["README.rdoc", "LICENSE.txt"]
17
17
  s.license = 'MIT'
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.1.4
2
+ * be compatible with 0.2.4 (undo monkey patch)
3
+
4
+ == 0.1.3
5
+ * be compatible with 0.2.3
6
+ * new default prompt
7
+
1
8
  == 0.1.2
2
9
  * add a configurable multi-line prompt
3
10
  * use ripl's latest plugin API for a cleaner implementation
@@ -1,23 +1,24 @@
1
+ require 'ripl'
2
+
1
3
  module Ripl
2
4
  module MultiLine
3
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
4
6
 
5
7
  def before_loop
6
8
  super
7
9
  @buffer = nil
8
- config[:multi_line_prompt] ||= '| '
9
10
  end
10
11
 
11
12
  def prompt
12
13
  @buffer ? config[:multi_line_prompt] : super
13
14
  end
14
15
 
15
- #def loop_once
16
- # catch(:multiline) do
17
- # super
18
- # @buffer = nil
19
- # end
20
- #end
16
+ def loop_once
17
+ catch(:multiline) do
18
+ super
19
+ @buffer = nil
20
+ end
21
+ end
21
22
 
22
23
  def print_eval_error(e)
23
24
  if e.is_a?(SyntaxError) && e.message =~ /unexpected \$end|unterminated string meets end of file/
@@ -28,29 +29,13 @@ module Ripl
28
29
  end
29
30
  end
30
31
 
31
- #def eval_input(input)
32
- # super(@buffer ? @buffer + input : input)
33
- #end
34
- end
35
-
36
- # non-plugin api hack
37
- class Shell
38
- alias loop_once_without_multiline loop_once
39
- def loop_once
40
- catch(:multiline) do
41
- loop_once_without_multiline
42
- @buffer = nil
43
- end
44
- end
45
-
46
- alias eval_input_without_multiline eval_input
47
32
  def eval_input(input)
48
- eval_input_without_multiline(@buffer ? @buffer + input : input)
33
+ super(@buffer ? @buffer + input : input)
49
34
  end
50
- end if defined? Ripl::Shell
51
-
35
+ end
52
36
  end
53
37
 
54
- Ripl::Shell.send :include, Ripl::MultiLine if defined? Ripl::Shell
38
+ Ripl::Shell.send :include, Ripl::MultiLine
39
+ Ripl.config[:multi_line_prompt] ||= '| '
55
40
 
56
41
  # J-_-L
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripl-multi_line
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Lelis
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-17 00:00:00 +01:00
18
+ date: 2010-11-18 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 17
29
+ hash: 31
30
30
  segments:
31
31
  - 0
32
32
  - 2
33
- - 3
34
- version: 0.2.3
33
+ - 4
34
+ version: 0.2.4
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  description: This ripl plugin allows you to evaluate multiple lines of Ruby code.