tmb 0.0.90 → 0.0.95
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/Manifest +0 -1
- data/README.md +22 -0
- data/Rakefile +1 -1
- data/lib/tmb/bundle.rb +4 -3
- data/lib/tmb/bundles.rb +2 -2
- data/lib/tmb/commands.rb +2 -0
- data/tmb.gemspec +2 -2
- metadata +4 -4
data/Manifest
CHANGED
data/README.md
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Installation & usage
|
|
2
|
+
----------------------------
|
|
3
|
+
|
|
4
|
+
<pre>
|
|
5
|
+
<code>
|
|
6
|
+
gem install tmb
|
|
7
|
+
tmb search javascript
|
|
8
|
+
tmb install javascript-jquery // (or some other result you found from the search - we'll let you pick if there are name conflicts)
|
|
9
|
+
</code>
|
|
10
|
+
</pre>
|
|
11
|
+
|
|
12
|
+
Note: If you get an error about some file or dir not existing the first time you use this gem, firstly let me know about it, but is probably because you've never installed a textmate bundle before and you dont have a bundle directory. It is also possible that we have't created the tmb db files during installation. On OSX, open up the terminal and run the following to try to work around those problems temporarily...
|
|
13
|
+
|
|
14
|
+
<pre>
|
|
15
|
+
<code>
|
|
16
|
+
mkdir -p "~/Library/Application Support/Textmate/Bundles"
|
|
17
|
+
mkdir -p ~/.tmb
|
|
18
|
+
touch ~/.tmb/.searchdb
|
|
19
|
+
</code>
|
|
20
|
+
</pre>
|
|
21
|
+
|
|
22
|
+
Things should run smoothly at that point. Like I said, let me know if things break for you...I've been trying to fix that bug for a while now.
|
data/Rakefile
CHANGED
data/lib/tmb/bundle.rb
CHANGED
|
@@ -6,9 +6,10 @@ module TM
|
|
|
6
6
|
Justify = 15
|
|
7
7
|
Delimiter = ": "
|
|
8
8
|
BaseBundleDirectory = "/Library/Application Support/TextMate/Bundles"
|
|
9
|
-
UserBundleDirectory = "#{ENV['HOME']}/Library/Application
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
UserBundleDirectory = "#{ENV['HOME']}/Library/Application Support/TextMate/Bundles"
|
|
10
|
+
`mkdir -p "#{TM::UserBundleDirectory}"`
|
|
11
|
+
BundleDirectory = ( File.exist?(BaseBundleDirectory) && Dir.entries(BaseBundleDirectory).size > Dir.entries(UserBundleDirectory).size ) ? BaseBundleDirectory : UserBundleDirectory
|
|
12
|
+
SettingsDirectory = "#{ENV['HOME']}/.tmb"
|
|
12
13
|
App = File.basename File.dirname(__FILE__)
|
|
13
14
|
DB = ".tmbdb"
|
|
14
15
|
SearchDB = ".searchdb"
|
data/lib/tmb/bundles.rb
CHANGED
|
@@ -11,7 +11,7 @@ module TM
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def self.searchdb?
|
|
14
|
-
File.exists?(searchdb_file)
|
|
14
|
+
File.exists?(searchdb_file) && ( JSON.parse( File.read(@@search_file) ) rescue [] ).size > 0
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def initialize(search_terms=nil)
|
|
@@ -164,7 +164,7 @@ module TM
|
|
|
164
164
|
f = File.open(self.class.searchdb_file,File::RDWR|File::CREAT)
|
|
165
165
|
f.close
|
|
166
166
|
end
|
|
167
|
-
@results = @full_set = JSON.parse( File.read(@@search_file) )
|
|
167
|
+
@results = @full_set = JSON.parse( File.read(@@search_file) ) rescue []
|
|
168
168
|
puts "#{@full_set.size} local results"
|
|
169
169
|
@full_set.each_with_index do |r,i|
|
|
170
170
|
@full_set[i]["search_terms"] = r.values_at("username", "name", "description").join
|
data/lib/tmb/commands.rb
CHANGED
data/tmb.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "tmb"
|
|
5
|
-
s.version = "0.0.
|
|
5
|
+
s.version = "0.0.95"
|
|
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"]
|
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.email = "jvthibault@gmail.com"
|
|
12
12
|
s.executables = ["tmb"]
|
|
13
13
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.md", "bin/tmb", "lib/tmb.rb", "lib/tmb/bundle.rb", "lib/tmb/bundles.rb", "lib/tmb/commands.rb"]
|
|
14
|
-
s.files = ["CHANGELOG", "LICENSE", "README.md", "Rakefile", "bin/tmb", "lib/tmb.rb", "lib/tmb/bundle.rb", "lib/tmb/bundles.rb", "lib/tmb/commands.rb", "
|
|
14
|
+
s.files = ["CHANGELOG", "LICENSE", "README.md", "Rakefile", "bin/tmb", "lib/tmb.rb", "lib/tmb/bundle.rb", "lib/tmb/bundles.rb", "lib/tmb/commands.rb", "Manifest", "tmb.gemspec"]
|
|
15
15
|
s.homepage = "http://tmb.github.com/tmb/"
|
|
16
16
|
s.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"
|
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Tmb", "--main", "README.md"]
|
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:
|
|
4
|
+
hash: 161
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 95
|
|
10
|
+
version: 0.0.95
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Justin Thibault
|
|
@@ -43,8 +43,8 @@ files:
|
|
|
43
43
|
- lib/tmb/bundle.rb
|
|
44
44
|
- lib/tmb/bundles.rb
|
|
45
45
|
- lib/tmb/commands.rb
|
|
46
|
-
- tmb.gemspec
|
|
47
46
|
- Manifest
|
|
47
|
+
- tmb.gemspec
|
|
48
48
|
homepage: http://tmb.github.com/tmb/
|
|
49
49
|
licenses: []
|
|
50
50
|
|