tmb 0.0.2

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.
Files changed (8) hide show
  1. data/CHANGELOG +2 -0
  2. data/LICENSE +0 -0
  3. data/Manifest +6 -0
  4. data/README.md +0 -0
  5. data/Rakefile +69 -0
  6. data/bin/tmb +519 -0
  7. data/tmb.gemspec +85 -0
  8. metadata +82 -0
data/CHANGELOG ADDED
@@ -0,0 +1,2 @@
1
+ v0.0.2. Gemspec updated. Added install message with usage instructions
2
+ v0.0.1. Full feature set - very messy organization
data/LICENSE ADDED
File without changes
data/Manifest ADDED
@@ -0,0 +1,6 @@
1
+ CHANGELOG
2
+ LICENSE
3
+ README.md
4
+ Rakefile
5
+ bin/tmb
6
+ Manifest
data/README.md ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,69 @@
1
+ require 'echoe'
2
+ #Echoe.new(File.basename(File.dirname(__FILE__)))
3
+
4
+ App = "tmb"
5
+
6
+ Echoe.new(App) do |p|
7
+ p.name = App
8
+ p.version = "0.0.2"
9
+ p.author = "Justin Thibault"
10
+ p.email = "jvthibault@gmail.com"
11
+ p.install_message = <<-eos
12
+
13
+ \033[1m#{App}\033[0m is a utility to search for textmate bundles, download and install
14
+ them, all via a convenient command line interface, much like rubygems.
15
+
16
+
17
+ Usage:
18
+ ======================================
19
+
20
+ # Search for bundles containing the word 'webrat' in
21
+ # the title, description, or author's name.
22
+
23
+ \033[1m#{App} search webrat\033[0m
24
+
25
+
26
+ # Search for bundles containing the word 'rspec' OR
27
+ # 'cucumber' OR 'shoulda' in their title, description,
28
+ # or author's name.
29
+
30
+ \033[1m#{App} search rspec cucumber shoulda\033[0m
31
+
32
+
33
+ # Install a bundle containing the word rspec in its
34
+ # search fields. If multiple matches exist, #{App}
35
+ # will let you choose which version to install.
36
+
37
+ \033[1m#{App} install rspec\033[0m
38
+
39
+
40
+ # List all installed bundles
41
+
42
+ \033[1m#{App} list\033[0m
43
+
44
+
45
+ # Uninstall bundle matching 'json'. If you type in a
46
+ # fragment and there are multiple installed bundles that begin
47
+ # with that fragment, #{App} will let you choose which version
48
+ # you'd like to destroy
49
+
50
+ \033[1m#{App} uninstall json\033[0m
51
+
52
+
53
+ # Tell textmate (if it's open) to reload its bundle information,
54
+ # and update menus & controls accordingly
55
+
56
+ \033[1m#{App} reload\033[0m
57
+
58
+
59
+ # Print this help information
60
+
61
+ \033[1m#{App} help\033[0m
62
+
63
+
64
+
65
+ eos
66
+ p.summary = "#{App} - Textmate bundle utility: A utility to search, install, and uninstall textmate bundles from github"
67
+ p.description = "#{App} provides a command line interface to manage your textmate bundles, allowing" +
68
+ " you to search for new bundles on github, install them, and uninstall existing local bundles."
69
+ end
data/bin/tmb ADDED
@@ -0,0 +1,519 @@
1
+ #!/usr/bin/env ruby -i
2
+
3
+ # This script allows you to install textmate bundles from github like gems
4
+ # You will need the "get_bundle" script to do the dirty work of pulling the repo and installing the script
5
+
6
+ require 'rubygems'
7
+ require 'json'
8
+ require 'open-uri'
9
+ require 'uri'
10
+
11
+ module TM
12
+
13
+ TextWrap = 78
14
+ IndentSpacing = 10
15
+ Indent = (" " * IndentSpacing)
16
+ Justify = 15
17
+ Delimiter = ": "
18
+ BundleDirectory = "/Library/Application Support/TextMate/Bundles"
19
+ App = File.basename(__FILE__)
20
+
21
+ Help = <<-eos
22
+
23
+ \033[1m#{App}\033[0m is a utility to search for textmate bundles, download and install
24
+ them, all via a convenient command line interface, much like rubygems.
25
+
26
+
27
+ Usage:
28
+ ======================================
29
+
30
+ # Search for bundles containing the word 'webrat' in
31
+ # the title, description, or author's name.
32
+
33
+ \033[1m#{App} search webrat\033[0m
34
+
35
+
36
+ # Search for bundles containing the word 'rspec' OR
37
+ # 'cucumber' OR 'shoulda' in their title, description,
38
+ # or author's name.
39
+
40
+ \033[1m#{App} search rspec cucumber shoulda\033[0m
41
+
42
+
43
+ # Install a bundle containing the word rspec in its
44
+ # search fields. If multiple matches exist, #{App}
45
+ # will let you choose which version to install.
46
+
47
+ \033[1m#{App} install rspec\033[0m
48
+
49
+
50
+ # List all installed bundles
51
+
52
+ \033[1m#{App} list\033[0m
53
+
54
+
55
+ # Uninstall bundle matching 'json'. If you type in a
56
+ # fragment and there are multiple installed bundles that begin
57
+ # with that fragment, #{App} will let you choose which version
58
+ # you'd like to destroy
59
+
60
+ \033[1m#{App} uninstall json\033[0m
61
+
62
+
63
+ # Tell textmate (if it's open) to reload its bundle information,
64
+ # and update menus & controls accordingly
65
+
66
+ \033[1m#{App} reload\033[0m
67
+
68
+
69
+ # Print this help information
70
+
71
+ \033[1m#{App} help\033[0m
72
+
73
+
74
+
75
+ eos
76
+
77
+ end
78
+
79
+
80
+ class String
81
+
82
+ def indent(indent=TM::Indent)
83
+ indent + self
84
+ end
85
+
86
+ def text_wrap(width=TM::TextWrap, indent=TM::Indent)
87
+ self.gsub /(.{1,#{width}})(\s+|\Z)/, "\\1\n".indent(indent)
88
+ end
89
+
90
+ end
91
+
92
+ module TM
93
+
94
+ class Bundle
95
+
96
+
97
+ attr_accessor :result, :repository, :install_output
98
+
99
+
100
+
101
+ def initialize(result=nil, options={})
102
+ @result = result
103
+ @repository = options[:repo] || git_repo
104
+ end
105
+
106
+ def self.installed
107
+ Dir.glob("#{BundleDirectory}/*.tmbundle").sort{|a,b| a.downcase <=> b.downcase }
108
+ end
109
+
110
+ def self.list
111
+ installed.each do |b|
112
+ puts File.basename(b)
113
+ end
114
+ end
115
+
116
+ def self.select(bundle)
117
+ installed.select{|b| b =~ Regexp.new(bundle + ".*\.tmbundle$") }
118
+ end
119
+
120
+ def self.uninstall(bundle)
121
+ bundle_dir = File.basename(bundle)
122
+ FileUtils.rm_r(File.join(BundleDirectory, bundle_dir))
123
+ end
124
+
125
+ def short_result
126
+ {:description => result["description"], :repo => repository }
127
+ end
128
+
129
+ def bundle_name
130
+ result["name"].gsub("tmbundle",'').gsub(/^[[:punct:]]+|[[:punct:]]+$/,'')
131
+ end
132
+
133
+ def git_repo
134
+ "https://github.com/#{@result["username"]}/#{@result["name"]}.git"
135
+ end
136
+
137
+ def display_key(key, options={})
138
+ defaults = {:ljust => Justify, :rjust => Justify, :delimiter => Delimiter, :key_prefix => "", :key_suffix => ""}
139
+ options = defaults.merge options
140
+
141
+ if options[:bold_key]
142
+ options[:key_prefix] = "\033[1m" + options[:key_prefix]
143
+ options[:key_suffix] = options[:key_suffix] +"\033[0m"
144
+ end
145
+ if options[:title].nil? || options[:title].strip.length == 0
146
+ options[:title] = ""
147
+ options[:delimiter] = ""#(" " * options[:delimiter].length)
148
+ options[:ljust] = 0
149
+ end
150
+ options[:title] ||= key.to_s
151
+ options[:key_prefix] + (options[:title].capitalize + options[:delimiter]).ljust(options[:ljust]) + options[:key_suffix]
152
+ end
153
+
154
+ def display_keypair(key, options={})
155
+ defaults = {:title => key.to_s, :ljust => Justify, :rjust => Justify, :delimiter => Delimiter, :key_prefix => "", :key_suffix => "", :value_prefix => "", :value_suffix => ""}
156
+ options = defaults.merge(options)
157
+ if options[:bold]
158
+ options[:bold_value] ||= true
159
+ options[:bold_key] ||= true
160
+ end
161
+ if options[:bold_value]
162
+ options[:value_prefix] = "\033[1m" + options[:value_prefix]
163
+ options[:value_suffix] = options[:value_suffix] +"\033[0m"
164
+ end
165
+ [
166
+ display_key(options[:title], options),
167
+ options[:value_prefix] + ((options[:value] || (key.is_a?(Symbol) && self.methods.include?(key.to_s)) ? self.send(key) : @result[key.to_s]).to_s) + options[:value_suffix]
168
+ ].compact.reject{|s| s.strip == "" }.join
169
+ end
170
+
171
+
172
+
173
+ def display_value(key, options={})
174
+ display_keypair(key, options)
175
+ end
176
+
177
+ def extended_display(key, options={})
178
+ #options[:indent] ||= true
179
+ ed = display_value(key, options).to_s
180
+ unless options[:indent] == false
181
+ ed = ed.indent
182
+ end
183
+ if options[:wrap]
184
+ ed = ed.text_wrap
185
+ end
186
+ if options[:newline]
187
+ ed = ("\n" * options[:newline]) + ed
188
+ end
189
+ ed
190
+ end
191
+
192
+ def stats
193
+ "\n" + [
194
+ display_value(:followers, :ljust => Justify ),
195
+ display_value(:forks, :ljust => Justify ),
196
+ display_value(:watchers, :ljust => Justify )
197
+ ].map{|v| v.indent(" " * (IndentSpacing + Justify))}.join("\n")
198
+ end
199
+
200
+ def short_stats
201
+ "(" + ["followers", "forks", "watchers"].map{|s| result[s.to_s].to_s + " " + s.to_s}.join(", ") + ")"
202
+ end
203
+
204
+ def as_selection(index)
205
+ "#{(index + 1).to_s}) #{git_repo.ljust(60)} \033[1m#{short_stats}\033[0m"
206
+
207
+ end
208
+
209
+ def display_map
210
+ [
211
+ {:v=> "name", :bold => true, :indent => true, :title => "", :value_prefix => "\e[1;32m"},
212
+ {:v => "username", :title => "Author", :bold_value => true, :newline => 1},
213
+ {:v => "homepage"},
214
+ {:v => :repository, :bold_value => true},
215
+ {:v => :stats, :delimiter => "", :title => ""},
216
+ {:v => "created_at", :newline => 1},
217
+ {:v=> "description", :indent => false, :newline => 2, :title => "", :wrap => true}
218
+ ]
219
+ end
220
+
221
+ def to_s
222
+ display_map.map{|d| extended_display(d.delete(:v), d) }.join("\n") + "\n"
223
+ end
224
+
225
+ def to_ss
226
+ [
227
+ "\033[1m" + display_value("name") + "\033[0m",
228
+ display_value("username", :title => "Author").indent,
229
+ display_value(:repository).indent,
230
+ display_value("homepage").indent,
231
+ display_value("followers").indent,
232
+ display_value("followers").indent,
233
+ display_value("followers").indent,
234
+ display_value("created_at").indent,
235
+ "\n" + result["description"].text_wrap
236
+ ].join("\n")
237
+ end
238
+
239
+ def destination
240
+ File.join(BundleDirectory, "#{bundle_name}.tmbundle")
241
+ end
242
+
243
+ def common_install_script
244
+ <<-eos
245
+ bundle_dir="#{BundleDirectory}"
246
+ mkdir -p "$bundle_dir"
247
+ file_name=$(echo -e #{@repository} | grep -o -P "[-\w\.]+$")
248
+ bundle_name=$(echo -e $file_name | sed -E -e 's/\.[a-zA-Z0-9]+$//g' -e 's/\.tmbundle//g')
249
+ dest="#{destination}"
250
+ rm -Rf "$dest"
251
+ eos
252
+ end
253
+
254
+ def git_install_script
255
+ <<-eos
256
+ #{common_install_script}
257
+ git clone #{@repository} "$dest"
258
+ osascript -e 'tell app "TextMate" to reload bundles'
259
+ eos
260
+ end
261
+
262
+ def smart_extract_script(archive)
263
+ <<-eos
264
+ arch=#{archive}
265
+ if [ -f $arch ]; then
266
+ case $arch in
267
+ *.tar.bz2) tar -jxvf $arch ;;
268
+ *.tar.gz) tar -zxvf $arch ;;
269
+ *.bz2) bunzip2 $arch ;;
270
+ *.dmg) hdiutil mount $arch ;;
271
+ *.gz) gunzip $arch ;;
272
+ *.tar) tar -xvf $arch ;;
273
+ *.tbz2) tar -jxvf $arch ;;
274
+ *.tgz) tar -zxvf $arch ;;
275
+ *.zip) unzip $arch ;;
276
+ *.Z) uncompress $arch ;;
277
+ *) echo "'$arch' cannot be extracted/mounted via smartextract()" ;;
278
+ esac
279
+ else
280
+ echo "'$arch' is not a valid file"
281
+ fi
282
+ eos
283
+ end
284
+
285
+ def archive_install_script
286
+ <<-eos
287
+ #{common_install_script}
288
+ cd $bundle_dir
289
+ if [[ -n $bundle_name ]]
290
+ then
291
+ rm -R "$bundle_dir/$bundle_name"*
292
+ fi
293
+ curl -o "$bundle_dir/$file_name" $1
294
+ #{ smart_extract_script('$bundle_dir/$file_name')}
295
+ bundle=$(find $bundle_dir/$bundle_name | grep -P "tmbundle$")
296
+ if [[ -n $bundle ]]
297
+ then
298
+ cp -R $bundle $bundle_dir
299
+ fi
300
+ non_bundles=$(find $bundle_dir -d 1 | grep -v -P "tmbundle$|^\.")
301
+ echo $non_bundles | xargs -Ixxx rm -Rf "xxx"
302
+ cd $current
303
+ osascript -e 'tell app "TextMate" to reload bundles'
304
+ eos
305
+ end
306
+
307
+ def install
308
+ install_output = IO.popen(git_install_script).read
309
+ end
310
+
311
+
312
+ end
313
+ end
314
+
315
+
316
+
317
+
318
+
319
+ class TMBundles
320
+
321
+ attr_accessor :response, :results, :search_terms, :full_set
322
+
323
+
324
+ def initialize(search_terms=nil)
325
+ @search_terms = search_terms
326
+ @full_set = nil
327
+ @results = []
328
+ search
329
+ end
330
+
331
+ def self.handle_connection_error(e, url)
332
+ error = e.class.name.split("::")
333
+ exception = error[-1]
334
+ lib = error[0]
335
+ lib = lib == exception ? "OpenURI" : lib
336
+ host = URI.parse(url).host
337
+ error_message = case exception
338
+ when "SocketError" : socket_error(e,url)
339
+ when "HTTPError" : http_error(e,url)
340
+ end
341
+ puts error_message.
342
+ gsub(/#URL/,url).
343
+ gsub(/#LIB/,lib).
344
+ gsub(/#MESSAGE/,e.message).
345
+ gsub(/#EXCEPTION/,exception).
346
+ gsub(/#HOST/,host)
347
+ exit 0
348
+ end
349
+
350
+ def self.socket_error(e, url)
351
+ <<-eos
352
+
353
+ #LIB is raising a #EXCEPTION: \033[1m#{e.message}\033[0m
354
+
355
+ Either \033[1m#HOST\033[0m is currently unavailable or your internet connection is down.
356
+
357
+ (We were trying to access \033[1m#URL\033[0m)
358
+
359
+ eos
360
+ end
361
+
362
+ def self.http_code_messages
363
+ {
364
+ "404" => "the page you're attempting to access doesn't exist"
365
+ }
366
+ end
367
+
368
+ def self.http_error(e, url)
369
+ <<-eos
370
+
371
+ #LIB is raising an #EXCEPTION: \033[1m#MESSAGE\033[0m
372
+
373
+ That means #{http_code_messages[e.message.match(/\d{3}/).to_s]}
374
+
375
+ (We were trying to access \033[1m#URL\033[0m)
376
+
377
+ eos
378
+ end
379
+
380
+ def search_description(terms=@search_terms)
381
+ "Searching for \033[1m#{terms.to_a.join(', ')}\033[0m"
382
+ end
383
+
384
+ def put_search_description
385
+ puts "\n" + search_description + "\n"
386
+ end
387
+
388
+
389
+ def short_result(result)
390
+ {:description => result["description"], :repo => git_repo(result) }
391
+ end
392
+
393
+ def sample_response
394
+ '{"repositories": [{"name": "haml", "username": "justin"}]}'
395
+ end
396
+
397
+ def search(search_terms = @search_terms, options={})
398
+ options[:additive] ||= true
399
+ formatted_terms = search_terms.to_a.join =~ /tmbundle/ ? search_terms.to_a.join : ['tmbundle',search_terms.to_a].flatten.compact.join(' ')
400
+ regex_terms = Regexp.new(search_terms.to_a.join("|"))
401
+ search_url="http://github.com/api/v2/json/repos/search/#{URI.escape(formatted_terms)}"
402
+ if search_terms.nil? && full_set.nil?
403
+ begin
404
+ response = open(search_url).read
405
+ rescue => e
406
+ self.class.handle_connection_error(e,search_url)
407
+ end
408
+ @full_set = JSON.parse(response)["repositories"]
409
+ @full_set.each_with_index do |r,i|
410
+ @full_set[i]["search_terms"] = r.values_at("username", "name", "description").join
411
+ end
412
+ else
413
+ if options[:additive]
414
+ @results += full_set.to_a.select{|r| r["search_terms"] =~ regex_terms}
415
+ else
416
+ @results = full_set.to_a.select{|r| r["search_terms"] =~ regex_terms}
417
+ end
418
+ end
419
+ @results = @results.uniq
420
+ current_results = search_terms.nil? ? full_set : results
421
+ return current_results.uniq
422
+ end
423
+
424
+
425
+ def display_results(res=nil)
426
+ res ||= results
427
+ to_display = res || search(search_terms)
428
+ to_display.sort{|a,b| a["name"].downcase <=> b["name"].downcase }.map{|r| TM::Bundle.new(r).to_s }.join("\n\n")
429
+ end
430
+
431
+ def bash_install_script_from_repo(repo)
432
+ <<-eos
433
+ bundle_dir="/Library/Application Support/TextMate/Bundles"
434
+ mkdir -p "$bundle_dir"
435
+ file_name=$(echo -e #{repo} | grep -o -P "[-\w\.]+$")
436
+ bundle_name=$(echo -e $file_name | sed -E -e 's/\.[a-zA-Z0-9]+$//g' -e 's/\.tmbundle//g')
437
+ dest=$bundle_dir/$bundle_name.tmbundle
438
+ rm -Rf "$dest"
439
+ git clone #{repo} "$dest"
440
+ osascript -e 'tell app "TextMate" to reload bundles'
441
+ eos
442
+ end
443
+
444
+ def install(repo)
445
+ puts repo
446
+ if repo.match(/^(http|git|https):.*\.git$/)
447
+ matching_repo = TM::Bundle.new([], :repo => repo)
448
+ elsif repo.match(/^(http|ftp|https):.*\.(zip|gz|tar.gz|bz2|tar.bz2)$/)
449
+ matching_repo = TM::Bundle.new([], :repo => repo)
450
+ else
451
+ matching_repo = TM::Bundle.new(search(repo).first)
452
+ end
453
+ install_output = matching_repo.install
454
+ puts install_output
455
+ end
456
+
457
+ end
458
+
459
+ searcher = TMBundles.new
460
+ search_terms = ARGV[1..-1]
461
+ commands = ["install", "search", "reload","list", "uninstall","help"]
462
+ tm_command = ARGV[0]
463
+
464
+ unless commands.include?(ARGV[0])
465
+ puts "You must use this command like 'tmbundles search {search terms}' or 'tmbundles install {package name or repository uri}'"
466
+ exit 0
467
+ end
468
+
469
+ if tm_command == "uninstall"
470
+ results = TM::Bundle.select(ARGV[1])
471
+ if results.size > 1
472
+ puts "\nYou are trying to uninstall multiple bundles. Select the bundle you wish to remove: \n\n"
473
+ results.each_with_index do |r,i|
474
+ puts "#{(i+1)}) #{r}"
475
+ end
476
+ print "\n\nMake your selection: "
477
+ selection = STDIN.gets.chomp
478
+ result = results[selection.to_i - 1]
479
+
480
+ else
481
+ result = results.first
482
+ end
483
+ puts "\nYou chose #{result}\n\nUninstalling...\n\n"
484
+ removed = TM::Bundle.uninstall(result)
485
+ puts "#{result} uninstalled" if removed
486
+ elsif tm_command == "list"
487
+ TM::Bundle.list
488
+ elsif tm_command == "search"
489
+ if search_terms.nil? or search_terms.length == 0
490
+ searcher.search
491
+ else
492
+ search_terms.each{|term| searcher.search(term) }
493
+ end
494
+ puts "\n" + searcher.search_description(search_terms) + "\n\n" + searcher.display_results + "\n\n"
495
+ elsif ARGV[0] == "install"
496
+ results = searcher.search(ARGV[1])
497
+ if results.size == 0
498
+ puts "No matches found"
499
+ elsif results.size == 1
500
+ TM::Bundle.new(results.first).install
501
+ else
502
+ puts "\nYour installation attempt found multiple bundles. Which of the following repositories would you like to install?\n\n"
503
+ results.each_with_index do |r,i|
504
+ b = TM::Bundle.new(r)
505
+ puts b.as_selection(i)
506
+ end
507
+ print "\n\nMake your selection: "
508
+ selection = STDIN.gets.chomp
509
+ result = results[selection.to_i - 1]
510
+ puts "\nYou chose #{selection}: #{result['name']}\n\nInstalling...\n\n"
511
+ bundle = TM::Bundle.new(result)
512
+ bundle.install
513
+ puts "Bundle installed to #{bundle.destination}"
514
+ end
515
+ elsif ARGV[0] == "reload"
516
+ IO.popen("osascript -e 'tell app \"TextMate\" to reload bundles'").read
517
+ elsif ARGV[0] == "help"
518
+ puts TM::Help
519
+ end
data/tmb.gemspec ADDED
@@ -0,0 +1,85 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{tmb}
5
+ s.version = "0.0.2"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Justin Thibault"]
9
+ s.date = %q{2011-03-15}
10
+ s.default_executable = %q{tmb}
11
+ s.description = %q{tmb provides a command line interface to manage your textmate bundles, allowing you to search for new bundles on github, install them, and uninstall existing local bundles.}
12
+ s.email = %q{jvthibault@gmail.com}
13
+ s.executables = ["tmb"]
14
+ s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "bin/tmb"]
15
+ s.files = ["CHANGELOG", "LICENSE", "README.md", "Rakefile", "bin/tmb", "Manifest", "tmb.gemspec"]
16
+ s.homepage = %q{http://tmb.github.com/tmb/}
17
+ s.post_install_message = %q{
18
+ tmb is a utility to search for textmate bundles, download and install
19
+ them, all via a convenient command line interface, much like rubygems.
20
+
21
+
22
+ Usage:
23
+ ======================================
24
+
25
+ # Search for bundles containing the word 'webrat' in
26
+ # the title, description, or author's name.
27
+
28
+ tmb search webrat
29
+
30
+
31
+ # Search for bundles containing the word 'rspec' OR
32
+ # 'cucumber' OR 'shoulda' in their title, description,
33
+ # or author's name.
34
+
35
+ tmb search rspec cucumber shoulda
36
+
37
+
38
+ # Install a bundle containing the word rspec in its
39
+ # search fields. If multiple matches exist, tmb
40
+ # will let you choose which version to install.
41
+
42
+ tmb install rspec
43
+
44
+
45
+ # List all installed bundles
46
+
47
+ tmb list
48
+
49
+
50
+ # Uninstall bundle matching 'json'. If you type in a
51
+ # fragment and there are multiple installed bundles that begin
52
+ # with that fragment, tmb will let you choose which version
53
+ # you'd like to destroy
54
+
55
+ tmb uninstall json
56
+
57
+
58
+ # Tell textmate (if it's open) to reload its bundle information,
59
+ # and update menus & controls accordingly
60
+
61
+ tmb reload
62
+
63
+
64
+ # Print this help information
65
+
66
+ tmb help
67
+
68
+
69
+
70
+ }
71
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Tmb", "--main", "README.md"]
72
+ s.require_paths = ["lib"]
73
+ s.rubyforge_project = %q{tmb}
74
+ s.rubygems_version = %q{1.6.1}
75
+ s.summary = %q{tmb - Textmate bundle utility: A utility to search, install, and uninstall textmate bundles from github}
76
+
77
+ if s.respond_to? :specification_version then
78
+ s.specification_version = 3
79
+
80
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
81
+ else
82
+ end
83
+ else
84
+ end
85
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tmb
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
11
+ platform: ruby
12
+ authors:
13
+ - Justin Thibault
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-15 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: tmb provides a command line interface to manage your textmate bundles, allowing you to search for new bundles on github, install them, and uninstall existing local bundles.
23
+ email: jvthibault@gmail.com
24
+ executables:
25
+ - tmb
26
+ extensions: []
27
+
28
+ extra_rdoc_files:
29
+ - CHANGELOG
30
+ - LICENSE
31
+ - README.md
32
+ - bin/tmb
33
+ files:
34
+ - CHANGELOG
35
+ - LICENSE
36
+ - README.md
37
+ - Rakefile
38
+ - bin/tmb
39
+ - Manifest
40
+ - tmb.gemspec
41
+ has_rdoc: true
42
+ homepage: http://tmb.github.com/tmb/
43
+ licenses: []
44
+
45
+ post_install_message: "\n \e[1mtmb\e[0m is a utility to search for textmate bundles, download and install\n them, all via a convenient command line interface, much like rubygems.\n\n\n Usage:\n ======================================\n\n # Search for bundles containing the word 'webrat' in\n # the title, description, or author's name.\n\n \e[1mtmb search webrat\e[0m\n\n\n # Search for bundles containing the word 'rspec' OR\n # 'cucumber' OR 'shoulda' in their title, description,\n # or author's name.\n\n \e[1mtmb search rspec cucumber shoulda\e[0m\n\n\n # Install a bundle containing the word rspec in its\n # search fields. If multiple matches exist, tmb\n # will let you choose which version to install.\n\n \e[1mtmb install rspec\e[0m\n\n\n # List all installed bundles\n\n \e[1mtmb list\e[0m\n\n\n # Uninstall bundle matching 'json'. If you type in a\n # fragment and there are multiple installed bundles that begin\n # with that fragment, tmb will let you choose which version\n # you'd like to destroy\n\n \e[1mtmb uninstall json\e[0m\n\n\n # Tell textmate (if it's open) to reload its bundle information,\n # and update menus & controls accordingly\n\n \e[1mtmb reload\e[0m\n\n\n # Print this help information\n\n \e[1mtmb help\e[0m\n\n\n\n"
46
+ rdoc_options:
47
+ - --line-numbers
48
+ - --inline-source
49
+ - --title
50
+ - Tmb
51
+ - --main
52
+ - README.md
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ hash: 11
70
+ segments:
71
+ - 1
72
+ - 2
73
+ version: "1.2"
74
+ requirements: []
75
+
76
+ rubyforge_project: tmb
77
+ rubygems_version: 1.6.1
78
+ signing_key:
79
+ specification_version: 3
80
+ summary: "tmb - Textmate bundle utility: A utility to search, install, and uninstall textmate bundles from github"
81
+ test_files: []
82
+