gem-etags 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/Gemfile +2 -0
- data/MIT-LICENSE +20 -0
- data/README.markdown +65 -0
- data/Rakefile +1 -0
- data/gem-etags.gemspec +16 -0
- data/lib/rubygems/commands/etags_command.rb +18 -0
- data/lib/rubygems_plugin.rb +9 -0
- metadata +54 -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,65 @@
|
|
1
|
+
RubyGems Automatic Etags Invoker
|
2
|
+
================================
|
3
|
+
|
4
|
+
This gem is based on [tpope's](https://github.com/tpope)
|
5
|
+
[ctags](https://github.com/tpope/gem-ctags) but for Emacs compliant
|
6
|
+
'TAGS'.
|
7
|
+
|
8
|
+
Nary a day of Ruby development goes by where I don't run `gem open`.
|
9
|
+
And when I do, I want tags. As good as I've gotten at `ctags -eR .`,
|
10
|
+
I've grown weary of it. So I wrote a RubyGems plugin to automatically
|
11
|
+
invoke Ctags every time a Gem is installed.
|
12
|
+
|
13
|
+
Installation
|
14
|
+
------------
|
15
|
+
|
16
|
+
gem install gem-etags
|
17
|
+
|
18
|
+
Now all that's left to do is install [Exuberant
|
19
|
+
Ctags][http://ctags.sourceforge.net/] and make sure it comes first in
|
20
|
+
`$PATH`
|
21
|
+
|
22
|
+
If you're using RVM, I recommend extending your global gemset:
|
23
|
+
|
24
|
+
echo gem-etags >> ~/.rvm/gemsets/global.gems
|
25
|
+
|
26
|
+
To generate tags for all previously installed gems that don't already
|
27
|
+
have a `TAGS` file, run `gem etags`. (If it blows up, upgrade
|
28
|
+
RubyGems.) Future gems will be handled automatically and silently, with
|
29
|
+
the sad exception of those installed by Bundler.
|
30
|
+
|
31
|
+
## Note on Patches/Pull Requests:
|
32
|
+
|
33
|
+
Fork the project.
|
34
|
+
Make your feature addition or bug fix.
|
35
|
+
Send me a pull request. Bonus points for topic branches.
|
36
|
+
|
37
|
+
Don't submit a pull request with [an ugly commit
|
38
|
+
message](http://stopwritingramblingcommitmessages.com) or I will ignore
|
39
|
+
your patch until I have the energy to politely explain my zero tolerance
|
40
|
+
policy.
|
41
|
+
|
42
|
+
## Copyright:
|
43
|
+
|
44
|
+
(The MIT License)
|
45
|
+
|
46
|
+
Copyright 2011 Jose Pablo Barrantes. MIT Licence, so go for it.
|
47
|
+
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
49
|
+
a copy of this software and associated documentation files (the
|
50
|
+
'Software'), to deal in the Software without restriction, including
|
51
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
52
|
+
distribute, sublicense, an d/or sell copies of the Software, and to
|
53
|
+
permit persons to whom the Software is furnished to do so, subject to
|
54
|
+
the following conditions:
|
55
|
+
|
56
|
+
The above copyright notice and this permission notice shall be
|
57
|
+
included in all copies or substantial portions of the Software.
|
58
|
+
|
59
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
60
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
61
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
62
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
63
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
64
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
65
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/gem-etags.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-etags"
|
6
|
+
s.version = "1.0.1"
|
7
|
+
s.authors = ["Jose Pablo Barrantes"]
|
8
|
+
s.email = ["xjpablobrx@gmail.com"]
|
9
|
+
s.homepage = "https://github.com/jpablobr/gem-etags"
|
10
|
+
s.summary = %q{Automatic etags 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::EtagsCommand < Gem::Command
|
4
|
+
def initialize
|
5
|
+
super 'etags', 'Generate etags 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 etags for #{spec.full_name}"
|
13
|
+
system('ctags', '-eR', *spec.require_paths)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gem-etags
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jose Pablo Barrantes
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-08-17 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description:
|
15
|
+
email:
|
16
|
+
- xjpablobrx@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- MIT-LICENSE
|
24
|
+
- README.markdown
|
25
|
+
- Rakefile
|
26
|
+
- gem-etags.gemspec
|
27
|
+
- lib/rubygems/commands/etags_command.rb
|
28
|
+
- lib/rubygems_plugin.rb
|
29
|
+
homepage: https://github.com/jpablobr/gem-etags
|
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.8
|
50
|
+
signing_key:
|
51
|
+
specification_version: 3
|
52
|
+
summary: Automatic etags generation on gem install
|
53
|
+
test_files: []
|
54
|
+
has_rdoc:
|