rib 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -6
- data/.travis.yml +1 -1
- data/CHANGES.md +4 -0
- data/lib/rib/api.rb +2 -2
- data/lib/rib/test.rb +5 -0
- data/lib/rib/version.rb +1 -1
- data/rib.gemspec +4 -3
- data/task/gemgem.rb +6 -5
- data/test/test_shell.rb +5 -0
- metadata +10 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f9c0da1c91b42793b8e4383b923c4a10f127d11a
|
4
|
+
data.tar.gz: 9bc65bd697acdd2bd8639a490a059d46a7099c1b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1246de926465360d9179a61d703c8b53d2ff4df11d9ba9bbd1b6df4457d62c670b4af3ef3b6b4492e565c89b0e66a071e3f38005bdc37b6c59cb9512ba072161
|
7
|
+
data.tar.gz: d2ba9ba0d7b1944fd82558b574655687af2137ce261845e69d8e1130cadf2bc897e0313673376fe9e6810089c8f67ccb3336deeaa38ebdc059968a840d06d438
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
data/lib/rib/api.rb
CHANGED
@@ -41,7 +41,7 @@ module Rib::API
|
|
41
41
|
result, err = eval_input(input)
|
42
42
|
if err
|
43
43
|
print_eval_error(err)
|
44
|
-
elsif input.strip != ''
|
44
|
+
elsif input.strip != ''
|
45
45
|
print_result(result)
|
46
46
|
else
|
47
47
|
# print nothing for blank input
|
@@ -79,7 +79,7 @@ module Rib::API
|
|
79
79
|
|
80
80
|
# Print result using #format_result
|
81
81
|
def print_result result
|
82
|
-
puts(format_result(result))
|
82
|
+
puts(format_result(result)) if result != Rib::Skip
|
83
83
|
rescue StandardError, SyntaxError => e
|
84
84
|
Rib.warn("Error while printing result:\n #{format_error(e)}")
|
85
85
|
end
|
data/lib/rib/test.rb
CHANGED
data/lib/rib/version.rb
CHANGED
data/rib.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rib"
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Lin Jen-Shin (godfat)"]
|
9
|
-
s.date = "2013-
|
9
|
+
s.date = "2013-05-08"
|
10
10
|
s.description = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell\n\nRib is based on the design of [ripl][] and the work of [ripl-rc][], some of\nthe features are also inspired by [pry][]. The aim of Rib is to be fully\nfeatured and yet very easy to opt-out or opt-in other features. It shall\nbe simple, lightweight and modular so that everyone could customize Rib.\n\n[ripl]: https://github.com/cldwalker/ripl\n[ripl-rc]: https://github.com/godfat/ripl-rc\n[pry]: https://github.com/pry/pry"
|
11
11
|
s.email = ["godfat (XD) godfat.org"]
|
12
12
|
s.executables = [
|
@@ -80,8 +80,9 @@ Gem::Specification.new do |s|
|
|
80
80
|
"test/test_plugin.rb",
|
81
81
|
"test/test_shell.rb"]
|
82
82
|
s.homepage = "https://github.com/godfat/rib"
|
83
|
+
s.licenses = ["Apache License 2.0"]
|
83
84
|
s.require_paths = ["lib"]
|
84
|
-
s.rubygems_version = "2.0.
|
85
|
+
s.rubygems_version = "2.0.3"
|
85
86
|
s.summary = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell"
|
86
87
|
s.test_files = [
|
87
88
|
"test/core/test_completion.rb",
|
data/task/gemgem.rb
CHANGED
@@ -14,6 +14,7 @@ module Gemgem
|
|
14
14
|
|
15
15
|
s.description = description.join
|
16
16
|
s.summary = description.first
|
17
|
+
s.license = readme['LICENSE'].sub(/.+\n\n/, '').lines.first.strip
|
17
18
|
|
18
19
|
s.rubygems_version = Gem::VERSION
|
19
20
|
s.date = Time.now.strftime('%Y-%m-%d')
|
@@ -33,8 +34,8 @@ module Gemgem
|
|
33
34
|
@readme ||=
|
34
35
|
if path
|
35
36
|
ps = "##{File.read(path)}".
|
36
|
-
scan(/((#+)[^\n]+\n\n.+?(
|
37
|
-
ps.inject(
|
37
|
+
scan(/((#+)[^\n]+\n\n.+?(?=(\n\n\2[^#\n]+\n)|\Z))/m).map(&:first)
|
38
|
+
ps.inject('HEADER' => ps.first){ |r, s, i|
|
38
39
|
r[s[/\w+/]] = s
|
39
40
|
r
|
40
41
|
}
|
@@ -44,7 +45,7 @@ module Gemgem
|
|
44
45
|
end
|
45
46
|
|
46
47
|
def description
|
47
|
-
@description ||= (readme['DESCRIPTION']||'').sub(/.+\n\n/, '').lines
|
48
|
+
@description ||= (readme['DESCRIPTION']||'').sub(/.+\n\n/, '').lines
|
48
49
|
end
|
49
50
|
|
50
51
|
def changes
|
@@ -104,9 +105,9 @@ module Gemgem
|
|
104
105
|
end
|
105
106
|
|
106
107
|
def split_lines ruby
|
107
|
-
ruby.gsub(/(.+?)\[(.+?)\]/){ |s|
|
108
|
+
ruby.gsub(/(.+?)\s*=\s*\[(.+?)\]/){ |s|
|
108
109
|
if $2.index(',')
|
109
|
-
"#{$1}[\n #{$2.split(',').map(&:strip).join(",\n ")}]"
|
110
|
+
"#{$1} = [\n #{$2.split(',').map(&:strip).join(",\n ")}]"
|
110
111
|
else
|
111
112
|
s
|
112
113
|
end
|
data/test/test_shell.rb
CHANGED
@@ -49,6 +49,11 @@ describe Rib::Shell do
|
|
49
49
|
input('obj = Object.new; def obj.inspect; raise "BOOM"; end; obj')
|
50
50
|
end
|
51
51
|
|
52
|
+
should 'not crash if user input is a blackhole' do
|
53
|
+
mock(Rib).warn(/Error while printing result/)
|
54
|
+
input('Rib::Blackhole')
|
55
|
+
end
|
56
|
+
|
52
57
|
should 'print error from eval' do
|
53
58
|
mock(@shell).puts(/RuntimeError/)
|
54
59
|
input('raise "blah"')
|
metadata
CHANGED
@@ -1,32 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lin Jen-Shin (godfat)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
|
13
|
+
description: |-
|
14
|
+
Ruby-Interactive-ruBy -- Yet another interactive Ruby shell
|
15
15
|
|
16
16
|
Rib is based on the design of [ripl][] and the work of [ripl-rc][], some of
|
17
|
-
|
18
17
|
the features are also inspired by [pry][]. The aim of Rib is to be fully
|
19
|
-
|
20
18
|
featured and yet very easy to opt-out or opt-in other features. It shall
|
21
|
-
|
22
19
|
be simple, lightweight and modular so that everyone could customize Rib.
|
23
20
|
|
24
|
-
|
25
21
|
[ripl]: https://github.com/cldwalker/ripl
|
26
|
-
|
27
22
|
[ripl-rc]: https://github.com/godfat/ripl-rc
|
28
|
-
|
29
|
-
[pry]: https://github.com/pry/pry'
|
23
|
+
[pry]: https://github.com/pry/pry
|
30
24
|
email:
|
31
25
|
- godfat (XD) godfat.org
|
32
26
|
executables:
|
@@ -102,7 +96,8 @@ files:
|
|
102
96
|
- test/test_plugin.rb
|
103
97
|
- test/test_shell.rb
|
104
98
|
homepage: https://github.com/godfat/rib
|
105
|
-
licenses:
|
99
|
+
licenses:
|
100
|
+
- Apache License 2.0
|
106
101
|
metadata: {}
|
107
102
|
post_install_message:
|
108
103
|
rdoc_options: []
|
@@ -110,17 +105,17 @@ require_paths:
|
|
110
105
|
- lib
|
111
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
112
107
|
requirements:
|
113
|
-
- -
|
108
|
+
- - '>='
|
114
109
|
- !ruby/object:Gem::Version
|
115
110
|
version: '0'
|
116
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
112
|
requirements:
|
118
|
-
- -
|
113
|
+
- - '>='
|
119
114
|
- !ruby/object:Gem::Version
|
120
115
|
version: '0'
|
121
116
|
requirements: []
|
122
117
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.0.
|
118
|
+
rubygems_version: 2.0.3
|
124
119
|
signing_key:
|
125
120
|
specification_version: 4
|
126
121
|
summary: Ruby-Interactive-ruBy -- Yet another interactive Ruby shell
|