CoffeeTags 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/CoffeeTags/version.rb +1 -1
- data/lib/CoffeeTags.rb +6 -7
- data/spec/coffeetags_spec.rb +33 -0
- data/spec/fixtures/append-expected.ctags +1 -1
- data/spec/fixtures/append.ctags +2 -2
- data/spec/fixtures/blockcomment.ctags +1 -1
- data/spec/fixtures/campfire.js.tags +1 -1
- data/spec/fixtures/out.test-relative-append.ctags +24 -0
- data/spec/fixtures/out.test-relative.ctags +1 -1
- data/spec/fixtures/out.test-two.ctags +2 -1
- data/spec/fixtures/out.test.ctags +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
data.tar.gz:
|
4
|
-
metadata.gz:
|
3
|
+
data.tar.gz: 6ee24af2dd8c15390bc9b048cd457a2b71cf56f9bb0713a1bb63939a798c28c858d727598339c6dc2fe4b817d678bcb3b27c5ab3e4973c81ca803ffd39807844
|
4
|
+
metadata.gz: 1789f5571bfb2dc03298b58f9b09a0f385f1111dffdce7263e492aa4f0929cc8e429512eaefde3472bec0ef73a0c310ecee35fb9f959f43f00a2653489c2da96
|
5
5
|
SHA1:
|
6
|
-
data.tar.gz:
|
7
|
-
metadata.gz:
|
6
|
+
data.tar.gz: e8a6231fd6be1aeab2c16585f4cc31ee0aef9933
|
7
|
+
metadata.gz: 000e886c5bb3b70edab1dfd8b20d455a7a55e85c
|
data/README.md
CHANGED
data/lib/CoffeeTags/version.rb
CHANGED
data/lib/CoffeeTags.rb
CHANGED
@@ -140,7 +140,7 @@ module Coffeetags
|
|
140
140
|
return [] unless File.exists? output
|
141
141
|
|
142
142
|
files = [] if files.nil?
|
143
|
-
absolute_files = files.map {|f| Pathname.new(f)}
|
143
|
+
absolute_files = files.map {|f| Pathname.new(f).expand_path }
|
144
144
|
|
145
145
|
output_dir = Pathname.new(output).dirname
|
146
146
|
|
@@ -149,12 +149,11 @@ module Coffeetags
|
|
149
149
|
reject {|l| l =~ /^!_/ }.
|
150
150
|
reject {|l|
|
151
151
|
raw_file_path = l.split("\t")[1]
|
152
|
-
tag_file =
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
absolute_files.include? tag_file
|
152
|
+
tag_file = Pathname.new(raw_file_path)
|
153
|
+
|
154
|
+
tag_file = output_dir + tag_file if raw_file_path =~ /^\./
|
155
|
+
|
156
|
+
absolute_files.include? tag_file.expand_path
|
158
157
|
}
|
159
158
|
end
|
160
159
|
|
data/spec/coffeetags_spec.rb
CHANGED
@@ -123,8 +123,19 @@ FF
|
|
123
123
|
File.read("test.out").should == File.read("./spec/fixtures/append-expected.ctags")
|
124
124
|
end
|
125
125
|
|
126
|
+
it "appends tags with tag relative for given file" do
|
127
|
+
FileUtils.mkdir "testout" unless File.directory? "testout"
|
128
|
+
output = "testout/test.out"
|
129
|
+
|
130
|
+
FileUtils.cp "spec/fixtures/out.test-relative-append.ctags", output
|
131
|
+
|
132
|
+
lines = Coffeetags::Utils.run({ :output => output, :files => ["spec/fixtures/campfire.coffee"], :append => true, :tag_relative => true })
|
133
|
+
File.read(output).should == File.read("./spec/fixtures/out.test-relative.ctags")
|
134
|
+
end
|
135
|
+
|
126
136
|
after :each do
|
127
137
|
`rm test.out` if File.exists? 'test.out'
|
138
|
+
`rm -rf testout` if File.directory? 'testout'
|
128
139
|
end
|
129
140
|
end
|
130
141
|
|
@@ -160,6 +171,28 @@ FF
|
|
160
171
|
lines = Coffeetags::Utils.setup_tag_lines(output, ["spec/fixtures/test.coffee"], true).map {|l| l.split("\t")[0]}
|
161
172
|
lines.should == %w{bump constructor handlers onFailure onSuccess recent roomInfo rooms}
|
162
173
|
end
|
174
|
+
|
175
|
+
it "returns contents of output file with relative file paths from absolute file path" do
|
176
|
+
FileUtils.mkdir "testout" unless File.directory? "testout"
|
177
|
+
output = "testout/test.out"
|
178
|
+
|
179
|
+
FileUtils.cp "spec/fixtures/out.test-relative.ctags", output
|
180
|
+
|
181
|
+
expanded_path = Pathname.new("spec/fixtures/test.coffee").expand_path.to_s
|
182
|
+
|
183
|
+
lines = Coffeetags::Utils.setup_tag_lines(output, [expanded_path], true).map {|l| l.split("\t")[0]}
|
184
|
+
lines.should == %w{bump constructor handlers onFailure onSuccess recent roomInfo rooms}
|
185
|
+
end
|
186
|
+
|
187
|
+
it "returns contents of output file with relative file paths from absolution output path" do
|
188
|
+
FileUtils.mkdir "testout" unless File.directory? "testout"
|
189
|
+
output = "testout/test.out"
|
190
|
+
|
191
|
+
FileUtils.cp "spec/fixtures/out.test-relative.ctags", output
|
192
|
+
|
193
|
+
lines = Coffeetags::Utils.setup_tag_lines(Pathname.new(output).expand_path.to_s, ["spec/fixtures/test.coffee"], true).map {|l| l.split("\t")[0]}
|
194
|
+
lines.should == %w{bump constructor handlers onFailure onSuccess recent roomInfo rooms}
|
195
|
+
end
|
163
196
|
end
|
164
197
|
|
165
198
|
end
|
@@ -3,7 +3,7 @@
|
|
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.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
7
|
@filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
8
8
|
_loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
9
9
|
baz spec/fixtures/blockcomment.coffee /^baz : (x, y) ->$/;" f lineno:15 object:window type:function
|
data/spec/fixtures/append.ctags
CHANGED
@@ -3,8 +3,8 @@
|
|
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.1.
|
7
|
-
!_TAG_PROGRAM_VERSION 0.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
8
8
|
!_THIS_LINE_SHOULD_GET_REMOVED Nothing to see here //
|
9
9
|
@filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
10
10
|
_loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
@@ -3,7 +3,7 @@
|
|
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.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
7
|
baz spec/fixtures/blockcomment.coffee /^baz : (x, y) ->$/;" f lineno:15 object:window type:function
|
8
8
|
echo2 spec/fixtures/blockcomment.coffee /^echo2 :-> console.log 'echo'$/;" f lineno:7 object:window type:function
|
9
9
|
echo3 spec/fixtures/blockcomment.coffee /^echo3 :-> console.log 'echo'$/;" f lineno:23 object:window type:function
|
@@ -3,7 +3,7 @@
|
|
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.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
7
|
bump spec/fixtures/campfire.coffee /^ bump : ->$/;" f lineno:46 object:Test type:function
|
8
8
|
constructor spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f lineno:8 object:Campfire type:function
|
9
9
|
handlers spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f lineno:14 object:Campfire type:function
|
@@ -0,0 +1,24 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format/
|
2
|
+
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
|
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.7 //
|
7
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
8
|
+
!_THIS_LINE_SHOULD_GET_REMOVED Nothing to see here //
|
9
|
+
@filter ../spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
10
|
+
_loop ../spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
11
|
+
beam_magnum ../spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
|
12
|
+
bound_func ../spec/fixtures/test.coffee /^bound_func = (ok) => wat(ok)$/;" f lineno:41 object:window type:function
|
13
|
+
bump ../spec/fixtures/test.coffee /^ bump : ->$/;" f lineno:10 object:Wat.ho.@lolWat type:function
|
14
|
+
bump ../spec/fixtures/test.coffee /^bump = (wat) ->$/;" f lineno:1 object:window type:function
|
15
|
+
bump_up ../spec/fixtures/test.coffee /^ bump_up : ->$/;" f lineno:12 object:Wat.ho.@lolWat type:function
|
16
|
+
constructor ../spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f lineno:8 object:Campfire type:function
|
17
|
+
constructor2 ../spec/fixtures/campfire.coffee /^ constructor: (api_key, host) ->$/;" f lineno:8 object:Campfire type:function
|
18
|
+
handlers ../spec/fixtures/campfire.coffee /^ handlers: (callbacks) ->$/;" f lineno:14 object:Campfire type:function
|
19
|
+
ho ../spec/fixtures/test.coffee /^ ho : (x) ->$/;" f lineno:5 object:Wat type:function
|
20
|
+
onFailure ../spec/fixtures/campfire.coffee /^ onFailure: (response) ->$/;" f lineno:24 object:Campfire.handlers.resp type:function
|
21
|
+
onSuccess ../spec/fixtures/campfire.coffee /^ onSuccess : (response) ->$/;" f lineno:16 object:Campfire.handlers.resp type:function
|
22
|
+
recent ../spec/fixtures/campfire.coffee /^ recent: (id, since, callbacks) ->$/;" f lineno:40 object:Campfire type:function
|
23
|
+
roomInfo ../spec/fixtures/campfire.coffee /^ roomInfo: (id, callbacks) ->$/;" f lineno:34 object:Campfire type:function
|
24
|
+
rooms ../spec/fixtures/campfire.coffee /^ rooms: (callbacks) ->$/;" f lineno:29 object:Campfire type:function
|
@@ -3,7 +3,7 @@
|
|
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.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
7
|
@filter ../spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
8
8
|
_loop ../spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
9
9
|
beam_magnum ../spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
|
@@ -3,7 +3,8 @@
|
|
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.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
|
+
@filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
7
8
|
_loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
8
9
|
beam_magnum spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
|
9
10
|
bound_func spec/fixtures/test.coffee /^bound_func = (ok) => wat(ok)$/;" f lineno:41 object:window type:function
|
@@ -3,7 +3,7 @@
|
|
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.1.
|
6
|
+
!_TAG_PROGRAM_VERSION 0.1.7 //
|
7
7
|
@filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
|
8
8
|
_loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
|
9
9
|
beam_magnum spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CoffeeTags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "\xC5\x81ukasz Korecki"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2014-04-
|
13
|
+
date: 2014-04-25 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: CoffeeTags generates ctags compatibile tags for CoffeeScript.
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- spec/fixtures/class_with_at.coffee
|
50
50
|
- spec/fixtures/class_with_dot.coffee
|
51
51
|
- spec/fixtures/exported_class.coffee
|
52
|
+
- spec/fixtures/out.test-relative-append.ctags
|
52
53
|
- spec/fixtures/out.test-relative.ctags
|
53
54
|
- spec/fixtures/out.test-two.ctags
|
54
55
|
- spec/fixtures/out.test.ctags
|
@@ -99,6 +100,7 @@ test_files:
|
|
99
100
|
- spec/fixtures/class_with_at.coffee
|
100
101
|
- spec/fixtures/class_with_dot.coffee
|
101
102
|
- spec/fixtures/exported_class.coffee
|
103
|
+
- spec/fixtures/out.test-relative-append.ctags
|
102
104
|
- spec/fixtures/out.test-relative.ctags
|
103
105
|
- spec/fixtures/out.test-two.ctags
|
104
106
|
- spec/fixtures/out.test.ctags
|