gem-ctags 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,14 +1,15 @@
1
1
  RubyGems Automatic Ctags Invoker
2
2
  ================================
3
3
 
4
- Nary a day of Ruby development goes by where I don't run `bundle open`
5
- or `gem open`. And when I go rooting around in a gem, I want tags. As
6
- good as I've gotten at `ctags -R .`, I've grown weary of it. So I wrote
7
- a RubyGems plugin to automatically invoke Ctags on gems as they are
8
- installed.
4
+ Nary a day of Ruby development goes by where I don't run
5
+ [`gem open`][gem-browse] or `bundle open`. And when I go rooting around
6
+ in a gem, I want tags. As good as I've gotten at `ctags -R .`, I've
7
+ grown weary of it. So I wrote a RubyGems plugin to automatically invoke
8
+ Ctags on gems as they are installed.
9
9
 
10
10
  Installation
11
11
  ------------
12
+
12
13
  If you haven't already, install [Exuberant Ctags][] and make sure it
13
14
  comes first in `$PATH`. With Homebrew, `brew install ctags`. Now all
14
15
  that's left to do is install gem-ctags and perform a one-off indexing of
@@ -24,6 +25,9 @@ gems below it will be indexed.
24
25
  Vim Tips
25
26
  --------
26
27
 
28
+ To easily edit a gem with your current working directory set to the
29
+ gem's root, install [gem-browse][].
30
+
27
31
  If you have [rake.vim][] installed (which, by the way, is a misleading
28
32
  name), Vim will already know where to look for the tags file when
29
33
  editing a gem.
@@ -54,6 +58,7 @@ License
54
58
  Copyright (c) Tim Pope. MIT License.
55
59
 
56
60
  [Exuberant Ctags]: http://ctags.sourceforge.net/
61
+ [gem-browse]: https://github.com/tpope/gem-browse
57
62
  [bundler.vim]: https://github.com/tpope/vim-bundler
58
63
  [pathogen.vim]: https://github.com/tpope/vim-pathogen
59
64
  [rake.vim]: https://github.com/tpope/vim-rake
data/Rakefile CHANGED
@@ -1 +1,11 @@
1
- require "bundler/gem_tasks"
1
+ $:.unshift(File.join(File.dirname(__FILE__), 'lib')).uniq!
2
+
3
+ begin
4
+ require "bundler/gem_tasks"
5
+ rescue LoadError
6
+ end
7
+
8
+ task :default do
9
+ require 'rubygems/commands/ctags_command'
10
+ Gem::Commands::CtagsCommand.new.execute
11
+ end
data/gem-ctags.gemspec CHANGED
@@ -3,9 +3,9 @@ $:.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.2"
6
+ s.version = "1.0.3"
7
7
  s.authors = ["Tim Pope"]
8
- s.email = ["ruby@tpop"+'e.org']
8
+ s.email = ["code@tpop"+'e.net']
9
9
  s.homepage = "https://github.com/tpope/gem-ctags"
10
10
  s.summary = %q{Automatic ctags generation on gem install}
11
11
 
@@ -20,14 +20,14 @@ class Gem::Commands::CtagsCommand < Gem::Command
20
20
  def self.index(spec)
21
21
  Dir.chdir(spec.full_gem_path) do
22
22
 
23
- unless File.exist?('tags')
23
+ if !File.exist?('tags') || File.read('tags', 1) != '!'
24
24
  yield "Generating ctags for #{spec.full_name}" if block_given?
25
25
  paths = spec.require_paths.select { |p| File.directory?(p) }
26
26
  system('ctags', '-R', '--languages=ruby', *paths)
27
27
  end
28
28
 
29
29
  target = 'lib/bundler/cli.rb'
30
- if File.exist?(target) && File.read(target) !~ /plugin/
30
+ if File.writable?(target) && !File.read(target).include?('load_plugins')
31
31
  yield "Injecting gem-ctags into #{spec.full_name}" if block_given?
32
32
  File.open(target, 'a') do |f|
33
33
  f.write "\nGem.load_plugins rescue nil\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-ctags
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-23 00:00:00.000000000Z
12
+ date: 2012-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &82709410 !ruby/object:Gem::Requirement
16
+ requirement: &70344526901080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *82709410
24
+ version_requirements: *70344526901080
25
25
  description:
26
26
  email:
27
- - ruby@tpope.org
27
+ - code@tpope.net
28
28
  executables: []
29
29
  extensions: []
30
30
  extra_rdoc_files: []
@@ -57,8 +57,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 1.8.6
60
+ rubygems_version: 1.8.10
61
61
  signing_key:
62
62
  specification_version: 3
63
63
  summary: Automatic ctags generation on gem install
64
64
  test_files: []
65
+ has_rdoc: