coffee-rails-source-maps 1.3.6 → 1.4.0

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
  SHA1:
3
- metadata.gz: 08ba8f1a6cf4da4fbe149400f6f09e237cec96e0
4
- data.tar.gz: fd5770975b9d3ab910ff1af7aa44e5752ec3727c
3
+ metadata.gz: d48a1f9095c779745aec3d6ff6e31851f2c1eb17
4
+ data.tar.gz: b47661104665feac813f19acc3480c175cab9ad5
5
5
  SHA512:
6
- metadata.gz: 5e079ca7c275c6e5d1bced011490a6fd1241b901856115b7a15847788df9dd7bbae11b74bcd9431efd154e4a2eba24624b0a89bffe25d20dabcb951c7a6632f9
7
- data.tar.gz: c8dc17b1ba1843f0197273aa0c0cabf4b235dfb424ac778edc9a9f8e0a17a920c7a5ee4089f6365a5c08e36ff02905531b4f2e98ebdf730c4d644f7298fee3ad
6
+ metadata.gz: d37af8bd407b35ee43bfca9eab6854b331bc35a8e48c882ce4e34e50ff4488919e69174dcb739f8c5939989c67aff0f224439b7fd6209ddfd941b1ec36bba746
7
+ data.tar.gz: 3fdcf0153138b35a0f01b14062cca3cf9fc0d45ab9ff5ef48436f1f368b896b5da209eb6123f59f5fb75a20e0a27d873481e2facf3f7cef7103b344d33872cc0
data/README.md CHANGED
@@ -28,7 +28,7 @@ end
28
28
  This gem will create a folder called `assets/source_maps` in the Rails `public` directory. I would recommend adding this to your `.gitignore` file so you don't check this folder into git.
29
29
 
30
30
  ```
31
- public/source_maps/
31
+ public/assets/source_maps/
32
32
  ```
33
33
 
34
34
  ### Using Source Maps in Chrome
@@ -65,10 +65,12 @@ This gem is based on the following Gist: [https://gist.github.com/naan/5096056](
65
65
 
66
66
  * Mark Bates
67
67
  * Raymond Vellener
68
- * Brent Dillingham
69
68
  * Sean Santry
69
+ * Eric Boehs
70
70
  * Tim Moore
71
+ * Sam Dornan
72
+ * Brent Dillingham
71
73
  * Alexey Chernenkov
72
74
  * Curtis Steckel
73
- * Eric Boehs
74
- * Thomas Walpole
75
+ * Whitney Young
76
+ * Thomas Walpole
@@ -39,7 +39,22 @@ if Rails.env.development?
39
39
  options[:sourceMap] = true
40
40
  options[:filename] = "#{clean_name}.coffee" # coffee requires filename option to work with source maps (see http://coffeescript.org/documentation/docs/coffee-script.html#section-4)
41
41
  options[:sourceFiles] = ["/#{coffee_file.relative_path_from(Rails.root.join("public"))}"] # specify coffee source file explicitly (see http://coffeescript.org/documentation/docs/sourcemap.html#section-8)
42
- ret = Source.context.call("CoffeeScript.compile", script, options)
42
+
43
+ wrapper = <<-WRAPPER
44
+ (function(script, options) {
45
+ try {
46
+ return CoffeeScript.compile(script, options);
47
+ } catch (err) {
48
+ if (err instanceof SyntaxError && err.location) {
49
+ throw new SyntaxError([options.filename, err.location.first_line + 1, err.location.first_column + 1].join(":") + ": " + err.message)
50
+ } else {
51
+ throw err;
52
+ }
53
+ }
54
+ })
55
+ WRAPPER
56
+
57
+ ret = Source.context.call(wrapper, script, options)
43
58
 
44
59
  coffee_file.open('w') {|f| f.puts script }
45
60
  map_file.open('w') {|f| f.puts ret["v3SourceMap"]}
@@ -1,3 +1,3 @@
1
1
  module CoffeeRailsSourceMaps
2
- VERSION = "1.3.6"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coffee-rails-source-maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Bates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-script-source