ramon 0.2.0 → 0.2.1

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/init.rb CHANGED
@@ -1,5 +1,3 @@
1
- # Load the exception handler
2
- # Aplicable only for Rails apps
3
1
  require 'ramon'
4
2
 
5
3
  require File.join('amon', 'integration', 'rails')
data/lib/ramon.rb CHANGED
@@ -10,6 +10,9 @@ require_local "exception_data"
10
10
  require_local "controller_exception_data"
11
11
  require_local "enviroment_data"
12
12
 
13
+ require_local 'integration/rails' if defined?(Rails)
14
+ require_local 'railtie' if defined?(Rails)
15
+
13
16
  module Ramon
14
17
  def self.log(message, level=nil)
15
18
  log_hash = Log.log(message, level)
@@ -0,0 +1,11 @@
1
+ require 'ramon'
2
+ require 'rails'
3
+
4
+ module Ramon
5
+ class Railtie < Rails::Railtie
6
+ initializer "amon.middleware" do |app|
7
+ app.config.middleware.use "Rack::RailsAmonException"
8
+ end
9
+ end
10
+ end
11
+
data/lib/ramon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ramon
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ramon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - martinrusev
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-14 00:00:00 +00:00
18
+ date: 2011-11-15 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -54,9 +54,9 @@ files:
54
54
  - lib/ramon/exception_data.rb
55
55
  - lib/ramon/integration/rails.rb
56
56
  - lib/ramon/logger.rb
57
+ - lib/ramon/railtie.rb
57
58
  - lib/ramon/remote.rb
58
59
  - lib/ramon/version.rb
59
- - rails/init.rb
60
60
  - ramon.gemspec
61
61
  has_rdoc: true
62
62
  homepage: http://amon.cx
data/rails/init.rb DELETED
@@ -1 +0,0 @@
1
- require File.join(File.dirname(__FILE__) , '../init.rb')