coffee-rails-source-paths 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81a307f8736a87aa8dbc0875e583ee6d69280c2c
4
- data.tar.gz: c036fcd1b0960b4fdc4c24070ac03767aff56378
3
+ metadata.gz: 7d9186d1f4af3e0a6a3324dddf6ed33d0253ccc9
4
+ data.tar.gz: e27ee721db6fa884821ec92353ac41e7a164786e
5
5
  SHA512:
6
- metadata.gz: c0e97c836681b243031a509e721c87fd8a88ae0449493f4989090733a9fe80fe063df1dbcea0ff98c5be68570d42fc670a292f2ba16c215a685f82b51647523d
7
- data.tar.gz: 31cb0247afa64c85f1dd0db5d8382662d91a94ec32e85e9032e60d008a8e976dd73d8ec89dd76fbd93b4ec0e66bfccd5626e17f10b5af2c5751dcee6a76687df
6
+ metadata.gz: e5541935e2c1d073140cd31397246040c009e66b8304f6298b767bdf653f75ea26948c040e6dc31bb5799c0800008cda4fda4dda4ba4c8781ff7995929b8653e
7
+ data.tar.gz: 712b11d0398b2a9443b678740145de260544993cf60f0f557bfda0bbf98be0e1ef461d58d7e08c8297ebb7941224c19dbf895c1bad0ec5696cc3fd518ecfc6aa
@@ -54,15 +54,15 @@ if Rails.env.development?
54
54
  })
55
55
  WRAPPER
56
56
 
57
- ret = Source.context.call(wrapper, script, options)
57
+ file_path = "var sourcePath='#{pathname.basename}';\n"
58
+ ret = Source.context.call(wrapper, file_path + script, options)
58
59
 
59
60
  coffee_file.open('w') {|f| f.puts script }
60
61
  map_file.open('w') {|f| f.puts ret["v3SourceMap"]}
61
62
 
62
63
  comment = "//# sourceMappingURL=/#{map_file.relative_path_from(Rails.root.join("public"))}\n"
63
64
  # This will add file source that can be used in directives or controllers
64
- filePath = "var sourcePath='#{options[:pathname]}'\n"
65
- return filePath + ret['js'] + comment
65
+ return ret['js'] + comment
66
66
  end
67
67
 
68
68
  end
@@ -1,3 +1,3 @@
1
1
  module CoffeeRailsSourceMaps
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coffee-rails-source-paths
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Trojnar