schlueter-rushmate 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/Manifest.txt +2 -1
- data/README +9 -2
- data/lib/rushmate/command.rb +5 -2
- data/lib/rushmate/exit.rb +33 -31
- data/lib/rushmate/user_input.rb +9 -0
- data/lib/rushmate.rb +7 -1
- data/rushmate.gemspec +4 -3
- metadata +3 -2
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/README
CHANGED
@@ -25,8 +25,15 @@ Rushmate::Command.new {
|
|
25
25
|
# if you can't find any files show a tool tip
|
26
26
|
exit.show_tool_tip("can't find #{current_word.downcase}.rb in project")
|
27
27
|
else
|
28
|
-
|
29
|
-
|
28
|
+
if found_files.size == 1
|
29
|
+
# if there is only 1 file go ahead and switch to that file
|
30
|
+
found_files.mate
|
31
|
+
else
|
32
|
+
# if there are multiple files prompt the user for which file they want to switch to
|
33
|
+
# then switch to their selection
|
34
|
+
menu_files = found_files.collect { |f| f.full_path.gsub(project_directory.full_path, "") }
|
35
|
+
project_directory[input.select_from_array(menu_files)].mate
|
36
|
+
end
|
30
37
|
end
|
31
38
|
}
|
32
39
|
|
data/lib/rushmate/command.rb
CHANGED
@@ -18,7 +18,11 @@ module Rushmate
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def exit
|
21
|
-
Rushmate::Exit
|
21
|
+
Rushmate::Exit
|
22
|
+
end
|
23
|
+
|
24
|
+
def input
|
25
|
+
Rushmate::UserInput
|
22
26
|
end
|
23
27
|
|
24
28
|
private
|
@@ -26,7 +30,6 @@ module Rushmate
|
|
26
30
|
self.shell = Rush::Shell.new
|
27
31
|
shell.class.class_eval do
|
28
32
|
def print_result(res)
|
29
|
-
|
30
33
|
end
|
31
34
|
end
|
32
35
|
end
|
data/lib/rushmate/exit.rb
CHANGED
@@ -1,42 +1,44 @@
|
|
1
1
|
module Rushmate
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
module Exit
|
3
|
+
class << self
|
4
|
+
def discard
|
5
|
+
exit 200
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
def replace_text(out = nil)
|
9
|
+
print out if out
|
10
|
+
exit 201
|
11
|
+
end
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
def replace_document(out = nil)
|
14
|
+
print out if out
|
15
|
+
exit 202
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
def insert_text(out = nil)
|
19
|
+
print out if out
|
20
|
+
exit 203
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
def insert_snippet(out = nil)
|
24
|
+
print out if out
|
25
|
+
exit 204
|
26
|
+
end
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
def show_html(out = nil)
|
29
|
+
print out if out
|
30
|
+
exit 205
|
31
|
+
end
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
def show_tool_tip(out = nil)
|
34
|
+
print out if out
|
35
|
+
exit 206
|
36
|
+
end
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
def create_new_document(out = nil)
|
39
|
+
print out if out
|
40
|
+
exit 207
|
41
|
+
end
|
40
42
|
end
|
41
43
|
end
|
42
44
|
end
|
data/lib/rushmate.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
begin
|
2
|
+
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
|
3
|
+
require ENV['TM_SUPPORT_PATH'] + '/lib/ui'
|
4
|
+
rescue
|
5
|
+
end
|
1
6
|
require 'rubygems'
|
2
7
|
require 'rush'
|
3
8
|
require 'rush/shell'
|
4
9
|
require 'rushmate/textmate_helper'
|
5
10
|
require 'rushmate/command'
|
6
|
-
require 'rushmate/exit'
|
11
|
+
require 'rushmate/exit'
|
12
|
+
require 'rushmate/user_input'
|
data/rushmate.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "rushmate"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.6"
|
4
4
|
s.email = "schlueter@gmail.com"
|
5
5
|
s.homepage = "http://github.com/schlueter/rushmate"
|
6
6
|
s.description = "Textmate to Rush bridge"
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.date = %q{2008-08-
|
8
|
+
s.date = %q{2008-08-14}
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.rubygems_version = %q{1.2.0}
|
11
11
|
s.summary = "Textmate to Rush bridge"
|
@@ -18,7 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
"lib/rushmate.rb",
|
19
19
|
"lib/rushmate/command.rb",
|
20
20
|
"lib/rushmate/exit.rb",
|
21
|
-
"lib/rushmate/textmate_helper.rb"
|
21
|
+
"lib/rushmate/textmate_helper.rb",
|
22
|
+
"lib/rushmate/user_input.rb"
|
22
23
|
]
|
23
24
|
|
24
25
|
s.has_rdoc = true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schlueter-rushmate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Schlueter
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-14 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- lib/rushmate/command.rb
|
41
41
|
- lib/rushmate/exit.rb
|
42
42
|
- lib/rushmate/textmate_helper.rb
|
43
|
+
- lib/rushmate/user_input.rb
|
43
44
|
has_rdoc: true
|
44
45
|
homepage: http://github.com/schlueter/rushmate
|
45
46
|
post_install_message:
|