tmb 0.0.4 → 0.0.5

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 (7) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +1 -0
  3. data/Rakefile +1 -1
  4. data/bin/tmb +10 -2
  5. data/tmb.gemspec +2 -2
  6. metadata +4 -4
  7. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.0.5. Bundles can now be installed with a full github repo path - avoid searching issues
1
2
  v0.0.4. Totally doing this wrong - Gem should be signed now
2
3
  v0.0.3. Totally doing this wrong - Gem should be signed now
3
4
  v0.0.2. Gemspec updated. Added install message with usage instructions
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'echoe'
4
4
  #Echoe.new(File.basename(File.dirname(__FILE__)))
5
5
 
6
6
  App = "tmb"
7
- Version = "0.0.4"
7
+ Version = "0.0.5"
8
8
 
9
9
  Echoe.new(App, Version) do |p|
10
10
  p.name = App
data/bin/tmb CHANGED
@@ -87,6 +87,10 @@ class String
87
87
  self.gsub /(.{1,#{width}})(\s+|\Z)/, "\\1\n".indent(indent)
88
88
  end
89
89
 
90
+ def bold
91
+ "\033[1m" + self + "\033[0m"
92
+ end
93
+
90
94
  end
91
95
 
92
96
  module TM
@@ -97,7 +101,6 @@ module TM
97
101
  attr_accessor :result, :repository, :install_output
98
102
 
99
103
 
100
-
101
104
  def initialize(result=nil, options={})
102
105
  @result = result
103
106
  @repository = options[:repo] || git_repo
@@ -395,8 +398,9 @@ class TMBundles
395
398
  end
396
399
 
397
400
  def search(search_terms = @search_terms, options={})
401
+ bundle_suffix = "bundle"
398
402
  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(' ')
403
+ formatted_terms = search_terms.to_a.join =~ Regexp.new(bundle_suffix) ? search_terms.to_a.join : [bundle_suffix,search_terms.to_a].flatten.compact.join(' ')
400
404
  regex_terms = Regexp.new(search_terms.to_a.join("|"))
401
405
  search_url="http://github.com/api/v2/json/repos/search/#{URI.escape(formatted_terms)}"
402
406
  if search_terms.nil? && full_set.nil?
@@ -493,6 +497,10 @@ elsif tm_command == "search"
493
497
  end
494
498
  puts "\n" + searcher.search_description(search_terms) + "\n\n" + searcher.display_results + "\n\n"
495
499
  elsif ARGV[0] == "install"
500
+ if ARGV[1] =~ /^(https|git):\S*\.git$/
501
+ TM::Bundle.new({},:repo => ARGV[1]).install
502
+ exit 0
503
+ end
496
504
  results = searcher.search(ARGV[1])
497
505
  if results.size == 0
498
506
  puts "No matches found"
data/tmb.gemspec CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tmb}
5
- s.version = "0.0.4"
5
+ s.version = "0.0.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Justin Thibault"]
9
9
  s.cert_chain = ["/Users/jvthibault/.gem/gem-public_cert.pem"]
10
- s.date = %q{2011-03-15}
10
+ s.date = %q{2011-03-16}
11
11
  s.default_executable = %q{tmb}
12
12
  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.}
13
13
  s.email = %q{jvthibault@gmail.com}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Thibault
@@ -36,7 +36,7 @@ cert_chain:
36
36
  qKZc+z33GcN0Zg==
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2011-03-15 00:00:00 -07:00
39
+ date: 2011-03-16 00:00:00 -07:00
40
40
  default_executable:
41
41
  dependencies: []
42
42
 
metadata.gz.sig CHANGED
Binary file