ruco 0.1.4 → 0.1.5
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/Readme.md +1 -0
- data/VERSION +1 -1
- data/bin/ruco +1 -0
- data/lib/ruco/status_bar.rb +5 -2
- data/ruco.gemspec +2 -2
- data/spec/ruco/status_bar_spec.rb +10 -3
- metadata +4 -4
data/Readme.md
CHANGED
@@ -97,6 +97,7 @@ TODO
|
|
97
97
|
- search options regex + case-sensitive
|
98
98
|
- add auto-confirm to 'replace?' dialog -> type s == skip, no enter needed
|
99
99
|
- 1.8: unicode support <-> already finished but unusable due to Curses (see encoding branch)
|
100
|
+
- shorten long file names in the middle/start, not at the end
|
100
101
|
|
101
102
|
Authors
|
102
103
|
=======
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/bin/ruco
CHANGED
data/lib/ruco/status_bar.rb
CHANGED
@@ -23,9 +23,12 @@ module Ruco
|
|
23
23
|
|
24
24
|
private
|
25
25
|
|
26
|
+
# fill the line with left column and then overwrite the right section
|
26
27
|
def spread(left, right)
|
27
|
-
empty = [@options[:columns] - left.size
|
28
|
-
|
28
|
+
empty = [@options[:columns] - left.size, 0].max
|
29
|
+
line = left + (" " * empty)
|
30
|
+
line[(@options[:columns] - right.size - 1)..-1] = ' ' + right
|
31
|
+
line
|
29
32
|
end
|
30
33
|
end
|
31
34
|
end
|
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.5"
|
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-06-
|
12
|
+
s.date = %q{2011-06-13}
|
13
13
|
s.default_executable = %q{ruco}
|
14
14
|
s.email = %q{michael@grosser.it}
|
15
15
|
s.executables = ["ruco"]
|
@@ -2,17 +2,24 @@ require File.expand_path('spec/spec_helper')
|
|
2
2
|
|
3
3
|
describe Ruco::StatusBar do
|
4
4
|
let(:file){ 'spec/temp.txt' }
|
5
|
-
let(:editor){ Ruco::Editor.new(file, :lines => 5, :columns =>
|
6
|
-
let(:bar){ Ruco::StatusBar.new(editor, :columns =>
|
5
|
+
let(:editor){ Ruco::Editor.new(file, :lines => 5, :columns => 35) }
|
6
|
+
let(:bar){ Ruco::StatusBar.new(editor, :columns => 35) }
|
7
7
|
|
8
8
|
it "shows name and version" do
|
9
|
-
bar.view.should include("Ruco #{Ruco::VERSION}")
|
9
|
+
bar.view.should include("Ruco #{Ruco::VERSION}")
|
10
10
|
end
|
11
11
|
|
12
12
|
it "shows the file" do
|
13
13
|
bar.view.should include(file)
|
14
14
|
end
|
15
15
|
|
16
|
+
it "can show to long files" do
|
17
|
+
editor = Ruco::Editor.new('a'*20+'b', :lines => 5, :columns => 20)
|
18
|
+
bar = Ruco::StatusBar.new(editor, :columns => 20)
|
19
|
+
bar.view.should == "Ruco 0.1.4 -- aa 1:1"
|
20
|
+
bar.view.size.should == 20
|
21
|
+
end
|
22
|
+
|
16
23
|
it "indicates modified" do
|
17
24
|
bar.view.should_not include('*')
|
18
25
|
editor.insert('x')
|
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: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
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-06-
|
18
|
+
date: 2011-06-13 00:00:00 +02:00
|
19
19
|
default_executable: ruco
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|