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.
@@ -16,8 +16,7 @@ module Coffeetags
16
16
  end
17
17
 
18
18
  def regex_line line
19
- "/^#{line.gsub('/', '\/')}$/;\""
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[:source]),
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 1 /0=unsorted, 1=sorted, 2=foldcase/",
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/",
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Coffeetags
3
- VERSION = "0.0.1.3"
3
+ VERSION = "0.0.1.4"
4
4
  end
@@ -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
@@ -35,3 +35,5 @@ x = dir + '/foo'
35
35
  for f in dir
36
36
  do (f) ->
37
37
  console.log f
38
+
39
+ zorb = get['x=\\/f'].getLast('/woot$')
@@ -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: 77
4
+ hash: 67
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 1
10
- - 3
11
- version: 0.0.1.3
10
+ - 4
11
+ version: 0.0.1.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - "\xC5\x81ukasz Korecki"