salicio-textmate 0.9.3.1 → 0.9.4
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/bin/textmate +18 -8
- metadata +4 -4
data/bin/textmate
CHANGED
|
@@ -9,24 +9,30 @@ require "yaml"
|
|
|
9
9
|
class TextmateInstaller < Thor
|
|
10
10
|
|
|
11
11
|
# CHANGED: renamed list to remote. Could there be a better name?
|
|
12
|
-
desc "
|
|
13
|
-
def
|
|
12
|
+
desc "search [SEARCH]", "Lists all the matching remote bundles"
|
|
13
|
+
def search(search_term = "")
|
|
14
14
|
search_term = Regexp.new(".*#{search_term}.*", "i")
|
|
15
15
|
|
|
16
|
-
remote_bundle_locations.each do |name
|
|
16
|
+
remote_bundle_locations.keys.map { |key| key.to_s }.sort.each do |name|
|
|
17
|
+
location = remote_bundle_locations[name.to_sym]
|
|
17
18
|
puts "\n" << name.to_s << " Remote Bundles\n" << name.to_s.gsub(/./,'-') << '---------------'
|
|
18
19
|
|
|
19
20
|
results = case location[:scm]
|
|
20
21
|
when :svn
|
|
21
|
-
%x[svn list #{e_sh location[:url]}].
|
|
22
|
+
%x[svn list #{e_sh location[:url]}].select {|x| x =~ search_term}.map do |result|
|
|
23
|
+
"%s - %s" % [
|
|
24
|
+
result.split('.').first,
|
|
25
|
+
"#{location[:url]}/#{result.chomp}"
|
|
26
|
+
]
|
|
27
|
+
end.join("\n")
|
|
22
28
|
when :git
|
|
23
29
|
'git remotes not implemented yet'
|
|
24
30
|
when :github
|
|
25
31
|
find_github_bundles(search_term).map {|result|
|
|
26
|
-
"%s
|
|
32
|
+
"%s - %s" %
|
|
27
33
|
[
|
|
28
34
|
normalize_github_repo_name(result['name']).split('.').first,
|
|
29
|
-
result
|
|
35
|
+
git_url_from_github_result(result)
|
|
30
36
|
]
|
|
31
37
|
}
|
|
32
38
|
end
|
|
@@ -130,8 +136,8 @@ class TextmateInstaller < Thor
|
|
|
130
136
|
|
|
131
137
|
private
|
|
132
138
|
def remote_bundle_locations
|
|
133
|
-
{ :'Macromates Trunk' => {:scm => :svn, :url => 'http://
|
|
134
|
-
:'Macromates Review' => {:scm => :svn, :url => 'http://
|
|
139
|
+
{ :'Macromates Trunk' => {:scm => :svn, :url => 'http://svn.textmate.org/trunk/Bundles'},
|
|
140
|
+
:'Macromates Review' => {:scm => :svn, :url => 'http://svn.textmate.org/trunk/Review/Bundles'},
|
|
135
141
|
|
|
136
142
|
# :'Bunch of Git Bundles' => {:scm => :git, :url => 'git://NotImplemented'},
|
|
137
143
|
|
|
@@ -187,6 +193,10 @@ class TextmateInstaller < Thor
|
|
|
187
193
|
results.sort{|a,b| a['name'] <=> b['name']}
|
|
188
194
|
end
|
|
189
195
|
|
|
196
|
+
def git_url_from_github_result(result)
|
|
197
|
+
"git://github.com/#{result['username']}/#{result['name']}.git"
|
|
198
|
+
end
|
|
199
|
+
|
|
190
200
|
end
|
|
191
201
|
|
|
192
202
|
# TODO: create a "monument to personal cleverness" by class-izing everything?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: salicio-textmate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yehuda Katz
|
|
@@ -9,7 +9,7 @@ autorequire: textmate
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date:
|
|
12
|
+
date: 2009-07-09 00:00:00 -07:00
|
|
13
13
|
default_executable: textmate
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -22,8 +22,8 @@ dependencies:
|
|
|
22
22
|
- !ruby/object:Gem::Version
|
|
23
23
|
version: 0.9.2
|
|
24
24
|
version:
|
|
25
|
-
description: Command-line textmate package manager
|
|
26
|
-
email:
|
|
25
|
+
description: Command-line textmate package manager modified by Roberto Salicio
|
|
26
|
+
email: roberto.salicio@gmail.com
|
|
27
27
|
executables:
|
|
28
28
|
- textmate
|
|
29
29
|
extensions: []
|