jserror-rails 0.6.4 → 1.0.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 +7 -0
- data/.DS_Store +0 -0
- data/LICENSE +20 -0
- data/README.md +15 -0
- data/jserror-rails.gemspec +4 -4
- data/lib/.DS_Store +0 -0
- data/lib/jserror-rails/jserror_template.rb +3 -5
- metadata +13 -12
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2539562dafb8809032870340a3b986bc8b9f7a2d
|
4
|
+
data.tar.gz: b5f832727701c3809bf3d701e53529787f28188e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 70aff077c18e6b3a54dadd4f63939ecc5eae8ad0a02afbb31ad15cab290125ea20b6e6e59b0e924d16e5582339dd2807774b7e1fe9f4261d30b2705a7f44d0f1
|
7
|
+
data.tar.gz: a08313df2d55efdf37b39615f283a80b7d5ddedf3a5ea0a440e07f4ceb8277cc7351e70e648efad01fdf6ee33c4618f9c98b851a0ae431064ca78371d42da2ce
|
data/.DS_Store
CHANGED
Binary file
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Jeremy Geros
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
jserror-rails
|
2
|
+
=============
|
3
|
+
|
4
|
+
Automatically inserts try catches around coffeescript code just add a .debug extension
|
5
|
+
|
6
|
+
On an exception calls out a method called javascript_error() with an object
|
7
|
+
```
|
8
|
+
javascript_error({
|
9
|
+
name: NAME,
|
10
|
+
error_message: ERROR MESSAGE,
|
11
|
+
error_name: ERROR NAME,
|
12
|
+
code_block: BLOCK OF CODE WHICH ERRORED (with \n replaced with [::n::],
|
13
|
+
arguments: FUNCTION ARGUMENTS
|
14
|
+
});
|
15
|
+
```
|
data/jserror-rails.gemspec
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "jserror-rails"
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "1.0.0"
|
6
6
|
s.authors = ["Jeremy Geros"]
|
7
7
|
s.email = ["jeremy453@gmail.com"]
|
8
|
-
s.homepage = ""
|
9
|
-
s.summary = %q{Try catch
|
8
|
+
s.homepage = "https://github.com/JeremyGeros/jserror-rails"
|
9
|
+
s.summary = %q{Try catch wrapper for sprockets.}
|
10
10
|
s.description = %q{Adds try catch around all functions to allow better error debugging in javascript.}
|
11
|
-
|
11
|
+
s.license = "MIT"
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
14
14
|
s.require_paths = ["lib"]
|
data/lib/.DS_Store
CHANGED
Binary file
|
@@ -53,8 +53,7 @@ module JserrorRails
|
|
53
53
|
error_message: e.message,
|
54
54
|
error_name: e.name,
|
55
55
|
code_block: '#{old_lines.join('').gsub("\n", '[::n::]').gsub('\'', '')}',
|
56
|
-
arguments: [#{arguments.join(', ')}]
|
57
|
-
source: $('*').html()
|
56
|
+
arguments: [#{arguments.join(', ')}]
|
58
57
|
});"
|
59
58
|
|
60
59
|
new_code_lines << "#{tabs}\t} catch (e) { \n#{tabs}\t\t#{console_line}\n#{tabs}\t}\n"
|
@@ -107,8 +106,7 @@ module JserrorRails
|
|
107
106
|
error_message: e.message,
|
108
107
|
error_name: e.name,
|
109
108
|
code_block: '#{old_lines.join('').gsub("\n", '[::n::]').gsub('\'', '')}',
|
110
|
-
arguments: [#{arguments.join(', ')}]
|
111
|
-
source: $('*').html()
|
109
|
+
arguments: [#{arguments.join(', ')}]
|
112
110
|
});"
|
113
111
|
|
114
112
|
new_code_lines << "#{tabs}\t} catch (e) { \n#{tabs}\t\t#{console_line}\n#{tabs}\t}\n"
|
@@ -129,7 +127,7 @@ module JserrorRails
|
|
129
127
|
|
130
128
|
output = "try {"
|
131
129
|
output << data_copy
|
132
|
-
output << "} catch (e) { javascript_error({name: 'unfound javascript error', error_message: e.message, error_name: e.name, code_block: '#{scope.logical_path.to_s}', arguments: []
|
130
|
+
output << "} catch (e) { javascript_error({name: 'unfound javascript error', error_message: e.message, error_name: e.name, code_block: '#{scope.logical_path.to_s}', arguments: []}); }"
|
133
131
|
output
|
134
132
|
end
|
135
133
|
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jserror-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jeremy Geros
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: Adds try catch around all functions to allow better error debugging in
|
15
14
|
javascript.
|
@@ -22,33 +21,35 @@ files:
|
|
22
21
|
- .DS_Store
|
23
22
|
- .gitignore
|
24
23
|
- Gemfile
|
24
|
+
- LICENSE
|
25
|
+
- README.md
|
25
26
|
- jserror-rails.gemspec
|
26
27
|
- lib/.DS_Store
|
27
28
|
- lib/jserror-rails.rb
|
28
29
|
- lib/jserror-rails/engine.rb
|
29
30
|
- lib/jserror-rails/jserror_template.rb
|
30
|
-
homepage:
|
31
|
-
licenses:
|
31
|
+
homepage: https://github.com/JeremyGeros/jserror-rails
|
32
|
+
licenses:
|
33
|
+
- MIT
|
34
|
+
metadata: {}
|
32
35
|
post_install_message:
|
33
36
|
rdoc_options: []
|
34
37
|
require_paths:
|
35
38
|
- lib
|
36
39
|
required_ruby_version: !ruby/object:Gem::Requirement
|
37
|
-
none: false
|
38
40
|
requirements:
|
39
|
-
- -
|
41
|
+
- - '>='
|
40
42
|
- !ruby/object:Gem::Version
|
41
43
|
version: '0'
|
42
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
45
|
requirements:
|
45
|
-
- -
|
46
|
+
- - '>='
|
46
47
|
- !ruby/object:Gem::Version
|
47
48
|
version: '0'
|
48
49
|
requirements: []
|
49
50
|
rubyforge_project:
|
50
|
-
rubygems_version:
|
51
|
+
rubygems_version: 2.2.1
|
51
52
|
signing_key:
|
52
|
-
specification_version:
|
53
|
-
summary: Try catch
|
53
|
+
specification_version: 4
|
54
|
+
summary: Try catch wrapper for sprockets.
|
54
55
|
test_files: []
|