ruco 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/ruco +1 -0
- data/lib/ruco/keyboard.rb +1 -1
- data/ruco.gemspec +2 -2
- data/spec/ruco/application_spec.rb +15 -15
- data/spec/ruco/status_bar_spec.rb +1 -1
- metadata +6 -23
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/bin/ruco
CHANGED
data/lib/ruco/keyboard.rb
CHANGED
data/ruco.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruco}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-07-05}
|
13
13
|
s.default_executable = %q{ruco}
|
14
14
|
s.email = %q{michael@grosser.it}
|
15
15
|
s.executables = ["ruco"]
|
@@ -31,12 +31,12 @@ describe Ruco::Application do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def status(line=1)
|
34
|
-
"Ruco #{Ruco::VERSION} -- spec/temp.txt
|
34
|
+
"Ruco #{Ruco::VERSION} -- spec/temp.txt #{line}:1\n"
|
35
35
|
end
|
36
36
|
|
37
37
|
let(:rucorc){ 'spec/.ruco.rb' }
|
38
|
-
let(:app){ Ruco::Application.new(@file, :lines => 5, :columns =>
|
39
|
-
let(:command){ "^W Exit" }
|
38
|
+
let(:app){ Ruco::Application.new(@file, :lines => 5, :columns => 50, :rc => rucorc) }
|
39
|
+
let(:command){ "^W Exit ^S Save ^F Find ^R Replace" }
|
40
40
|
|
41
41
|
it "renders status + editor + command" do
|
42
42
|
write("xxx\nyyy\nzzz")
|
@@ -69,7 +69,7 @@ describe Ruco::Application do
|
|
69
69
|
it "can resize" do
|
70
70
|
write("01234567\n1\n2\n3\n4\n5678910111213\n6\n7\n8")
|
71
71
|
app.resize(8, 7)
|
72
|
-
app.view.should == "
|
72
|
+
app.view.should == "Ruc 1:1\n0123456\n1\n2\n3\n4\n5678910\n^W Exit"
|
73
73
|
end
|
74
74
|
|
75
75
|
describe 'opening with line' do
|
@@ -185,11 +185,11 @@ describe Ruco::Application do
|
|
185
185
|
type :"Ctrl+r", 'a', :enter
|
186
186
|
app.view.should include("Replace with:")
|
187
187
|
type 'd', :enter
|
188
|
-
app.view.should include("Replace")
|
188
|
+
app.view.should include("Replace=Enter")
|
189
189
|
type :enter # replace first
|
190
|
-
app.view.should include("Replace")
|
190
|
+
app.view.should include("Replace=Enter")
|
191
191
|
type :enter # replace second -> finished
|
192
|
-
app.view.should_not include("Replace")
|
192
|
+
app.view.should_not include("Replace=Enter")
|
193
193
|
editor_part(app.view).should == "xdbdc\n\n"
|
194
194
|
end
|
195
195
|
|
@@ -198,11 +198,11 @@ describe Ruco::Application do
|
|
198
198
|
type :"Ctrl+r", 'a', :enter
|
199
199
|
app.view.should include("Replace with:")
|
200
200
|
type 'd', :enter
|
201
|
-
app.view.should include("Replace")
|
201
|
+
app.view.should include("Replace=Enter")
|
202
202
|
type 's', :enter # skip
|
203
|
-
app.view.should include("Replace")
|
203
|
+
app.view.should include("Replace=Enter")
|
204
204
|
type 's', :enter # skip
|
205
|
-
app.view.should_not include("Replace")
|
205
|
+
app.view.should_not include("Replace=Enter")
|
206
206
|
editor_part(app.view).should == "xabac\n\n"
|
207
207
|
end
|
208
208
|
|
@@ -211,11 +211,11 @@ describe Ruco::Application do
|
|
211
211
|
type :"Ctrl+r", 'a', :enter
|
212
212
|
app.view.should include("Replace with:")
|
213
213
|
type 'd', :enter
|
214
|
-
app.view.should include("Replace")
|
214
|
+
app.view.should include("Replace=Enter")
|
215
215
|
type 's', :enter # skip first
|
216
|
-
app.view.should include("Replace")
|
216
|
+
app.view.should include("Replace=Enter")
|
217
217
|
type 'a', :enter # all
|
218
|
-
app.view.should_not include("Replace")
|
218
|
+
app.view.should_not include("Replace=Enter")
|
219
219
|
editor_part(app.view).should == "_a_d_d_d\n\n"
|
220
220
|
end
|
221
221
|
|
@@ -224,9 +224,9 @@ describe Ruco::Application do
|
|
224
224
|
type :"Ctrl+r", 'a', :enter
|
225
225
|
app.view.should include("Replace with:")
|
226
226
|
type "d", :enter
|
227
|
-
app.view.should include("Replace")
|
227
|
+
app.view.should include("Replace=Enter")
|
228
228
|
type 'x', :enter
|
229
|
-
app.view.should_not include("Replace")
|
229
|
+
app.view.should_not include("Replace=Enter")
|
230
230
|
editor_part(app.view).should == "xabac\n\n"
|
231
231
|
end
|
232
232
|
|
@@ -16,7 +16,7 @@ describe Ruco::StatusBar do
|
|
16
16
|
it "can show to long files" do
|
17
17
|
editor = Ruco::Editor.new('a'*20+'b', :lines => 5, :columns => 20)
|
18
18
|
bar = Ruco::StatusBar.new(editor, :columns => 20)
|
19
|
-
bar.view.should == "Ruco
|
19
|
+
bar.view.should == "Ruco #{Ruco::VERSION} -- aa 1:1"
|
20
20
|
bar.view.size.should == 20
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 17
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 5
|
10
|
-
version: 0.1.5
|
5
|
+
version: 0.1.6
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Michael Grosser
|
@@ -15,25 +10,20 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-
|
13
|
+
date: 2011-07-05 00:00:00 +02:00
|
19
14
|
default_executable: ruco
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
17
|
+
name: clipboard
|
22
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
19
|
none: false
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
hash: 43
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 9
|
31
|
-
- 8
|
32
23
|
version: 0.9.8
|
33
24
|
type: :runtime
|
34
|
-
name: clipboard
|
35
|
-
version_requirements: *id001
|
36
25
|
prerelease: false
|
26
|
+
version_requirements: *id001
|
37
27
|
description:
|
38
28
|
email: michael@grosser.it
|
39
29
|
executables:
|
@@ -95,11 +85,7 @@ has_rdoc: true
|
|
95
85
|
homepage: http://github.com/grosser/ruco
|
96
86
|
licenses: []
|
97
87
|
|
98
|
-
post_install_message:
|
99
|
-
|
100
|
-
Mac: shift/ctrl + arrow-keys only work in iterm (not Terminal.app)
|
101
|
-
Ubuntu: sudo apt-get install xclip # to use the clipboard
|
102
|
-
|
88
|
+
post_install_message: "\n Mac: shift/ctrl + arrow-keys only work in iterm (not Terminal.app)\n Ubuntu: sudo apt-get install xclip # to use the clipboard\n\n"
|
103
89
|
rdoc_options: []
|
104
90
|
|
105
91
|
require_paths:
|
@@ -109,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
95
|
requirements:
|
110
96
|
- - ">="
|
111
97
|
- !ruby/object:Gem::Version
|
112
|
-
hash:
|
98
|
+
hash: 361299251
|
113
99
|
segments:
|
114
100
|
- 0
|
115
101
|
version: "0"
|
@@ -118,9 +104,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
104
|
requirements:
|
119
105
|
- - ">="
|
120
106
|
- !ruby/object:Gem::Version
|
121
|
-
hash: 3
|
122
|
-
segments:
|
123
|
-
- 0
|
124
107
|
version: "0"
|
125
108
|
requirements: []
|
126
109
|
|