gem-ctags 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44363c65b7a607941b7bbb4e56b4de1d34a66613
4
- data.tar.gz: b530dee77edb95ca2200a9aae88b7cd61ea12e48
3
+ metadata.gz: ec215bd925791412ba67c20963c923f8d5fcc431
4
+ data.tar.gz: abb6698baa41121d0a35d04e9437e7b49f06b3ad
5
5
  SHA512:
6
- metadata.gz: 20952f1a5a58f4d58daa69ea23e1de5537fd2ad9790171cdc19306fed3ecf514e87a07d8e57e40331a3fb76763788a6a89dc1918dcffe8870c7416794ec1b58c
7
- data.tar.gz: cab0ef0b969041dd12e59b24ac2f0c830d11dc6a185df98e3076615aa31c86921f1c1d7ff59e5f2aecdd4c84b5e33d9ae9f2b336426d6dd9a144d5c4ac439737
6
+ metadata.gz: e34d3e54c9b89e3a9d820a1b16634a698685c84cda5b08133d67bdc93e33304314ba37c5032c0662b8bb2d13a976d40db2d5b1638d89d51a66d0bf9c4726cabe
7
+ data.tar.gz: d71f7ac68d52175ff4de7e601c775b339c9824d28516e51f2c626e6977c49c36c3fec8fd0bc80bcd9eba2a504db06911bff37e2740844c4699a88c9fb50e9024
@@ -3,11 +3,12 @@ $:.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"
6
+ s.version = "1.0.7"
7
7
  s.authors = ["Tim Pope"]
8
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
+ s.license = 'MIT'
11
12
 
12
13
  s.files = `git ls-files`.split("\n")
13
14
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,3 +1,4 @@
1
+ require 'pathname'
1
2
  require 'rubygems/command'
2
3
 
3
4
  class Gem::Commands::CtagsCommand < Gem::Command
@@ -20,22 +21,27 @@ class Gem::Commands::CtagsCommand < Gem::Command
20
21
  def self.index(spec)
21
22
  return unless File.directory?(spec.full_gem_path)
22
23
 
23
- Dir.chdir(spec.full_gem_path) do
24
-
25
- if !(File.file?('tags') && File.read('tags', 1) == '!') && !File.directory?('tags')
26
- yield "Generating ctags for #{spec.full_name}" if block_given?
27
- paths = spec.require_paths.select { |p| File.directory?(p) }
28
- system('ctags', '-R', '--languages=ruby', *paths)
29
- end
24
+ tag_file = File.expand_path('tags', spec.full_gem_path)
25
+ if !(File.file?(tag_file) && File.read(tag_file, 1) == '!') && !File.directory?(tag_file)
26
+ yield "Generating ctags for #{spec.full_name}" if block_given?
27
+ paths = spec.require_paths.
28
+ map { |p|
29
+ Pathname.new(File.join(spec.full_gem_path, p)).
30
+ relative_path_from(Pathname.pwd).to_s
31
+ }.
32
+ select { |p| File.directory?(p) }
33
+ system(
34
+ 'ctags', '-R', '--languages=ruby', '-f', tag_file, '--tag-relative=yes',
35
+ *paths
36
+ )
37
+ end
30
38
 
31
- target = 'lib/bundler/cli.rb'
32
- if File.writable?(target) && !File.read(target).include?('load_plugins')
33
- yield "Injecting gem-ctags into #{spec.full_name}" if block_given?
34
- File.open(target, 'a') do |f|
35
- f.write "\nGem.load_plugins rescue nil\n"
36
- end
39
+ target = File.expand_path('lib/bundler/cli.rb', spec.full_gem_path)
40
+ if File.writable?(target) && !File.read(target).include?('load_plugins')
41
+ yield "Injecting gem-ctags into #{spec.full_name}" if block_given?
42
+ File.open(target, 'a') do |f|
43
+ f.write "\nGem.load_plugins rescue nil\n"
37
44
  end
38
-
39
45
  end
40
46
  rescue => e
41
47
  raise unless block_given?
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-ctags
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pope
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-24 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description:
@@ -31,7 +31,7 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - .gitignore
34
+ - ".gitignore"
35
35
  - Gemfile
36
36
  - MIT-LICENSE
37
37
  - README.markdown
@@ -40,7 +40,8 @@ files:
40
40
  - lib/rubygems/commands/ctags_command.rb
41
41
  - lib/rubygems_plugin.rb
42
42
  homepage: https://github.com/tpope/gem-ctags
43
- licenses: []
43
+ licenses:
44
+ - MIT
44
45
  metadata: {}
45
46
  post_install_message:
46
47
  rdoc_options: []
@@ -48,17 +49,17 @@ require_paths:
48
49
  - lib
49
50
  required_ruby_version: !ruby/object:Gem::Requirement
50
51
  requirements:
51
- - - '>='
52
+ - - ">="
52
53
  - !ruby/object:Gem::Version
53
54
  version: '0'
54
55
  required_rubygems_version: !ruby/object:Gem::Requirement
55
56
  requirements:
56
- - - '>='
57
+ - - ">="
57
58
  - !ruby/object:Gem::Version
58
59
  version: '0'
59
60
  requirements: []
60
61
  rubyforge_project:
61
- rubygems_version: 2.0.0
62
+ rubygems_version: 2.4.5
62
63
  signing_key:
63
64
  specification_version: 4
64
65
  summary: Automatic ctags generation on gem install