CoffeeTags 0.5.0 → 0.5.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.
- checksums.yaml +5 -13
- data/CoffeeTags.gemspec +11 -11
- data/Gemfile +3 -2
- data/README.md +1 -1
- data/lib/CoffeeTags.rb +1 -1
- data/lib/CoffeeTags/parser.rb +2 -2
- data/lib/CoffeeTags/version.rb +1 -1
- data/spec/fixtures/append-expected.ctags +1 -1
- data/spec/fixtures/append.ctags +1 -1
- data/spec/fixtures/blockcomment.ctags +1 -1
- data/spec/fixtures/campfire.js.tags +1 -1
- data/spec/fixtures/out.test-relative-append.ctags +3 -2
- data/spec/fixtures/out.test-relative.ctags +3 -2
- data/spec/fixtures/out.test-two.ctags +3 -2
- data/spec/fixtures/out.test.ctags +3 -2
- data/spec/fixtures/test.coffee +6 -3
- data/spec/fixtures/test_tree.yaml +12 -0
- data/spec/parser_spec.rb +13 -2
- metadata +12 -34
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
NGUxOWJkMmRhYzMwMGMyZmUxY2M5YWZmMjBjNjc5YmE5M2M3MzAxOA==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d48aca8f7eee32a205a458f87b3a7bc073e920e9
|
|
4
|
+
data.tar.gz: 264e600ae7858dc4d8dc44011302cd01ceb6c4f7
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
NDBkNGFhNmVlODhjYjg2YzVjZWM2N2JmMGIwMmE0MGFhMzJmNDVkZjlmZTZl
|
|
11
|
-
Y2U2YWFmMzZjMjMyNWM5MDk2ZDdkNTQyYjM3MDkyNWNhZTljZjc=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
MDFiODhiNTEyNDlmNjRmMjcxYWY4MzcwZGNhOGZlZWNmMDc3Zjg2YmNkMTU0
|
|
14
|
-
Mjg0OWYwODJmOWQ0MDA5ZmZiZTA2OGZmZDgwYTI0YmYyMzc2MmRmY2UyZjA1
|
|
15
|
-
YzBiMTRhZmQ0OTk2MTFiYTg5MjE5ZjgzZGUwMjcwYjAwY2Y1ZGU=
|
|
6
|
+
metadata.gz: 4cb8138b038f5eb505f30eaea5c3ab3a2f2b3af6c025df3ab63685f0333d976f95cb90818e9e067b23eb43923c6cbacdffeffa7188753412d0cccc92581e8490
|
|
7
|
+
data.tar.gz: d08c6dc51d1b205f0840612e72053c7bde9da762c90df53350efc398cf2b20a156c2496ebc24378ff27fb6a4afe53cd753ec176658fa431cdfef1d75dfc763cf
|
data/CoffeeTags.gemspec
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
require
|
|
2
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
|
3
|
+
require 'CoffeeTags/version'
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
|
-
s.name =
|
|
6
|
+
s.name = 'CoffeeTags'
|
|
7
7
|
s.version = Coffeetags::VERSION
|
|
8
|
-
s.authors = [
|
|
9
|
-
s.email = [
|
|
10
|
-
s.homepage =
|
|
11
|
-
s.summary =
|
|
12
|
-
s.description =
|
|
8
|
+
s.authors = ['Łukasz Korecki', 'Matthew Smith']
|
|
9
|
+
s.email = ['lukasz@korecki.me', 'mtscout6@gmail.com']
|
|
10
|
+
s.homepage = 'http://github.com/lukaszkorecki/CoffeeTags'
|
|
11
|
+
s.summary = 'tags generator for CoffeeScript'
|
|
12
|
+
s.description = 'CoffeeTags generates ctags compatibile tags for CoffeeScript.'
|
|
13
13
|
|
|
14
|
-
s.rubyforge_project =
|
|
14
|
+
s.rubyforge_project = 'CoffeeTags'
|
|
15
15
|
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
|
17
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 = [
|
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
19
|
+
s.require_paths = ['lib']
|
|
20
20
|
s.licenses = ['MIT']
|
|
21
21
|
end
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -79,7 +79,7 @@ let g:CoffeeAutoTagTagRelative=<0 or 1> " Sets file names to the relative path
|
|
|
79
79
|
|
|
80
80
|
# Sublime Text
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
See [this issue on SublimeText/Ctags](https://github.com/SublimeText/CTags/issues/33)
|
|
83
83
|
|
|
84
84
|
# Config types
|
|
85
85
|
|
data/lib/CoffeeTags.rb
CHANGED
data/lib/CoffeeTags/parser.rb
CHANGED
|
@@ -17,11 +17,11 @@ module Coffeetags
|
|
|
17
17
|
|
|
18
18
|
# regexes
|
|
19
19
|
@block = /^\s*(if|unless|switch|loop|do)/
|
|
20
|
-
@class_regex = /\s*class\s
|
|
20
|
+
@class_regex = /\s*class\s+(?:@)?([\w\.]*)/
|
|
21
21
|
@proto_meths = /^\s*([A-Za-z]*)::([@a-zA-Z0-9_]*)/
|
|
22
22
|
@var_regex = /([@a-zA-Z0-9_]*)\s*[:=]\s*$/
|
|
23
23
|
@token_regex = /([@a-zA-Z0-9_]*)\s*[:=]/
|
|
24
|
-
@iterator_regex = /^\s*for\s
|
|
24
|
+
@iterator_regex = /^\s*for\s+([a-zA-Z0-9_]*)\s*/
|
|
25
25
|
@comment_regex = /^\s*#/
|
|
26
26
|
@start_block_comment_regex = /^\s*###/
|
|
27
27
|
@end_block_comment_regex = /^.*###/
|
data/lib/CoffeeTags/version.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
data/spec/fixtures/append.ctags
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -19,13 +19,14 @@ bump ../spec/fixtures/test.coffee /^bump = (wat) ->$/;" f line:1 language:coffee
|
|
|
19
19
|
bump_up ../spec/fixtures/test.coffee /^ bump_up : ->$/;" f line:12 language:coffee object:Wat.ho.@lolWat
|
|
20
20
|
constructor ../spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f line:8 language:coffee object:Campfire
|
|
21
21
|
constructor2 ../spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f lineno:8 object:Campfire
|
|
22
|
-
do ../spec/fixtures/test.coffee /^ do (element)
|
|
22
|
+
do ../spec/fixtures/test.coffee /^ do (element) ->$/;" b line:29 language:coffee
|
|
23
23
|
do ../spec/fixtures/test.coffee /^ do (f) ->$/;" b line:36 language:coffee
|
|
24
24
|
handlers ../spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f line:14 language:coffee object:Campfire
|
|
25
25
|
ho ../spec/fixtures/test.coffee /^ ho : (x) ->$/;" f line:5 language:coffee object:Wat
|
|
26
26
|
if ../spec/fixtures/test.coffee /^ if wat$/;" b line:24 language:coffee
|
|
27
27
|
if ../spec/fixtures/test.coffee /^ if z.isSomethingRidic$/;" b line:21 language:coffee
|
|
28
28
|
loop ../spec/fixtures/test.coffee /^Array::loop = (x) ->$/;" p line:46 language:coffee object:Array
|
|
29
|
+
obj ../spec/fixtures/test.coffee /^obj =$/;" v line:49 language:coffee
|
|
29
30
|
onFailure ../spec/fixtures/campfire.coffee /^ onFailure: (response) ->$/;" f line:24 language:coffee object:Campfire.handlers.resp
|
|
30
31
|
onSuccess ../spec/fixtures/campfire.coffee /^ onSuccess : (response) ->$/;" f line:16 language:coffee object:Campfire.handlers.resp
|
|
31
32
|
recent ../spec/fixtures/campfire.coffee /^ recent: (id, since, callbacks) ->$/;" f line:40 language:coffee object:Campfire
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -17,13 +17,14 @@ bump ../spec/fixtures/test.coffee /^ bump : ->$/;" f line:10 language:coffe
|
|
|
17
17
|
bump ../spec/fixtures/test.coffee /^bump = (wat) ->$/;" f line:1 language:coffee object:window
|
|
18
18
|
bump_up ../spec/fixtures/test.coffee /^ bump_up : ->$/;" f line:12 language:coffee object:Wat.ho.@lolWat
|
|
19
19
|
constructor ../spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f line:8 language:coffee object:Campfire
|
|
20
|
-
do ../spec/fixtures/test.coffee /^ do (element)
|
|
20
|
+
do ../spec/fixtures/test.coffee /^ do (element) ->$/;" b line:29 language:coffee
|
|
21
21
|
do ../spec/fixtures/test.coffee /^ do (f) ->$/;" b line:36 language:coffee
|
|
22
22
|
handlers ../spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f line:14 language:coffee object:Campfire
|
|
23
23
|
ho ../spec/fixtures/test.coffee /^ ho : (x) ->$/;" f line:5 language:coffee object:Wat
|
|
24
24
|
if ../spec/fixtures/test.coffee /^ if wat$/;" b line:24 language:coffee
|
|
25
25
|
if ../spec/fixtures/test.coffee /^ if z.isSomethingRidic$/;" b line:21 language:coffee
|
|
26
26
|
loop ../spec/fixtures/test.coffee /^Array::loop = (x) ->$/;" p line:46 language:coffee object:Array
|
|
27
|
+
obj ../spec/fixtures/test.coffee /^obj =$/;" v line:49 language:coffee
|
|
27
28
|
onFailure ../spec/fixtures/campfire.coffee /^ onFailure: (response) ->$/;" f line:24 language:coffee object:Campfire.handlers.resp
|
|
28
29
|
onSuccess ../spec/fixtures/campfire.coffee /^ onSuccess : (response) ->$/;" f line:16 language:coffee object:Campfire.handlers.resp
|
|
29
30
|
recent ../spec/fixtures/campfire.coffee /^ recent: (id, since, callbacks) ->$/;" f line:40 language:coffee object:Campfire
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -17,13 +17,14 @@ bump spec/fixtures/test.coffee /^ bump : ->$/;" f line:10 language:coffee o
|
|
|
17
17
|
bump spec/fixtures/test.coffee /^bump = (wat) ->$/;" f line:1 language:coffee object:window
|
|
18
18
|
bump_up spec/fixtures/test.coffee /^ bump_up : ->$/;" f line:12 language:coffee object:Wat.ho.@lolWat
|
|
19
19
|
constructor spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f line:8 language:coffee object:Campfire
|
|
20
|
-
do spec/fixtures/test.coffee /^ do (element)
|
|
20
|
+
do spec/fixtures/test.coffee /^ do (element) ->$/;" b line:29 language:coffee
|
|
21
21
|
do spec/fixtures/test.coffee /^ do (f) ->$/;" b line:36 language:coffee
|
|
22
22
|
handlers spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f line:14 language:coffee object:Campfire
|
|
23
23
|
ho spec/fixtures/test.coffee /^ ho : (x) ->$/;" f line:5 language:coffee object:Wat
|
|
24
24
|
if spec/fixtures/test.coffee /^ if wat$/;" b line:24 language:coffee
|
|
25
25
|
if spec/fixtures/test.coffee /^ if z.isSomethingRidic$/;" b line:21 language:coffee
|
|
26
26
|
loop spec/fixtures/test.coffee /^Array::loop = (x) ->$/;" p line:46 language:coffee object:Array
|
|
27
|
+
obj spec/fixtures/test.coffee /^obj =$/;" v line:49 language:coffee
|
|
27
28
|
onFailure spec/fixtures/campfire.coffee /^ onFailure: (response) ->$/;" f line:24 language:coffee object:Campfire.handlers.resp
|
|
28
29
|
onSuccess spec/fixtures/campfire.coffee /^ onSuccess : (response) ->$/;" f line:16 language:coffee object:Campfire.handlers.resp
|
|
29
30
|
recent spec/fixtures/campfire.coffee /^ recent: (id, since, callbacks) ->$/;" f line:40 language:coffee object:Campfire
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
|
3
|
-
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@
|
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@korecki.me/
|
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
|
6
6
|
!_TAG_PROGRAM_VERSION 0.5.0 //
|
|
@@ -13,9 +13,10 @@ bound_func spec/fixtures/test.coffee /^bound_func = (ok) => wat(ok)$/;" f line:4
|
|
|
13
13
|
bump spec/fixtures/test.coffee /^ bump : ->$/;" f line:10 language:coffee object:Wat.ho.@lolWat
|
|
14
14
|
bump spec/fixtures/test.coffee /^bump = (wat) ->$/;" f line:1 language:coffee object:window
|
|
15
15
|
bump_up spec/fixtures/test.coffee /^ bump_up : ->$/;" f line:12 language:coffee object:Wat.ho.@lolWat
|
|
16
|
-
do spec/fixtures/test.coffee /^ do (element)
|
|
16
|
+
do spec/fixtures/test.coffee /^ do (element) ->$/;" b line:29 language:coffee
|
|
17
17
|
do spec/fixtures/test.coffee /^ do (f) ->$/;" b line:36 language:coffee
|
|
18
18
|
ho spec/fixtures/test.coffee /^ ho : (x) ->$/;" f line:5 language:coffee object:Wat
|
|
19
19
|
if spec/fixtures/test.coffee /^ if wat$/;" b line:24 language:coffee
|
|
20
20
|
if spec/fixtures/test.coffee /^ if z.isSomethingRidic$/;" b line:21 language:coffee
|
|
21
21
|
loop spec/fixtures/test.coffee /^Array::loop = (x) ->$/;" p line:46 language:coffee object:Array
|
|
22
|
+
obj spec/fixtures/test.coffee /^obj =$/;" v line:49 language:coffee
|
data/spec/fixtures/test.coffee
CHANGED
|
@@ -26,8 +26,8 @@ _loop = (x) ->
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
for element in lol
|
|
29
|
-
do (element)
|
|
30
|
-
|
|
29
|
+
do (element) ->
|
|
30
|
+
forVariable = 2 * element
|
|
31
31
|
# for testing with issue #1 examples
|
|
32
32
|
dir = fs.readdirSync __dirname
|
|
33
33
|
x = dir + '/foo'
|
|
@@ -44,4 +44,7 @@ bound_func = (ok) => wat(ok)
|
|
|
44
44
|
beam_magnum : -> deployed(true)
|
|
45
45
|
|
|
46
46
|
Array::loop = (x) ->
|
|
47
|
-
x
|
|
47
|
+
x
|
|
48
|
+
|
|
49
|
+
obj =
|
|
50
|
+
className: 'notAClass'
|
|
@@ -69,4 +69,16 @@
|
|
|
69
69
|
:kind: f
|
|
70
70
|
:name: 'beam_magnum'
|
|
71
71
|
:parent: window
|
|
72
|
+
- :source: ' forVariable = 2 * element'
|
|
73
|
+
:parent: '_loop.element'
|
|
74
|
+
:line: 30
|
|
75
|
+
:kind: o
|
|
76
|
+
:name: forVariable
|
|
77
|
+
:level: 6
|
|
78
|
+
- :source: " className: 'notAClass'"
|
|
79
|
+
:parent: obj
|
|
80
|
+
:kind: o
|
|
81
|
+
:name: 'className'
|
|
82
|
+
:line: 50
|
|
83
|
+
:level: 2
|
|
72
84
|
|
data/spec/parser_spec.rb
CHANGED
|
@@ -102,6 +102,12 @@ describe 'CoffeeTags::Parser' do
|
|
|
102
102
|
cf_defined_values_should_equal cf, c
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
+
it "should distinguish from a variable that contains 'class'" do
|
|
106
|
+
@test_parser.execute!
|
|
107
|
+
c = @test_parser.tree.find { |i| i[:name] == 'className'}
|
|
108
|
+
c.should == @test_tree.find { |i| i[:name] == 'className'}
|
|
109
|
+
end
|
|
110
|
+
|
|
105
111
|
it "parses the instance variable" do
|
|
106
112
|
c = @coffee_parser.tree.find { |i| i[:name] == '@url'}
|
|
107
113
|
c.should == @cf_tree.find {|i| i[:name] == '@url'}
|
|
@@ -143,7 +149,7 @@ describe 'CoffeeTags::Parser' do
|
|
|
143
149
|
end
|
|
144
150
|
|
|
145
151
|
it 'correctly recognizes an object in for block' do
|
|
146
|
-
pro = @parser_test.tree.find { |i| i[:name] == '
|
|
152
|
+
pro = @parser_test.tree.find { |i| i[:name] == 'forVariable'}
|
|
147
153
|
pro[:parent].should == '_loop.element'
|
|
148
154
|
|
|
149
155
|
end
|
|
@@ -179,9 +185,14 @@ describe 'CoffeeTags::Parser' do
|
|
|
179
185
|
end
|
|
180
186
|
|
|
181
187
|
it "detects the scope" do
|
|
182
|
-
|
|
183
188
|
subject[:parent].should == '_loop'
|
|
184
189
|
end
|
|
190
|
+
|
|
191
|
+
it "should distinguish from a variable that contains 'for'" do
|
|
192
|
+
e = @test_tree.find { |i| i[:name] == 'forVariable'}
|
|
193
|
+
g = @parser_test.tree.find { |i| i[:line] == 30}
|
|
194
|
+
g.should == e
|
|
195
|
+
end
|
|
185
196
|
end
|
|
186
197
|
context 'Block comments' do
|
|
187
198
|
let(:bc_file) { 'spec/fixtures/blockcomment.coffee'}
|
metadata
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: CoffeeTags
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Łukasz Korecki
|
|
7
|
+
- "Łukasz Korecki"
|
|
8
8
|
- Matthew Smith
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: CoffeeTags generates ctags compatibile tags for CoffeeScript.
|
|
15
15
|
email:
|
|
16
|
-
- lukasz@
|
|
16
|
+
- lukasz@korecki.me
|
|
17
17
|
- mtscout6@gmail.com
|
|
18
18
|
executables:
|
|
19
19
|
- coffeetags
|
|
20
20
|
extensions: []
|
|
21
21
|
extra_rdoc_files: []
|
|
22
22
|
files:
|
|
23
|
-
- .coveralls.yml
|
|
24
|
-
- .gitignore
|
|
25
|
-
- .rspec
|
|
26
|
-
- .rvmrc
|
|
27
|
-
- .travis.yml
|
|
23
|
+
- ".coveralls.yml"
|
|
24
|
+
- ".gitignore"
|
|
25
|
+
- ".rspec"
|
|
26
|
+
- ".rvmrc"
|
|
27
|
+
- ".travis.yml"
|
|
28
28
|
- CoffeeTags.gemspec
|
|
29
29
|
- Gemfile
|
|
30
30
|
- Guardfile
|
|
@@ -70,12 +70,12 @@ require_paths:
|
|
|
70
70
|
- lib
|
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements:
|
|
78
|
-
- -
|
|
78
|
+
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
80
|
version: '0'
|
|
81
81
|
requirements: []
|
|
@@ -84,26 +84,4 @@ rubygems_version: 2.2.2
|
|
|
84
84
|
signing_key:
|
|
85
85
|
specification_version: 4
|
|
86
86
|
summary: tags generator for CoffeeScript
|
|
87
|
-
test_files:
|
|
88
|
-
- spec/coffeetags_spec.rb
|
|
89
|
-
- spec/coveralls-setup.rb
|
|
90
|
-
- spec/fixtures/append-expected.ctags
|
|
91
|
-
- spec/fixtures/append.ctags
|
|
92
|
-
- spec/fixtures/blockcomment.coffee
|
|
93
|
-
- spec/fixtures/blockcomment.ctags
|
|
94
|
-
- spec/fixtures/campfire.coffee
|
|
95
|
-
- spec/fixtures/campfire.js
|
|
96
|
-
- spec/fixtures/campfire.js.tags
|
|
97
|
-
- spec/fixtures/class_with_at.coffee
|
|
98
|
-
- spec/fixtures/class_with_dot.coffee
|
|
99
|
-
- spec/fixtures/exported_class.coffee
|
|
100
|
-
- spec/fixtures/out.test-relative-append.ctags
|
|
101
|
-
- spec/fixtures/out.test-relative.ctags
|
|
102
|
-
- spec/fixtures/out.test-two.ctags
|
|
103
|
-
- spec/fixtures/out.test.ctags
|
|
104
|
-
- spec/fixtures/test.coffee
|
|
105
|
-
- spec/fixtures/test_tree.yaml
|
|
106
|
-
- spec/fixtures/tree.yaml
|
|
107
|
-
- spec/formatter_spec.rb
|
|
108
|
-
- spec/parser_spec.rb
|
|
109
|
-
- spec/spec_helper.rb
|
|
87
|
+
test_files: []
|