gem-ctags 1.0.0
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/.gitignore +4 -0
- data/Gemfile +2 -0
- data/MIT-LICENSE +20 -0
- data/README.markdown +57 -0
- data/Rakefile +1 -0
- data/gem-ctags.gemspec +16 -0
- data/lib/rubygems/commands/ctags_command.rb +18 -0
- data/lib/rubygems_plugin.rb +9 -0
- metadata +53 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) Tim Pope
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
RubyGems Automatic Ctags Invoker
|
2
|
+
================================
|
3
|
+
|
4
|
+
Nary a day of Ruby development goes by where I don't run either
|
5
|
+
`gem open`. And when I do, I want tags. As good as I've gotten at
|
6
|
+
`ctags -R .`, I've grown weary of it. So I wrote a RubyGems plugin to
|
7
|
+
automatically invoke Ctags every time a Gem is installed.
|
8
|
+
|
9
|
+
Installation
|
10
|
+
------------
|
11
|
+
|
12
|
+
gem install gem-ctags
|
13
|
+
|
14
|
+
Now all that's left to do is install [Exuberant Ctags][] and make sure
|
15
|
+
it comes first in `$PATH`. With Homebrew, `brew install ctags`.
|
16
|
+
|
17
|
+
If you're using RVM, I recommend extending your global gemset:
|
18
|
+
|
19
|
+
echo gem-ctags >> ~/.rvm/gemsets/global.gems
|
20
|
+
|
21
|
+
To generate tags for all previously installed gems that don't already
|
22
|
+
have a `tags` file, run `gem ctags`. (If it blows up, upgrade
|
23
|
+
RubyGems.) Future gems will be handled automatically and silently, with
|
24
|
+
the sad exception of those installed by Bundler.
|
25
|
+
|
26
|
+
Vim Tips
|
27
|
+
--------
|
28
|
+
|
29
|
+
If you have [rake.vim][] installed (which, by the way, is a misleading
|
30
|
+
name), Vim will already know where to look for the tags file when
|
31
|
+
editing a gem.
|
32
|
+
|
33
|
+
If you want to get crazy, add this to your vimrc to get Vim to search
|
34
|
+
all gems in your current RVM gemset (requires [pathogen.vim][]):
|
35
|
+
|
36
|
+
autocmd FileType ruby let &l:tags = pathogen#legacyjoin(pathogen#uniq(
|
37
|
+
\ pathogen#split(&tags) +
|
38
|
+
\ map(split($GEM_PATH,':'),'v:val."/gems/*/tags"')))
|
39
|
+
|
40
|
+
I don't like to get crazy.
|
41
|
+
|
42
|
+
Contributing
|
43
|
+
------------
|
44
|
+
|
45
|
+
Don't submit a pull request with [an ugly commit
|
46
|
+
message](http://stopwritingramblingcommitmessages.com) or I will ignore
|
47
|
+
your patch until I have the energy to politely explain my zero tolerance
|
48
|
+
policy.
|
49
|
+
|
50
|
+
License
|
51
|
+
-------
|
52
|
+
|
53
|
+
Copyright (c) Tim Pope. MIT License.
|
54
|
+
|
55
|
+
[Exuberant Ctags]: http://ctags.sourceforge.net/
|
56
|
+
[pathogen.vim]: https://github.com/tpope/vim-pathogen
|
57
|
+
[rake.vim]: https://github.com/tpope/vim-rake
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/gem-ctags.gemspec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "gem-ctags"
|
6
|
+
s.version = "1.0.0"
|
7
|
+
s.authors = ["Tim Pope"]
|
8
|
+
s.email = ["ruby@tpop"+'e.org']
|
9
|
+
s.homepage = "https://github.com/tpope/gem-ctags"
|
10
|
+
s.summary = %q{Automatic ctags generation on gem install}
|
11
|
+
|
12
|
+
s.files = `git ls-files`.split("\n")
|
13
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems/command'
|
2
|
+
|
3
|
+
class Gem::Commands::CtagsCommand < Gem::Command
|
4
|
+
def initialize
|
5
|
+
super 'ctags', 'Generate ctags for gems'
|
6
|
+
end
|
7
|
+
|
8
|
+
def execute
|
9
|
+
Gem::Specification.each do |spec|
|
10
|
+
Dir.chdir(spec.full_gem_path) do
|
11
|
+
unless File.exist?('tags')
|
12
|
+
say "Generating ctags for #{spec.full_name}"
|
13
|
+
system('ctags', '-R', *spec.require_paths)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gem-ctags
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tim Pope
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-11 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description:
|
15
|
+
email:
|
16
|
+
- ruby@tpope.org
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- MIT-LICENSE
|
24
|
+
- README.markdown
|
25
|
+
- Rakefile
|
26
|
+
- gem-ctags.gemspec
|
27
|
+
- lib/rubygems/commands/ctags_command.rb
|
28
|
+
- lib/rubygems_plugin.rb
|
29
|
+
homepage: https://github.com/tpope/gem-ctags
|
30
|
+
licenses: []
|
31
|
+
post_install_message:
|
32
|
+
rdoc_options: []
|
33
|
+
require_paths:
|
34
|
+
- lib
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
requirements: []
|
48
|
+
rubyforge_project:
|
49
|
+
rubygems_version: 1.8.7
|
50
|
+
signing_key:
|
51
|
+
specification_version: 3
|
52
|
+
summary: Automatic ctags generation on gem install
|
53
|
+
test_files: []
|