errplane 0.1.0 → 0.1.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/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use ruby-1.9.3-p125@errplane_rails --create
1
+ rvm use ruby-1.9.3-p194@errplane_rails --create
@@ -1,9 +1,42 @@
1
1
  require 'errplane'
2
2
  require 'rails'
3
+ require 'rack'
3
4
 
4
5
  module Errplane
5
6
  class Railtie < ::Rails::Railtie
6
7
  rake_tasks do
8
+ namespace :errplane do
9
+ task :test => :environment do
10
+ if Errplane.configuration.api_key.nil?
11
+ puts "Hey, you need to define an API key first. Run `rails g errplane <api-key>` if you didn't already."
12
+ exit
13
+ end
14
+
15
+ Errplane.configure do |config|
16
+ config.ignored_environments = []
17
+ end
18
+
19
+ class ::ErrplaneSampleException < Exception; end;
20
+
21
+ puts "Setting up ApplicationController.."
22
+ class ::ApplicationController < ::ActionController::Base
23
+ def test_action
24
+ raise ::ErrplaneSampleException.new("If you see this, Errplane is working.")
25
+ end
26
+ end
27
+
28
+ ::Rails.application.routes_reloader.execute_if_updated
29
+ ::Rails.application.routes.draw do
30
+ match 'generate_sample_exception' => 'application#test_action'
31
+ end
32
+
33
+ puts "Generating sample request.."
34
+ env = ::Rack::MockRequest.env_for("/generate_sample_exception")
35
+ ::Rails.application.call(env)
36
+
37
+ puts "Done. Check your email or http://errplane.com for the exception notice."
38
+ end
39
+ end
7
40
  end
8
41
 
9
42
  initializer "errplane.insert_rack_middleware" do |app|
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errplane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: