gemtags 0.9.2
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/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +11 -0
- data/Rakefile +1 -0
- data/bin/gemtags +6 -0
- data/gemtags.gemspec +24 -0
- data/lib/gemtags.rb +27 -0
- data/lib/gemtags/version.rb +3 -0
- metadata +72 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# CTags for your project's gems
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Just run
|
6
|
+
|
7
|
+
gem install gemtags
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
In your project directory, run 'gemtags'. This will create a file called *.gemtags* with all CTags for the gems referenced in your Gemfile. (This file is platform specific and should be added to .gitignore.)
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/gemtags
ADDED
data/gemtags.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "gemtags/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "gemtags"
|
7
|
+
s.version = Gemtags::VERSION
|
8
|
+
s.authors = ["Stefan Buhrmester"]
|
9
|
+
s.email = ["buhrmi@gmail.com"]
|
10
|
+
s.homepage = "http://github.com/buhrmi/gemtags"
|
11
|
+
s.summary = "Run gemtags from the command line to create a ctags file for all bundled gems."
|
12
|
+
s.description = "Run gemtags from the command line to create a ctags file for all bundled gems."
|
13
|
+
|
14
|
+
s.rubyforge_project = "gemtags"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
s.add_runtime_dependency "bundler"
|
24
|
+
end
|
data/lib/gemtags.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require "gemtags/version"
|
2
|
+
|
3
|
+
module Gemtags
|
4
|
+
class Command
|
5
|
+
def run
|
6
|
+
bundler_paths = []
|
7
|
+
if File.exist?('Gemfile.lock')
|
8
|
+
lockfile_contents = Bundler.read_file('Gemfile.lock')
|
9
|
+
lockfile = Bundler::LockfileParser.new(lockfile_contents)
|
10
|
+
bundler_paths = lockfile.specs.map do |spec|
|
11
|
+
spec.__materialize__
|
12
|
+
spec.full_gem_path
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
tags_file = ".gemtags"
|
17
|
+
opts = "--extra=+f -R -f #{tags_file}"
|
18
|
+
exclude_dirs = "--exclude=#{File.expand_path('.')}/* --exclude=.git --exclude=log --exclude=.svn"
|
19
|
+
ctag_paths = "#{bundler_paths.map {|x| x + '/*'}.join(' ')}"
|
20
|
+
command = "ctags #{opts} #{exclude_dirs} #{ctag_paths} 2> /dev/null"
|
21
|
+
|
22
|
+
puts "Processing ctags..."
|
23
|
+
system command
|
24
|
+
puts "Wrote ctags to '#{tags_file}'"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gemtags
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.9.2
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Stefan Buhrmester
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-11-07 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bundler
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
description: Run gemtags from the command line to create a ctags file for all bundled gems.
|
27
|
+
email:
|
28
|
+
- buhrmi@gmail.com
|
29
|
+
executables:
|
30
|
+
- gemtags
|
31
|
+
extensions: []
|
32
|
+
|
33
|
+
extra_rdoc_files: []
|
34
|
+
|
35
|
+
files:
|
36
|
+
- .gitignore
|
37
|
+
- Gemfile
|
38
|
+
- README.md
|
39
|
+
- Rakefile
|
40
|
+
- bin/gemtags
|
41
|
+
- gemtags.gemspec
|
42
|
+
- lib/gemtags.rb
|
43
|
+
- lib/gemtags/version.rb
|
44
|
+
homepage: http://github.com/buhrmi/gemtags
|
45
|
+
licenses: []
|
46
|
+
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
requirements: []
|
65
|
+
|
66
|
+
rubyforge_project: gemtags
|
67
|
+
rubygems_version: 1.8.11
|
68
|
+
signing_key:
|
69
|
+
specification_version: 3
|
70
|
+
summary: Run gemtags from the command line to create a ctags file for all bundled gems.
|
71
|
+
test_files: []
|
72
|
+
|