gem-ctags 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +13 -5
- data/gem-ctags.gemspec +3 -1
- data/lib/rubygems/commands/ctags_command.rb +12 -5
- data/lib/rubygems_plugin.rb +2 -3
- metadata +41 -20
data/README.markdown
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
RubyGems Automatic Ctags Invoker
|
2
2
|
================================
|
3
3
|
|
4
|
-
Nary a day of Ruby development goes by where I don't run
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
Nary a day of Ruby development goes by where I don't run `gem open`.
|
5
|
+
And when I do, I want tags. As good as I've gotten at `ctags -R .`,
|
6
|
+
I've grown weary of it. So I wrote a RubyGems plugin to automatically
|
7
|
+
invoke Ctags every time a Gem is installed.
|
8
8
|
|
9
9
|
Installation
|
10
10
|
------------
|
@@ -21,7 +21,11 @@ If you're using RVM, I recommend extending your global gemset:
|
|
21
21
|
To generate tags for all previously installed gems that don't already
|
22
22
|
have a `tags` file, run `gem ctags`. (If it blows up, upgrade
|
23
23
|
RubyGems.) Future gems will be handled automatically and silently, with
|
24
|
-
the sad exception of those installed by Bundler
|
24
|
+
the sad exception of those installed by Bundler (see
|
25
|
+
[this issue](https://github.com/carlhuda/bundler/pull/1364)).
|
26
|
+
Temporary workaround:
|
27
|
+
|
28
|
+
echo Gem.load_plugins >> "$(gem which bundler/cli)"
|
25
29
|
|
26
30
|
Vim Tips
|
27
31
|
--------
|
@@ -30,6 +34,9 @@ If you have [rake.vim][] installed (which, by the way, is a misleading
|
|
30
34
|
name), Vim will already know where to look for the tags file when
|
31
35
|
editing a gem.
|
32
36
|
|
37
|
+
If you have [bundler.vim][] installed, Vim will be aware of all tags
|
38
|
+
files from all gems in your bundle.
|
39
|
+
|
33
40
|
If you want to get crazy, add this to your vimrc to get Vim to search
|
34
41
|
all gems in your current RVM gemset (requires [pathogen.vim][]):
|
35
42
|
|
@@ -53,5 +60,6 @@ License
|
|
53
60
|
Copyright (c) Tim Pope. MIT License.
|
54
61
|
|
55
62
|
[Exuberant Ctags]: http://ctags.sourceforge.net/
|
63
|
+
[bundler.vim]: https://github.com/tpope/vim-bundler
|
56
64
|
[pathogen.vim]: https://github.com/tpope/vim-pathogen
|
57
65
|
[rake.vim]: https://github.com/tpope/vim-rake
|
data/gem-ctags.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "gem-ctags"
|
6
|
-
s.version = "1.0.
|
6
|
+
s.version = "1.0.1"
|
7
7
|
s.authors = ["Tim Pope"]
|
8
8
|
s.email = ["ruby@tpop"+'e.org']
|
9
9
|
s.homepage = "https://github.com/tpope/gem-ctags"
|
@@ -13,4 +13,6 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
14
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
15
15
|
s.require_paths = ["lib"]
|
16
|
+
|
17
|
+
s.add_development_dependency('rake')
|
16
18
|
end
|
@@ -7,11 +7,18 @@ class Gem::Commands::CtagsCommand < Gem::Command
|
|
7
7
|
|
8
8
|
def execute
|
9
9
|
Gem::Specification.each do |spec|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
self.class.index(spec) do
|
11
|
+
say "Generating ctags for #{spec.full_name}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.index(spec)
|
17
|
+
Dir.chdir(spec.full_gem_path) do
|
18
|
+
unless File.exist?('tags')
|
19
|
+
yield if block_given?
|
20
|
+
paths = spec.require_paths.select { |p| File.directory?(p) }
|
21
|
+
system('ctags', '-R', '--languages=ruby', *paths)
|
15
22
|
end
|
16
23
|
end
|
17
24
|
end
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -3,7 +3,6 @@ require 'rubygems/command_manager'
|
|
3
3
|
Gem::CommandManager.instance.register_command :ctags
|
4
4
|
|
5
5
|
Gem.post_install do |installer|
|
6
|
-
|
7
|
-
|
8
|
-
end
|
6
|
+
require 'rubygems/commands/ctags_command'
|
7
|
+
Gem::Commands::CtagsCommand.index(installer.spec)
|
9
8
|
end
|
metadata
CHANGED
@@ -1,23 +1,39 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-ctags
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 1.0.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Tim Pope
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
12
|
+
|
13
|
+
date: 2011-08-23 00:00:00 -04:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rake
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0"
|
25
|
+
type: :development
|
26
|
+
version_requirements: *id001
|
14
27
|
description:
|
15
|
-
email:
|
28
|
+
email:
|
16
29
|
- ruby@tpope.org
|
17
30
|
executables: []
|
31
|
+
|
18
32
|
extensions: []
|
33
|
+
|
19
34
|
extra_rdoc_files: []
|
20
|
-
|
35
|
+
|
36
|
+
files:
|
21
37
|
- .gitignore
|
22
38
|
- Gemfile
|
23
39
|
- MIT-LICENSE
|
@@ -26,28 +42,33 @@ files:
|
|
26
42
|
- gem-ctags.gemspec
|
27
43
|
- lib/rubygems/commands/ctags_command.rb
|
28
44
|
- lib/rubygems_plugin.rb
|
45
|
+
has_rdoc: true
|
29
46
|
homepage: https://github.com/tpope/gem-ctags
|
30
47
|
licenses: []
|
48
|
+
|
31
49
|
post_install_message:
|
32
50
|
rdoc_options: []
|
33
|
-
|
51
|
+
|
52
|
+
require_paths:
|
34
53
|
- lib
|
35
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
55
|
none: false
|
37
|
-
requirements:
|
38
|
-
- -
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: "0"
|
60
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
61
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: "0"
|
47
66
|
requirements: []
|
67
|
+
|
48
68
|
rubyforge_project:
|
49
|
-
rubygems_version: 1.
|
69
|
+
rubygems_version: 1.6.2
|
50
70
|
signing_key:
|
51
71
|
specification_version: 3
|
52
72
|
summary: Automatic ctags generation on gem install
|
53
73
|
test_files: []
|
74
|
+
|