guard-ctags-bundler 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/README.md +3 -1
- data/lib/guard/ctags-bundler/ctags_generator.rb +2 -1
- data/lib/guard/ctags-bundler/version.rb +1 -1
- data/test/ctags-bundler/ctags_generator_test.rb +13 -3
- data/test/test_project/app/class1.js +1 -0
- metadata +20 -37
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3aac453460b869a18505cf51cf29ca9db034a718
|
4
|
+
data.tar.gz: c536b6772843755bc1fdb2ed1752f5f41e1630b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ae4e3f20a24de423c9091899c793fee84a3a24f7fe65453e8247212015ef317c155dadd71da1876f93e96122e93fa913a6345056ec5ac5ac45e26105b2145a70
|
7
|
+
data.tar.gz: 5fc85444e4e33a5704208699390d1562807b1d973dcb33e8102de79662acfb35b66319cea746317e779f8c37eab7e88ef20db34c115d7117852bc97508147d66
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -38,6 +38,8 @@ Please, read [Guard usage doc](https://github.com/guard/guard#readme)
|
|
38
38
|
:src_path => ".", # source path to be scanned for tags (default .)
|
39
39
|
:emacs => false, # run ctags in emacs mode and merge tags and gems.tags into TAGS file
|
40
40
|
:stdlib => true, # run ctags for core and stdlib, generating stdlib.tags (default false)
|
41
|
+
:binary => 'ctags-exuberant' # name of the ctags binary (default ctags)
|
42
|
+
:arguments => '-R --languages=ruby --fields=+l' # change the arguments passed to ctags (default '-R --languages=ruby')
|
41
43
|
```
|
42
44
|
|
43
45
|
For a typical Rails application, `Guardfile` can look like this (default):
|
@@ -49,7 +51,7 @@ For a typical Rails application, `Guardfile` can look like this (default):
|
|
49
51
|
|
50
52
|
## CTags
|
51
53
|
|
52
|
-
[Ctags](http://ctags.sourceforge.net) generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).
|
54
|
+
[Ctags](http://ctags.sourceforge.net) generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).
|
53
55
|
|
54
56
|
In ubuntu you can install ctags by running
|
55
57
|
|
@@ -46,8 +46,9 @@ module Guard
|
|
46
46
|
path = path.join(' ').strip
|
47
47
|
end
|
48
48
|
system("mkdir -p ./#{@opts[:custom_path]}") if @opts[:custom_path]
|
49
|
-
cmd = "
|
49
|
+
cmd = "#{@opts[:binary] || 'ctags'} -f #{tag_file} #{@opts[:arguments] || '-R --languages=ruby'}"
|
50
50
|
cmd << " -e" if @opts[:emacs]
|
51
|
+
cmd << " #{path}"
|
51
52
|
system(cmd)
|
52
53
|
if @opts[:emacs]
|
53
54
|
if @opts[:stdlib]
|
@@ -24,14 +24,14 @@ class CtagsGeneratorTest < MiniTest::Unit::TestCase
|
|
24
24
|
assert_match("method_of_class_1", result)
|
25
25
|
assert_match("method_of_class_2", result)
|
26
26
|
refute_match("method_of_class_3", result)
|
27
|
-
refute_match(/\
|
27
|
+
refute_match(/\bGuardfile\b/, result)
|
28
28
|
end
|
29
29
|
|
30
30
|
def test_generate_bundler_tags
|
31
31
|
generator.generate_bundler_tags
|
32
32
|
assert File.exists?(test_gems_tags_file)
|
33
33
|
result = File.read(test_gems_tags_file)
|
34
|
-
assert_match(/\
|
34
|
+
assert_match(/\bGuardfile\b/, result)
|
35
35
|
refute_match("method_of_class_1", result)
|
36
36
|
refute_match("method_of_class_2", result)
|
37
37
|
refute_match("method_of_class_3", result)
|
@@ -43,7 +43,7 @@ class CtagsGeneratorTest < MiniTest::Unit::TestCase
|
|
43
43
|
result = File.read(test_stdlib_tags_file)
|
44
44
|
assert_match("DateTime", result)
|
45
45
|
assert_match("YAML", result)
|
46
|
-
refute_match(/\
|
46
|
+
refute_match(/\bGuardfile\b/, result)
|
47
47
|
refute_match("method_of_class_1", result)
|
48
48
|
refute_match("method_of_class_2", result)
|
49
49
|
refute_match("method_of_class_3", result)
|
@@ -58,6 +58,16 @@ class CtagsGeneratorTest < MiniTest::Unit::TestCase
|
|
58
58
|
refute_match("Rake", result)
|
59
59
|
end
|
60
60
|
|
61
|
+
def test_generate_tags_with_arguments
|
62
|
+
generator(:src_path => ["app", "lib"], :arguments => '-R --languages=javascript').generate_project_tags
|
63
|
+
result = File.read(test_tags_file)
|
64
|
+
assert_match("jsFunction", result)
|
65
|
+
refute_match("method_of_class_1", result)
|
66
|
+
refute_match("method_of_class_2", result)
|
67
|
+
refute_match("method_of_class_3", result)
|
68
|
+
refute_match(/\bGuardfile\b/, result)
|
69
|
+
end
|
70
|
+
|
61
71
|
private
|
62
72
|
|
63
73
|
def generator(opts = {})
|
@@ -0,0 +1 @@
|
|
1
|
+
function jsFunction() {}
|
metadata
CHANGED
@@ -1,98 +1,87 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-ctags-bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ivan Tkalin
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: guard
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '1.1'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '1.1'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: minitest
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: purdytest
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
|
-
description:
|
95
|
-
|
83
|
+
description: 'Guard::CtagsBundler uses ctags utility and generates 2 files: tags --
|
84
|
+
with tags generated from project''s source tree and gems.tags -- with tags generated
|
96
85
|
from rubygems from project''s bundle.'
|
97
86
|
email:
|
98
87
|
- itkalin@gmail.com
|
@@ -114,38 +103,32 @@ files:
|
|
114
103
|
- test/ctags-bundler/ctags_generator_test.rb
|
115
104
|
- test/test_helper.rb
|
116
105
|
- test/test_project/Gemfile
|
106
|
+
- test/test_project/app/class1.js
|
117
107
|
- test/test_project/app/class1.rb
|
118
108
|
- test/test_project/lib/class2.rb
|
119
109
|
- test/test_project/vendor/class3.rb
|
120
110
|
homepage: https://github.com/ivalkeen/guard-ctags-bundler
|
121
111
|
licenses: []
|
112
|
+
metadata: {}
|
122
113
|
post_install_message:
|
123
114
|
rdoc_options: []
|
124
115
|
require_paths:
|
125
116
|
- lib
|
126
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
118
|
requirements:
|
129
|
-
- -
|
119
|
+
- - '>='
|
130
120
|
- !ruby/object:Gem::Version
|
131
121
|
version: '0'
|
132
|
-
segments:
|
133
|
-
- 0
|
134
|
-
hash: -1445914613899656626
|
135
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
123
|
requirements:
|
138
|
-
- -
|
124
|
+
- - '>='
|
139
125
|
- !ruby/object:Gem::Version
|
140
126
|
version: '0'
|
141
|
-
segments:
|
142
|
-
- 0
|
143
|
-
hash: -1445914613899656626
|
144
127
|
requirements: []
|
145
128
|
rubyforge_project: guard-ctags-bundler
|
146
|
-
rubygems_version:
|
129
|
+
rubygems_version: 2.0.3
|
147
130
|
signing_key:
|
148
|
-
specification_version:
|
131
|
+
specification_version: 4
|
149
132
|
summary: Guard gem for generating ctags for project files and gems from project's
|
150
133
|
bundle.
|
151
134
|
test_files: []
|