ruco 0.0.55 → 0.0.56

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 CHANGED
@@ -73,8 +73,8 @@ Customize
73
73
  TIPS
74
74
  ====
75
75
  - [Mac] arow-keys + Shift/Alt does not work in default terminal (use iTerm)
76
- - [Tabs] Ruco does not like tabs. Existing tabs are displayed as ' ' and pressing tab inserts 2*' '
77
- - [RVM] `alias r="rvm ree exec ruco"` and you only have to install ruco once
76
+ - [Tabs] Ruco does not like tabs. Existing tabs are displayed as ' ' and pressing tab inserts 2*space
77
+ - [RVM] `alias r="rvm 1.9.2 exec ruco"` and you only have to install ruco once
78
78
  - [Ruby1.9] Unicode support -> install libncursesw5-dev before installing ruby (does not work for 1.8)
79
79
  - [ssh vs clipboard] access your desktops clipboard by installing `xauth` on the server and then using `ssh -X`
80
80
  - [Alt key] if Alt does not work try your Meta/Win/Cmd key
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.55
1
+ 0.0.56
@@ -218,6 +218,8 @@ module Ruco
218
218
  action(:redo){ @editor.redo if @focused == @editor }
219
219
  action(:move_line_up){ @editor.move_line(-1) if @focused == @editor }
220
220
  action(:move_line_down){ @editor.move_line(1) if @focused == @editor }
221
+
222
+ action(:insert_hash_rocket){ @editor.insert(' => ') }
221
223
  end
222
224
 
223
225
  def setup_keys
@@ -231,6 +233,7 @@ module Ruco
231
233
  bind :"Ctrl+b", :select_mode
232
234
  bind :"Ctrl+a", :select_all
233
235
  bind :"Ctrl+d", :delete_line
236
+ bind :"Ctrl+l", :insert_hash_rocket
234
237
  bind :"Ctrl+x", :cut
235
238
  bind :"Ctrl+c", :copy
236
239
  bind :"Ctrl+v", :paste
data/lib/ruco/form.rb CHANGED
@@ -20,7 +20,7 @@ module Ruco
20
20
  end
21
21
 
22
22
  def insert(text)
23
- @text_field.insert(text.gsub("\n",''))
23
+ @text_field.insert(text.gsub("\n",'')) unless text == "\n"
24
24
  @submit.call(@text_field.value) if text.include?("\n")
25
25
  end
26
26
 
data/lib/ruco/history.rb CHANGED
@@ -55,11 +55,11 @@ module Ruco
55
55
  end
56
56
 
57
57
  def timeout!
58
- @last_merge = Time.now.to_f - @timeout
58
+ @last_merge = 0
59
59
  end
60
60
 
61
61
  def merge_timeout?
62
62
  (Time.now.to_f - @last_merge) > @timeout
63
63
  end
64
64
  end
65
- end
65
+ 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.0.55"
8
+ s.version = "0.0.56"
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-05-08}
12
+ s.date = %q{2011-05-11}
13
13
  s.default_executable = %q{ruco}
14
14
  s.email = %q{michael@grosser.it}
15
15
  s.executables = ["ruco"]
@@ -165,6 +165,14 @@ describe Ruco::Application do
165
165
  end
166
166
  end
167
167
 
168
+ describe 'insert hash rocket' do
169
+ it "inserts an amazing hash rocket" do
170
+ write("")
171
+ app.key(:"Ctrl+l")
172
+ editor_part(app.view).should == " => \n\n"
173
+ end
174
+ end
175
+
168
176
  describe 'Find and replace' do
169
177
  it "stops when nothing is found" do
170
178
  write 'abc'
@@ -84,6 +84,16 @@ describe Ruco::CommandBar do
84
84
  bar.text_in_selection.should == 'abc'
85
85
  end
86
86
 
87
+ it "can re-find when reopening the find bar" do
88
+ @results = []
89
+ bar.ask('Find: ', :cache => true){|r| @results << r }
90
+ bar.insert('abc')
91
+ bar.insert("\n")
92
+ bar.ask('Find: ', :cache => true){|r| @results << r }
93
+ bar.insert("\n")
94
+ @results.should == ["abc","abc"]
95
+ end
96
+
87
97
  it "gets reset when starting a new question" do
88
98
  bar.ask('Find: '){}
89
99
  bar.insert('123')
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: 113
4
+ hash: 111
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 55
10
- version: 0.0.55
9
+ - 56
10
+ version: 0.0.56
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-05-08 00:00:00 +02:00
18
+ date: 2011-05-11 00:00:00 +02:00
19
19
  default_executable: ruco
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency