ruby_on_etags 0.1.0 → 0.1.1

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_on_etags (0.1.0)
4
+ ruby_on_etags (0.1.1)
5
5
  bundler (~> 1.0.0)
6
6
  rake (~> 0.8.7)
7
7
  thor (~> 0.14.6)
@@ -52,12 +52,12 @@ module RubyOnEtags
52
52
  end
53
53
 
54
54
  def build_tags_for_gems
55
- loaded_gems.map do |gem_spec|
55
+ gems_in_use.map do |gem_spec|
56
56
  tags_filename = File.join(cache_dir,
57
57
  'gems',
58
58
  "#{gem_spec.name}-#{gem_spec.version.version}",
59
59
  'TAGS')
60
- etags(gem_spec.load_paths.join(' '), tags_filename)
60
+ etags(gem_spec.load_paths, tags_filename)
61
61
  tags_filename
62
62
  end
63
63
  end
@@ -65,14 +65,14 @@ module RubyOnEtags
65
65
  def build_tags_for_standard_library
66
66
  File.join(cache_dir, 'rubies', RUBY_VERSION, 'TAGS').tap do |tags_filename|
67
67
  dirs = $:.delete_if { |path| path =~ %r|/gems/| }
68
- etags(dirs.join(' '), tags_filename)
68
+ etags(dirs, tags_filename)
69
69
  end
70
70
  end
71
71
 
72
72
  def build_tags_current_dir
73
73
  tags_file = Tempfile.new('ruby_on_etags-project-TAGS')
74
74
  tags_file.close
75
- etags(".", tags_file.path)
75
+ etags(["."], tags_file.path)
76
76
  tags_file.path
77
77
  end
78
78
 
@@ -88,7 +88,7 @@ module RubyOnEtags
88
88
  FileUtils.rm_f("TAGS")
89
89
  end
90
90
 
91
- def loaded_gems
91
+ def gems_in_use
92
92
  if File.exists?("Gemfile")
93
93
  # Bundler.load.specs
94
94
  Bundler::Definition.build(Bundler.default_gemfile,
@@ -113,7 +113,8 @@ module RubyOnEtags
113
113
  def etags(dirs, output)
114
114
  if !File.exists?(output) || File.zero?(output)
115
115
  FileUtils.mkdir_p(File.dirname(output))
116
- run "etags -R -o #{output} #{dirs}"
116
+ dirs &&= dirs.map{|d| "'#{d}'"}.join(' ')
117
+ run "ctags -e -R -o '#{output}' #{dirs}"
117
118
  end
118
119
  end
119
120
 
@@ -1,3 +1,3 @@
1
1
  module RubyOnEtags
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -10,8 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["aleksei.gusev@gmail.com"]
11
11
  s.homepage = "https://github.com/hron/ruby_on_etags"
12
12
  s.summary = "Automatic generation of TAGS for all ruby modules a project use."
13
- s.description = "Ruby on ETags is a set of rake tasks to help a developer keep TAGS file up to
14
- date."
13
+ s.description = "Ruby on ETags is a tool to help a developer keep TAGS file up to date."
15
14
 
16
15
  s.rubyforge_project = "ruby_on_etags"
17
16
 
@@ -12,7 +12,7 @@ describe RubyOnEtags do
12
12
  G
13
13
 
14
14
  in_current_dir do
15
- should have(3).loaded_gems
15
+ should have(3).gems_in_use
16
16
  end
17
17
  end
18
18
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aleksei Gusev
@@ -136,9 +136,7 @@ dependencies:
136
136
  version: 0.14.6
137
137
  type: :runtime
138
138
  version_requirements: *id008
139
- description: |-
140
- Ruby on ETags is a set of rake tasks to help a developer keep TAGS file up to
141
- date.
139
+ description: Ruby on ETags is a tool to help a developer keep TAGS file up to date.
142
140
  email:
143
141
  - aleksei.gusev@gmail.com
144
142
  executables: