dumper 1.2.1 → 1.3.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.
- data/README.md +3 -3
- data/lib/dumper/agent.rb +6 -2
- data/lib/dumper/version.rb +1 -1
- metadata +4 -9
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
* Rails 3.0 or later
|
9
9
|
* MySQL with ActiveRecord
|
10
10
|
* PostgreSQL with ActiveRecord
|
11
|
-
* MongoDB with
|
11
|
+
* MongoDB with Mongoid or MongoMapper
|
12
12
|
* Redis with the redis gem - **limitation: you must run agent on the Redis host**
|
13
13
|
* Agent runs inside [thin](http://code.macournoyer.com/thin/), [unicorn](http://unicorn.bogomips.org/), [passenger](http://www.modrails.com/) or [resque](https://github.com/defunkt/resque) (mongrel and webrick are also supported for development)
|
14
14
|
|
@@ -68,10 +68,10 @@ If you are using resque, it's a good idea to run it on the same host with Redis,
|
|
68
68
|
|
69
69
|
## Debugging
|
70
70
|
|
71
|
-
If the agent doesn't seem to work, pass `
|
71
|
+
If the agent doesn't seem to work, pass `true` to the `debug` option.
|
72
72
|
|
73
73
|
```ruby
|
74
|
-
Dumper::Agent.start(app_key: '
|
74
|
+
Dumper::Agent.start(app_key: 'YOUR_APP_KEY', debug: true)
|
75
75
|
```
|
76
76
|
|
77
77
|
It gives verbose logging that helps us to understand the problem.
|
data/lib/dumper/agent.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'timeout'
|
2
2
|
require 'net/http'
|
3
|
+
require 'multi_json' # necessary for Rails 3.0.x!
|
3
4
|
|
4
5
|
module Dumper
|
5
6
|
class Agent
|
@@ -36,11 +37,14 @@ module Dumper
|
|
36
37
|
@app_key = options[:app_key]
|
37
38
|
@app_env = @stack.rails_env
|
38
39
|
@app_name = ObjectSpace.each_object(Rails::Application).first.class.name.split("::").first
|
39
|
-
|
40
|
+
if options[:debug]
|
41
|
+
logger.level = stdout_logger.level = Logger::DEBUG
|
42
|
+
Thread.abort_on_exception = true
|
43
|
+
end
|
40
44
|
end
|
41
45
|
|
42
46
|
def start
|
43
|
-
log "stack: #{@stack.to_hash}", :debug
|
47
|
+
log "stack: #{@stack.to_hash} - supported: #{@stack.supported?}", :debug
|
44
48
|
return unless @stack.supported?
|
45
49
|
|
46
50
|
@loop_thread = Thread.new { start_loop }
|
data/lib/dumper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -215,24 +215,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
215
|
- - ! '>='
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: '0'
|
218
|
-
segments:
|
219
|
-
- 0
|
220
|
-
hash: 229918553143605081
|
221
218
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
219
|
none: false
|
223
220
|
requirements:
|
224
221
|
- - ! '>='
|
225
222
|
- !ruby/object:Gem::Version
|
226
223
|
version: '0'
|
227
|
-
segments:
|
228
|
-
- 0
|
229
|
-
hash: 229918553143605081
|
230
224
|
requirements: []
|
231
225
|
rubyforge_project:
|
232
|
-
rubygems_version: 1.8.
|
226
|
+
rubygems_version: 1.8.19
|
233
227
|
signing_key:
|
234
228
|
specification_version: 3
|
235
229
|
summary: The Dumper Agent for Rails (coming soon!)
|
236
230
|
test_files:
|
237
231
|
- spec/dumper_spec.rb
|
238
232
|
- spec/spec_helper.rb
|
233
|
+
has_rdoc:
|