crashlog 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -1
- data/Gemfile +4 -2
- data/Gemfile.lock +15 -78
- data/README.md +3 -1
- data/Rakefile +2 -4
- data/crashlog.gemspec +1 -1
- data/lib/core_ext/hash/keys.rb +51 -0
- data/lib/core_ext/kernel/require_relative.rb +7 -0
- data/lib/crash_log.rb +31 -28
- data/lib/crash_log/backtrace.rb +4 -4
- data/lib/crash_log/configuration.rb +59 -2
- data/lib/crash_log/helpers.rb +47 -0
- data/lib/crash_log/logging.rb +28 -7
- data/lib/crash_log/rack.rb +2 -2
- data/lib/crash_log/rails/controller_methods.rb +1 -1
- data/lib/crash_log/railtie.rb +18 -15
- data/lib/crash_log/reporter.rb +20 -6
- data/lib/crash_log/system_information.rb +14 -2
- data/lib/crash_log/version.rb +1 -1
- data/rails/init.rb +1 -1
- data/resources/README.md +34 -0
- data/resources/ca-bundle.crt +3376 -0
- data/script/integration_test +6 -5
- data/spec/crash_log/backtrace_spec.rb +21 -0
- data/spec/crash_log/configuration_spec.rb +7 -0
- data/spec/crash_log/initializer_spec.rb +20 -21
- data/spec/crash_log/rack_spec.rb +82 -0
- data/spec/crash_log/reporter_spec.rb +1 -0
- data/spec/crash_log_spec.rb +2 -0
- data/spec/requests/rails_controller_rescue_spec.rb +89 -86
- data/spec/spec_helper.rb +9 -4
- data/spec/support/define_constants.rb +11 -0
- metadata +32 -25
@@ -1,15 +1,26 @@
|
|
1
1
|
module DefinesConstants
|
2
2
|
def setup_constants
|
3
3
|
@defined_constants = []
|
4
|
+
@old_constants = []
|
4
5
|
end
|
5
6
|
|
6
7
|
def teardown_constants
|
7
8
|
@defined_constants.each do |constant|
|
8
9
|
Object.__send__(:remove_const, constant)
|
10
|
+
@old_constants.each do |old|
|
11
|
+
Object.const_set(old[:name], old[:constant])
|
12
|
+
end
|
9
13
|
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def define_constant(name, value)
|
17
|
+
begin
|
18
|
+
if old_constant = Object.const_get(name)
|
19
|
+
@old_constants << {:name => name, :constant => old_constant}
|
20
|
+
end
|
21
|
+
rescue NameError
|
22
|
+
end
|
23
|
+
|
13
24
|
Object.const_set(name, value)
|
14
25
|
@defined_constants << name
|
15
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crashlog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: activesupport
|
16
|
-
requirement: &70343404183900 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *70343404183900
|
25
14
|
- !ruby/object:Gem::Dependency
|
26
15
|
name: faraday
|
27
|
-
requirement: &
|
16
|
+
requirement: &70334148342160 !ruby/object:Gem::Requirement
|
28
17
|
none: false
|
29
18
|
requirements:
|
30
19
|
- - ~>
|
@@ -32,10 +21,10 @@ dependencies:
|
|
32
21
|
version: 0.8.4
|
33
22
|
type: :runtime
|
34
23
|
prerelease: false
|
35
|
-
version_requirements: *
|
24
|
+
version_requirements: *70334148342160
|
36
25
|
- !ruby/object:Gem::Dependency
|
37
26
|
name: multi_json
|
38
|
-
requirement: &
|
27
|
+
requirement: &70334148341620 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
29
|
requirements:
|
41
30
|
- - ~>
|
@@ -43,10 +32,10 @@ dependencies:
|
|
43
32
|
version: 1.3.6
|
44
33
|
type: :runtime
|
45
34
|
prerelease: false
|
46
|
-
version_requirements: *
|
35
|
+
version_requirements: *70334148341620
|
47
36
|
- !ruby/object:Gem::Dependency
|
48
37
|
name: crashlog-auth-hmac
|
49
|
-
requirement: &
|
38
|
+
requirement: &70334148340920 !ruby/object:Gem::Requirement
|
50
39
|
none: false
|
51
40
|
requirements:
|
52
41
|
- - ~>
|
@@ -54,10 +43,10 @@ dependencies:
|
|
54
43
|
version: 1.1.6
|
55
44
|
type: :runtime
|
56
45
|
prerelease: false
|
57
|
-
version_requirements: *
|
46
|
+
version_requirements: *70334148340920
|
58
47
|
- !ruby/object:Gem::Dependency
|
59
48
|
name: rabl
|
60
|
-
requirement: &
|
49
|
+
requirement: &70334148340160 !ruby/object:Gem::Requirement
|
61
50
|
none: false
|
62
51
|
requirements:
|
63
52
|
- - ! '>='
|
@@ -65,10 +54,10 @@ dependencies:
|
|
65
54
|
version: 0.6.14
|
66
55
|
type: :runtime
|
67
56
|
prerelease: false
|
68
|
-
version_requirements: *
|
57
|
+
version_requirements: *70334148340160
|
69
58
|
- !ruby/object:Gem::Dependency
|
70
59
|
name: uuid
|
71
|
-
requirement: &
|
60
|
+
requirement: &70334148339540 !ruby/object:Gem::Requirement
|
72
61
|
none: false
|
73
62
|
requirements:
|
74
63
|
- - ! '>='
|
@@ -76,10 +65,21 @@ dependencies:
|
|
76
65
|
version: '0'
|
77
66
|
type: :runtime
|
78
67
|
prerelease: false
|
79
|
-
version_requirements: *
|
68
|
+
version_requirements: *70334148339540
|
80
69
|
- !ruby/object:Gem::Dependency
|
81
70
|
name: hashr
|
82
|
-
requirement: &
|
71
|
+
requirement: &70334148338780 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70334148338780
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: json
|
82
|
+
requirement: &70334148337940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70334148337940
|
91
91
|
description: CrashLog Exception reporter
|
92
92
|
email:
|
93
93
|
- support@crashlog.io
|
@@ -107,11 +107,14 @@ files:
|
|
107
107
|
- crashlog.gemspec
|
108
108
|
- generators/crashlog/templates/initializer.rb
|
109
109
|
- install.rb
|
110
|
+
- lib/core_ext/hash/keys.rb
|
111
|
+
- lib/core_ext/kernel/require_relative.rb
|
110
112
|
- lib/crash_log.rb
|
111
113
|
- lib/crash_log/backtrace.rb
|
112
114
|
- lib/crash_log/backtrace/line.rb
|
113
115
|
- lib/crash_log/backtrace/line_cache.rb
|
114
116
|
- lib/crash_log/configuration.rb
|
117
|
+
- lib/crash_log/helpers.rb
|
115
118
|
- lib/crash_log/logging.rb
|
116
119
|
- lib/crash_log/payload.rb
|
117
120
|
- lib/crash_log/rack.rb
|
@@ -129,11 +132,14 @@ files:
|
|
129
132
|
- lib/faraday/request/hmac_authentication.rb
|
130
133
|
- lib/rails/generators/crashlog/crashlog_generator.rb
|
131
134
|
- rails/init.rb
|
135
|
+
- resources/README.md
|
136
|
+
- resources/ca-bundle.crt
|
132
137
|
- script/integration_test
|
133
138
|
- spec/crash_log/backtrace_spec.rb
|
134
139
|
- spec/crash_log/configuration_spec.rb
|
135
140
|
- spec/crash_log/initializer_spec.rb
|
136
141
|
- spec/crash_log/payload_spec.rb
|
142
|
+
- spec/crash_log/rack_spec.rb
|
137
143
|
- spec/crash_log/reporter_spec.rb
|
138
144
|
- spec/crash_log_spec.rb
|
139
145
|
- spec/dummy/README.rdoc
|
@@ -206,6 +212,7 @@ test_files:
|
|
206
212
|
- spec/crash_log/configuration_spec.rb
|
207
213
|
- spec/crash_log/initializer_spec.rb
|
208
214
|
- spec/crash_log/payload_spec.rb
|
215
|
+
- spec/crash_log/rack_spec.rb
|
209
216
|
- spec/crash_log/reporter_spec.rb
|
210
217
|
- spec/crash_log_spec.rb
|
211
218
|
- spec/dummy/README.rdoc
|