ruco 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +0 -1
- data/VERSION +1 -1
- data/lib/ruco/application.rb +7 -1
- data/lib/ruco/text_area.rb +2 -1
- data/ruco.gemspec +2 -2
- data/spec/ruco/application_spec.rb +20 -3
- metadata +4 -4
data/Readme.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/lib/ruco/application.rb
CHANGED
data/lib/ruco/text_area.rb
CHANGED
@@ -16,6 +16,7 @@ module Ruco
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def view
|
19
|
+
lines = self.lines
|
19
20
|
Array.new(@options[:lines]).map_with_index do |_,i|
|
20
21
|
(lines[i + @scrolled_lines] || "").slice(@scrolled_columns, @options[:columns])
|
21
22
|
end * "\n" + "\n"
|
@@ -79,7 +80,7 @@ module Ruco
|
|
79
80
|
lines[@line].size
|
80
81
|
end
|
81
82
|
|
82
|
-
|
83
|
+
protected
|
83
84
|
|
84
85
|
def move_to_eol
|
85
86
|
after_last_word = current_line.index(/\s*$/)
|
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.0.
|
8
|
+
s.version = "0.0.10"
|
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-01-
|
12
|
+
s.date = %q{2011-01-14}
|
13
13
|
s.default_executable = %q{ruco}
|
14
14
|
s.email = %q{michael@grosser.it}
|
15
15
|
s.executables = ["ruco"]
|
@@ -37,9 +37,26 @@ describe Ruco::Application do
|
|
37
37
|
app.cursor.should == [3,0] # 0 offset + 1 for statusbar
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
describe 'closing' do
|
41
|
+
it "can quit" do
|
42
|
+
result = app.key(:"Ctrl+w")
|
43
|
+
result.should == :quit
|
44
|
+
end
|
45
|
+
|
46
|
+
it "asks before closing changed file -- escape == no" do
|
47
|
+
app.key(?a)
|
48
|
+
app.key(:"Ctrl+w")
|
49
|
+
app.view.split("\n").last.should include("Loose changes")
|
50
|
+
app.key(:escape).should_not == :quit
|
51
|
+
app.key("\n").should_not == :quit
|
52
|
+
end
|
53
|
+
|
54
|
+
it "asks before closing changed file -- enter == yes" do
|
55
|
+
app.key(?a)
|
56
|
+
app.key(:"Ctrl+w")
|
57
|
+
app.view.split("\n").last.should include("Loose changes")
|
58
|
+
app.key(:enter).should == :quit
|
59
|
+
end
|
43
60
|
end
|
44
61
|
|
45
62
|
describe :bind do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 10
|
10
|
+
version: 0.0.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-14 00:00:00 +01:00
|
19
19
|
default_executable: ruco
|
20
20
|
dependencies: []
|
21
21
|
|