CoffeeTags 0.0.1.3 → 0.0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/CoffeeTags/formatter.rb +3 -4
- data/lib/CoffeeTags/version.rb +1 -1
- data/spec/coffeetags_spec.rb +0 -7
- data/spec/fixtures/test.coffee +2 -0
- data/spec/formatter_spec.rb +2 -4
- metadata +3 -3
data/lib/CoffeeTags/formatter.rb
CHANGED
@@ -16,8 +16,7 @@ module Coffeetags
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def regex_line line
|
19
|
-
"
|
20
|
-
"/^#{Regexp.escape line}$/;\""
|
19
|
+
"/#{line}/;\""
|
21
20
|
end
|
22
21
|
|
23
22
|
def line_to_string entry
|
@@ -27,7 +26,7 @@ module Coffeetags
|
|
27
26
|
[
|
28
27
|
entry[:name],
|
29
28
|
@file,
|
30
|
-
regex_line(entry[:
|
29
|
+
regex_line(entry[:name]),
|
31
30
|
entry[:kind],
|
32
31
|
"lineno:#{entry[:line]}",
|
33
32
|
namespace,
|
@@ -54,7 +53,7 @@ module Coffeetags
|
|
54
53
|
|
55
54
|
header = [
|
56
55
|
"!_TAG_FILE_FORMAT 2 /extended format/",
|
57
|
-
"!_TAG_FILE_SORTED
|
56
|
+
"!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/",
|
58
57
|
"!_TAG_PROGRAM_AUTHOR #{Coffeetags::AUTHOR}",
|
59
58
|
"!_TAG_PROGRAM_NAME #{Coffeetags::NAME} //",
|
60
59
|
"!_TAG_PROGRAM_URL #{Coffeetags::URL} /GitHub repository/",
|
data/lib/CoffeeTags/version.rb
CHANGED
data/spec/coffeetags_spec.rb
CHANGED
@@ -18,13 +18,6 @@ describe Utils do
|
|
18
18
|
Utils.option_parser( [ '-f','tags' ,'lol.coffee']).should == [ 'tags', false, ['lol.coffee']]
|
19
19
|
end
|
20
20
|
|
21
|
-
it "parses --vim-conf option" do
|
22
|
-
pending 'learn how to catch STDOUT in specs :-)'
|
23
|
-
Utils.option_parser( [ '--vim-conf','lol.coffee']).should match /g:tagbar_type_coffee /
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
21
|
end
|
29
22
|
|
30
23
|
context 'Parser runner' do
|
data/spec/fixtures/test.coffee
CHANGED
data/spec/formatter_spec.rb
CHANGED
@@ -14,16 +14,14 @@ describe 'CoffeeTags::Formatter' do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "generates a line for method definition" do
|
17
|
-
exp = [ 'constructor', 'test.coffee',
|
18
|
-
"/^#{Regexp.escape ' constructor: (api_key, host) ->'}$/;\"",
|
17
|
+
exp = [ 'constructor', 'test.coffee', "/constructor/;\"",
|
19
18
|
'f', 'lineno:8', 'object:Campfire', 'type:function'
|
20
19
|
].join("\t")
|
21
20
|
@instance.parse_tree.first.should == exp
|
22
21
|
end
|
23
22
|
|
24
23
|
it "generates line for second class" do
|
25
|
-
exp = [ 'bump', 'test.coffee',
|
26
|
-
"/^#{Regexp.escape ' bump : ->'}$/;\"",
|
24
|
+
exp = [ 'bump', 'test.coffee', "/bump/;\"",
|
27
25
|
'f', 'lineno:46', 'object:Test', 'type:function'
|
28
26
|
].join "\t"
|
29
27
|
@instance.parse_tree.last.should == exp
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CoffeeTags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 67
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 1
|
10
|
-
-
|
11
|
-
version: 0.0.1.
|
10
|
+
- 4
|
11
|
+
version: 0.0.1.4
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- "\xC5\x81ukasz Korecki"
|