CoffeeTags 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA512:
3
- metadata.gz: 2b1992811898b70443a228bc3fb1134985a92fc51530fde54b757bc17204b37db8b9f55087f17d397fedebab157585e38c3f867e02d544176acfc7462531750d
4
- data.tar.gz: d836c7f758fdf8edfdb6761324c4c37e952007a738eb1bf9a4bccab5998bfbbabe0f21be1fbbe4f5944feaffc70d8a917301d8738a35245e19fba480c599b7df
3
+ data.tar.gz: 184d6146124490a5f7f6b219b94759ce02b780bb6efd178ae81798791c57edca17152c4ecd02b69ebc0ea7e3b12c627d0f8e7971b46ae500c32c3e1e2917464f
4
+ metadata.gz: 8c373453d87935814fa0347f059ed78297b0a3a56c3450e55fb7b0a6374da277c387cbb417c3de45f721f4c28caac88df1e04b7a0e5bfb5905180ea5b4afca62
5
5
  SHA1:
6
- metadata.gz: 0931a0b85af3b3eb9a214f9ef913765fc6219409
7
- data.tar.gz: 2af333a55da5067c3879329ea403e2c977e8cd0e
6
+ data.tar.gz: b1e56d78d8559fdd4956db21b8ec955f1d32c0ef
7
+ metadata.gz: 89942f23757f3cae162ca378088c13390c3fbaa5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CoffeeTags
2
2
 
3
- ### Latest version: `0.1.3`
3
+ ### Latest version: `0.1.6`
4
4
 
5
5
  A simple tool for generating CoffeeScript tags (Ctags compatible).
6
6
 
data/lib/CoffeeTags.rb CHANGED
@@ -142,11 +142,18 @@ module Coffeetags
142
142
  files = [] if files.nil?
143
143
  absolute_files = files.map {|f| Pathname.new(f)}
144
144
 
145
+ output_dir = Pathname.new(output).dirname
146
+
145
147
  File.readlines(output).
146
148
  map {|l| l.strip}.
147
149
  reject {|l| l =~ /^!_/ }.
148
150
  reject {|l|
149
- tag_file = Pathname.new l.split("\t")[1]
151
+ raw_file_path = l.split("\t")[1]
152
+ tag_file = if raw_file_path =~ /^\./
153
+ output_dir + Pathname.new(l.split("\t")[1])
154
+ else
155
+ Pathname.new(raw_file_path)
156
+ end
150
157
  absolute_files.include? tag_file
151
158
  }
152
159
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Coffeetags
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
@@ -150,6 +150,16 @@ FF
150
150
  lines = Coffeetags::Utils.setup_tag_lines("spec/fixtures/out.test-two.ctags", ["spec/fixtures/test.coffee"], true).map {|l| l.split("\t")[0]}
151
151
  lines.should == %w{bump constructor handlers onFailure onSuccess recent roomInfo rooms}
152
152
  end
153
+
154
+ it "returns contents of output file with relative file paths without header and without tags for files that will be indexed" do
155
+ FileUtils.mkdir "testout" unless File.directory? "testout"
156
+ output = "testout/test.out"
157
+
158
+ FileUtils.cp "spec/fixtures/out.test-relative.ctags", output
159
+
160
+ lines = Coffeetags::Utils.setup_tag_lines(output, ["spec/fixtures/test.coffee"], true).map {|l| l.split("\t")[0]}
161
+ lines.should == %w{bump constructor handlers onFailure onSuccess recent roomInfo rooms}
162
+ end
153
163
  end
154
164
 
155
165
  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.5 //
6
+ !_TAG_PROGRAM_VERSION 0.1.6 //
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
@@ -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.5 //
7
- !_TAG_PROGRAM_VERSION 0.1.5 //
6
+ !_TAG_PROGRAM_VERSION 0.1.6 //
7
+ !_TAG_PROGRAM_VERSION 0.1.6 //
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.5 //
6
+ !_TAG_PROGRAM_VERSION 0.1.6 //
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.5 //
6
+ !_TAG_PROGRAM_VERSION 0.1.6 //
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
@@ -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.5 //
6
+ !_TAG_PROGRAM_VERSION 0.1.6 //
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,8 +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.5 //
7
- @filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
6
+ !_TAG_PROGRAM_VERSION 0.1.6 // @filter spec/fixtures/test.coffee /^ @filter = ->$/;" f lineno:14 object:Wat.ho type:function
8
7
  _loop spec/fixtures/test.coffee /^_loop = (x) ->$/;" f lineno:19 object:window type:function
9
8
  beam_magnum spec/fixtures/test.coffee /^beam_magnum : -> deployed(true)$/;" f lineno:44 object:window type:function
10
9
  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.5 //
6
+ !_TAG_PROGRAM_VERSION 0.1.6 //
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - "\xC5\x81ukasz Korecki"