schlueter-rushmate 0.0.3
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/History.txt +5 -0
- data/Manifest.txt +8 -0
- data/README +3 -0
- data/lib/rushmate.rb +6 -0
- data/lib/rushmate/command.rb +23 -0
- data/lib/rushmate/exits.rb +42 -0
- data/lib/rushmate/textmate_helper.rb +27 -0
- data/rushmate.gemspec +35 -0
- metadata +71 -0
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/README
ADDED
data/lib/rushmate.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Rushmate
|
2
|
+
class Command
|
3
|
+
include TextmateHelper
|
4
|
+
attr_accessor :shell
|
5
|
+
def initialize()
|
6
|
+
self.shell = Rush::Shell.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def run(&block)
|
10
|
+
self.instance_eval(&block)
|
11
|
+
end
|
12
|
+
|
13
|
+
def execute(thing)
|
14
|
+
shell.execute(thing)
|
15
|
+
$last_res
|
16
|
+
end
|
17
|
+
|
18
|
+
def method_missing(sym, *args, &block)
|
19
|
+
execute sym.to_s
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Rushmate
|
2
|
+
module Exit
|
3
|
+
def discard
|
4
|
+
exit 200
|
5
|
+
end
|
6
|
+
|
7
|
+
def replace_text(out = nil)
|
8
|
+
print out if out
|
9
|
+
exit 201
|
10
|
+
end
|
11
|
+
|
12
|
+
def replace_document(out = nil)
|
13
|
+
print out if out
|
14
|
+
exit 202
|
15
|
+
end
|
16
|
+
|
17
|
+
def insert_text(out = nil)
|
18
|
+
print out if out
|
19
|
+
exit 203
|
20
|
+
end
|
21
|
+
|
22
|
+
def insert_snippet(out = nil)
|
23
|
+
print out if out
|
24
|
+
exit 204
|
25
|
+
end
|
26
|
+
|
27
|
+
def show_html(out = nil)
|
28
|
+
print out if out
|
29
|
+
exit 205
|
30
|
+
end
|
31
|
+
|
32
|
+
def show_tool_tip(out = nil)
|
33
|
+
print out if out
|
34
|
+
exit 206
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_new_document(out = nil)
|
38
|
+
print out if out
|
39
|
+
exit 207
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Rushmate
|
2
|
+
module TextmateHelper
|
3
|
+
def tm_current_word
|
4
|
+
ENV['TM_CURRENT_WORD']
|
5
|
+
end
|
6
|
+
|
7
|
+
def tm_directory
|
8
|
+
root[ENV['TM_DIRECTORY'] + "/"]
|
9
|
+
end
|
10
|
+
|
11
|
+
def tm_file
|
12
|
+
root[ENV['TM_FILEPATH']]
|
13
|
+
end
|
14
|
+
|
15
|
+
def tm_filename
|
16
|
+
ENV["TM_FILENAME"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def tm_project_directory
|
20
|
+
root[ENV['TM_PROJECT_DIRECTORY'] + "/"]
|
21
|
+
end
|
22
|
+
|
23
|
+
def tm_current_line
|
24
|
+
ENV["TM_CURRENT_LINE"]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/rushmate.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "rushmate"
|
3
|
+
s.version = "0.0.3"
|
4
|
+
s.email = "schlueter@gmail.com"
|
5
|
+
s.homepage = "http://github.com/schlueter/rushmate"
|
6
|
+
s.description = "Textmate to Rush bridge"
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.date = %q{2008-08-13}
|
9
|
+
s.require_paths = ["lib"]
|
10
|
+
s.rubygems_version = %q{1.2.0}
|
11
|
+
s.summary = "Textmate to Rush bridge"
|
12
|
+
s.authors = ["Nicholas Schlueter"]
|
13
|
+
s.files = [
|
14
|
+
"History.txt",
|
15
|
+
"Manifest.txt",
|
16
|
+
"README",
|
17
|
+
"rushmate.gemspec",
|
18
|
+
"lib/rushmate.rb",
|
19
|
+
"lib/rushmate/command.rb",
|
20
|
+
"lib/rushmate/exits.rb",
|
21
|
+
"lib/rushmate/textmate_helper.rb"
|
22
|
+
]
|
23
|
+
|
24
|
+
s.has_rdoc = true
|
25
|
+
s.rdoc_options = ["--main", "README"]
|
26
|
+
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README"]
|
27
|
+
s.add_dependency(%q<rush>, [">= 0.4"])
|
28
|
+
|
29
|
+
if s.respond_to? :specification_version then
|
30
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
31
|
+
s.specification_version = 2
|
32
|
+
|
33
|
+
else
|
34
|
+
end
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: schlueter-rushmate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nicholas Schlueter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-08-13 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rush
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0.4"
|
23
|
+
version:
|
24
|
+
description: Textmate to Rush bridge
|
25
|
+
email: schlueter@gmail.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- History.txt
|
32
|
+
- Manifest.txt
|
33
|
+
- README
|
34
|
+
files:
|
35
|
+
- History.txt
|
36
|
+
- Manifest.txt
|
37
|
+
- README
|
38
|
+
- rushmate.gemspec
|
39
|
+
- lib/rushmate.rb
|
40
|
+
- lib/rushmate/command.rb
|
41
|
+
- lib/rushmate/exits.rb
|
42
|
+
- lib/rushmate/textmate_helper.rb
|
43
|
+
has_rdoc: true
|
44
|
+
homepage: http://github.com/schlueter/rushmate
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options:
|
47
|
+
- --main
|
48
|
+
- README
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: "0"
|
56
|
+
version:
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: "0"
|
62
|
+
version:
|
63
|
+
requirements: []
|
64
|
+
|
65
|
+
rubyforge_project:
|
66
|
+
rubygems_version: 1.2.0
|
67
|
+
signing_key:
|
68
|
+
specification_version: 2
|
69
|
+
summary: Textmate to Rush bridge
|
70
|
+
test_files: []
|
71
|
+
|