CoffeeTags 0.0.3.0 → 0.1.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.
- data/.gitignore +1 -0
- data/Rakefile +2 -1
- data/lib/CoffeeTags/parser.rb +1 -1
- data/lib/CoffeeTags/version.rb +1 -1
- data/spec/coffeetags_spec.rb +1 -0
- data/spec/fixtures/blockcomment.ctags +2 -2
- data/spec/fixtures/campfire.js.tags +12 -11
- data/spec/fixtures/class_with_at.coffee +2 -0
- data/spec/fixtures/out.test-two.ctags +17 -17
- data/spec/fixtures/out.test.ctags +9 -9
- data/spec/formatter_spec.rb +2 -2
- data/spec/parser_spec.rb +9 -0
- metadata +24 -43
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/lib/CoffeeTags/parser.rb
CHANGED
@@ -17,7 +17,7 @@ module Coffeetags
|
|
17
17
|
|
18
18
|
# regexes
|
19
19
|
@block = /^\s*(if|unless|switch|loop|do)/
|
20
|
-
@class_regex = /\s*class\s*([\w\.]*)/
|
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*[=:]{1}\s*$/
|
23
23
|
@token_regex = /([@a-zA-Z0-9_]*)\s*[:=]{1}/
|
data/lib/CoffeeTags/version.rb
CHANGED
data/spec/coffeetags_spec.rb
CHANGED
@@ -3,5 +3,5 @@
|
|
3
3
|
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@coffeesounds.com/
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
6
|
-
!_TAG_PROGRAM_VERSION 0.0
|
7
|
-
echo2 spec/fixtures/blockcomment.coffee
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.0 //
|
7
|
+
echo2 spec/fixtures/blockcomment.coffee /^echo2 :-> console.log 'echo'$/;" f lineno:7 object:window type:function
|
@@ -1,13 +1,14 @@
|
|
1
1
|
!_TAG_FILE_FORMAT 2 /extended format/
|
2
2
|
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
-
!_TAG_PROGRAM_AUTHOR
|
4
|
-
!_TAG_PROGRAM_NAME
|
5
|
-
!_TAG_PROGRAM_URL
|
6
|
-
!_TAG_PROGRAM_VERSION 0.1 //
|
7
|
-
|
8
|
-
constructor
|
9
|
-
handlers
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
3
|
+
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@coffeesounds.com/
|
4
|
+
!_TAG_PROGRAM_NAME CoffeeTags //
|
5
|
+
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.0 //
|
7
|
+
bump spec/fixtures/campfire.coffee /^ bump : ->$/;" f lineno:46 object:Test type:function
|
8
|
+
constructor spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f lineno:8 object:Campfire type:function
|
9
|
+
handlers spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f lineno:14 object:Campfire type:function
|
10
|
+
onFailure spec/fixtures/campfire.coffee /^ onFailure: (response) ->$/;" f lineno:24 object:Campfire.handlers.resp type:function
|
11
|
+
onSuccess spec/fixtures/campfire.coffee /^ onSuccess : (response) ->$/;" f lineno:16 object:Campfire.handlers.resp type:function
|
12
|
+
recent spec/fixtures/campfire.coffee /^ recent: (id, since, callbacks) ->$/;" f lineno:40 object:Campfire type:function
|
13
|
+
roomInfo spec/fixtures/campfire.coffee /^ roomInfo: (id, callbacks) ->$/;" f lineno:34 object:Campfire type:function
|
14
|
+
rooms spec/fixtures/campfire.coffee /^ rooms: (callbacks) ->$/;" f lineno:29 object:Campfire type:function
|
@@ -3,20 +3,20 @@
|
|
3
3
|
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@coffeesounds.com/
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
6
|
-
!_TAG_PROGRAM_VERSION 0.0
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
constructor spec/fixtures/campfire.coffee
|
16
|
-
handlers spec/fixtures/campfire.coffee
|
17
|
-
|
18
|
-
onFailure spec/fixtures/campfire.coffee
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.0 //
|
7
|
+
@filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
8
|
+
_loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
9
|
+
beam_magnum spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
|
10
|
+
bound_func spec/fixtures/test.coffee /^bound_func = (ok) => wat(ok)$/;" f lineno:41 object:window type:function
|
11
|
+
bump spec/fixtures/campfire.coffee /^ bump : ->$/;" f lineno:46 object:Test type:function
|
12
|
+
bump spec/fixtures/test.coffee /^ bump : ->$/;" f lineno:10 object:Wat.ho.@lolWat type:function
|
13
|
+
bump spec/fixtures/test.coffee /^bump = (wat) ->$/;" f lineno:1 object:window type:function
|
14
|
+
bump_up spec/fixtures/test.coffee /^ bump_up : ->$/;" f lineno:12 object:Wat.ho.@lolWat type:function
|
15
|
+
constructor spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f lineno:8 object:Campfire type:function
|
16
|
+
handlers spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f lineno:14 object:Campfire type:function
|
17
|
+
ho spec/fixtures/test.coffee /^ ho : (x) ->$/;" f lineno:5 object:Wat type:function
|
18
|
+
onFailure spec/fixtures/campfire.coffee /^ onFailure: (response) ->$/;" f lineno:24 object:Campfire.handlers.resp type:function
|
19
|
+
onSuccess spec/fixtures/campfire.coffee /^ onSuccess : (response) ->$/;" f lineno:16 object:Campfire.handlers.resp type:function
|
20
|
+
recent spec/fixtures/campfire.coffee /^ recent: (id, since, callbacks) ->$/;" f lineno:40 object:Campfire type:function
|
21
|
+
roomInfo spec/fixtures/campfire.coffee /^ roomInfo: (id, callbacks) ->$/;" f lineno:34 object:Campfire type:function
|
22
|
+
rooms spec/fixtures/campfire.coffee /^ rooms: (callbacks) ->$/;" f lineno:29 object:Campfire type:function
|
@@ -3,12 +3,12 @@
|
|
3
3
|
!_TAG_PROGRAM_AUTHOR Łukasz Korecki /lukasz@coffeesounds.com/
|
4
4
|
!_TAG_PROGRAM_NAME CoffeeTags //
|
5
5
|
!_TAG_PROGRAM_URL https://github.com/lukaszkorecki/CoffeeTags /GitHub repository/
|
6
|
-
!_TAG_PROGRAM_VERSION 0.0
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.0 //
|
7
|
+
@filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
8
|
+
_loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
9
|
+
beam_magnum spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
|
10
|
+
bound_func spec/fixtures/test.coffee /^bound_func = (ok) => wat(ok)$/;" f lineno:41 object:window type:function
|
11
|
+
bump spec/fixtures/test.coffee /^ bump : ->$/;" f lineno:10 object:Wat.ho.@lolWat type:function
|
12
|
+
bump spec/fixtures/test.coffee /^bump = (wat) ->$/;" f lineno:1 object:window type:function
|
13
|
+
bump_up spec/fixtures/test.coffee /^ bump_up : ->$/;" f lineno:12 object:Wat.ho.@lolWat type:function
|
14
|
+
ho spec/fixtures/test.coffee /^ ho : (x) ->$/;" f lineno:5 object:Wat type:function
|
data/spec/formatter_spec.rb
CHANGED
@@ -13,14 +13,14 @@ describe 'CoffeeTags::Formatter' do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
it "generates a line for method definition" do
|
16
|
-
exp = [ 'constructor', 'test.coffee', "
|
16
|
+
exp = [ 'constructor', 'test.coffee', "/^ constructor: (api_key, host) ->$/;\"",
|
17
17
|
'f', 'lineno:8', 'object:Campfire', 'type:function'
|
18
18
|
].join("\t")
|
19
19
|
@instance.parse_tree.first.should == exp
|
20
20
|
end
|
21
21
|
|
22
22
|
it "generates line for second class" do
|
23
|
-
exp = [ 'bump', 'test.coffee', "
|
23
|
+
exp = [ 'bump', 'test.coffee', "/^ bump : ->$/;\"",
|
24
24
|
'f', 'lineno:46', 'object:Test', 'type:function'
|
25
25
|
].join "\t"
|
26
26
|
@instance.parse_tree.last.should == exp
|
data/spec/parser_spec.rb
CHANGED
@@ -3,6 +3,7 @@ describe 'CoffeeTags::Parser' do
|
|
3
3
|
before :all do
|
4
4
|
@campfire_class = File.read File.expand_path('./spec/fixtures/campfire.coffee')
|
5
5
|
@class_with_dot = File.read File.expand_path('./spec/fixtures/class_with_dot.coffee')
|
6
|
+
@class_with_at = File.read File.expand_path('./spec/fixtures/class_with_at.coffee')
|
6
7
|
@test_file = File.read File.expand_path('./spec/fixtures/test.coffee')
|
7
8
|
|
8
9
|
@cf_tree = YAML::load_file File.expand_path('./spec/fixtures/tree.yaml')
|
@@ -85,6 +86,14 @@ describe 'CoffeeTags::Parser' do
|
|
85
86
|
c.should == @cf_tree.find {|i| i[:name] == 'App.Campfire'}
|
86
87
|
end
|
87
88
|
|
89
|
+
it "parses the class with @ in name" do
|
90
|
+
@coffee_parser = Coffeetags::Parser.new @class_with_at, true
|
91
|
+
@coffee_parser.execute!
|
92
|
+
|
93
|
+
c = @coffee_parser.tree.find { |i| i[:name] == 'Campfire'}
|
94
|
+
c.should == @cf_tree.find {|i| i[:name] == 'Campfire'}
|
95
|
+
end
|
96
|
+
|
88
97
|
it "parses the instance variable" do
|
89
98
|
c =@coffee_parser.tree.find { |i| i[:name] == '@url'}
|
90
99
|
c.should == @cf_tree.find {|i| i[:name] == '@url'}
|
metadata
CHANGED
@@ -1,35 +1,24 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: CoffeeTags
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
- 0
|
11
|
-
version: 0.0.3.0
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
14
|
-
-
|
7
|
+
authors:
|
8
|
+
- Łukasz Korecki
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2013-02-02 00:00:00 +00:00
|
20
|
-
default_executable:
|
12
|
+
date: 2013-07-14 00:00:00.000000000 Z
|
21
13
|
dependencies: []
|
22
|
-
|
23
14
|
description: CoffeeTags generates ctags compatibile tags for CoffeeScript.
|
24
|
-
email:
|
15
|
+
email:
|
25
16
|
- lukasz@coffeesounds.com
|
26
|
-
executables:
|
17
|
+
executables:
|
27
18
|
- coffeetags
|
28
19
|
extensions: []
|
29
|
-
|
30
20
|
extra_rdoc_files: []
|
31
|
-
|
32
|
-
files:
|
21
|
+
files:
|
33
22
|
- .gitignore
|
34
23
|
- .rspec
|
35
24
|
- .rvmrc
|
@@ -50,6 +39,7 @@ files:
|
|
50
39
|
- spec/fixtures/campfire.coffee
|
51
40
|
- spec/fixtures/campfire.js
|
52
41
|
- spec/fixtures/campfire.js.tags
|
42
|
+
- spec/fixtures/class_with_at.coffee
|
53
43
|
- spec/fixtures/class_with_dot.coffee
|
54
44
|
- spec/fixtures/exported_class.coffee
|
55
45
|
- spec/fixtures/out.test-two.ctags
|
@@ -63,47 +53,38 @@ files:
|
|
63
53
|
- tagbar-info.markdown
|
64
54
|
- test.rb
|
65
55
|
- vim/tagbar-coffee.vim.erb
|
66
|
-
has_rdoc: true
|
67
56
|
homepage: http://github.com/lukaszkorecki/CoffeeTags
|
68
57
|
licenses: []
|
69
|
-
|
70
58
|
post_install_message:
|
71
59
|
rdoc_options: []
|
72
|
-
|
73
|
-
require_paths:
|
60
|
+
require_paths:
|
74
61
|
- lib
|
75
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
63
|
none: false
|
77
|
-
requirements:
|
78
|
-
- -
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
|
81
|
-
|
82
|
-
- 0
|
83
|
-
version: "0"
|
84
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
69
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
version: "0"
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
93
74
|
requirements: []
|
94
|
-
|
95
75
|
rubyforge_project: CoffeeTags
|
96
|
-
rubygems_version: 1.
|
76
|
+
rubygems_version: 1.8.24
|
97
77
|
signing_key:
|
98
78
|
specification_version: 3
|
99
79
|
summary: tags generator for CoffeeScript
|
100
|
-
test_files:
|
80
|
+
test_files:
|
101
81
|
- spec/coffeetags_spec.rb
|
102
82
|
- spec/fixtures/blockcomment.coffee
|
103
83
|
- spec/fixtures/blockcomment.ctags
|
104
84
|
- spec/fixtures/campfire.coffee
|
105
85
|
- spec/fixtures/campfire.js
|
106
86
|
- spec/fixtures/campfire.js.tags
|
87
|
+
- spec/fixtures/class_with_at.coffee
|
107
88
|
- spec/fixtures/class_with_dot.coffee
|
108
89
|
- spec/fixtures/exported_class.coffee
|
109
90
|
- spec/fixtures/out.test-two.ctags
|