errorception-rails 0.1.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.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MmEwNmM3ZGQyMWRmOTFlNjIyNDBiNmZmNWFmOWZiODgwYzRjMDYzZg==
5
+ data.tar.gz: !binary |-
6
+ ZTU3ZTcwN2NjYzZmN2E3MjMwNmNhZTc1NWRiYzk0NWMxYjUxNTdjZQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NGNhM2Y4ZWNjMjNiYjY0ZGE0N2Y0MzJjNDJjZGYzODY5NDc3NWY0OGQ5MGE4
10
+ YzgzNjk5ZGU0ZWU1ODEzZmQ0ZTQxZWQyZDliM2I0NjJkMGFjMTY4MmE3NzQ0
11
+ ZTM2ZTgzOTAyMDY5NTVmMTAwMzQ3ODdiZWFlMjI3MzdjMTMzM2Q=
12
+ data.tar.gz: !binary |-
13
+ ZWMyZWMxYjNkMzE2NjQ2NDhkYTc5ODY2ZWNjMDUzY2VhZmI0NmRmZThjNjRi
14
+ ZDkxMTUzMDgwOWY5M2QwODYwMzQ5MmJkMDAyYzUxYzlkOGJhNTg2MDQ4Y2Rk
15
+ OWU2YTZhOTQ4YTE5OWUzMTIyMjNkMWEyNDFkOTdhMjE2NzAwOTg=
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ /.idea
19
+ /coverage*
20
+ Gemfile.lock
@@ -0,0 +1 @@
1
+ ruby-1-9-default
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in errorception.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Thomas Baustert
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,58 @@
1
+ # Errorception-Rails
2
+
3
+ Add [errorception](http://errorception.com) to your Rails app.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'errorception-rails', require: 'errorception_rails'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install errorception-rails
18
+
19
+ # your file.rb
20
+ require 'errorception_rails'
21
+
22
+ ## Usage
23
+
24
+ Include the JavaScript snippet into your pages **before** any other script tag.
25
+ Ideally, you'll want to put this close to the very top in your `<head>` tag.
26
+
27
+ <head>
28
+ ...
29
+ <%= javascript_include_tag 'errorception_rails/errorception' %>
30
+ <%= javascript_include_tag 'application' %>
31
+ ...
32
+
33
+ When using Rails asset pipeline include this file at the top of the manifest:
34
+
35
+ # app/assets/javascripts/application.js
36
+ ...
37
+ //
38
+ //= require errorception_rails/errorception
39
+ //= ...
40
+
41
+ Errorception is disabled by default. Enable it typically in production only via:
42
+
43
+ # config/environments/production.rb
44
+ ...
45
+ config.errorception.api_key = "YOUR API KEY"
46
+ config.errorception.enabled = true
47
+ ...
48
+
49
+ Or in all environments:
50
+
51
+ # config/application.rb
52
+ ...
53
+ config.errorception.api_key = "YOUR API KEY"
54
+ config.errorception.enabled = true
55
+ ...
56
+
57
+
58
+
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'errorception_rails/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "errorception-rails"
8
+ gem.version = ErrorceptionRails::VERSION
9
+ gem.authors = ["Thomas Baustert"]
10
+ gem.email = ["business@thomasbaustert.de"]
11
+ gem.description = %q{Add errorception to your Rails app}
12
+ gem.summary = %q{Add errorception to your Rails app}
13
+ gem.homepage = "https://github.com/thomasbaustert/errorception-rails"
14
+ gem.license = 'MIT'
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency 'rake'
21
+ end
@@ -0,0 +1,9 @@
1
+ <% if !Rails.application.config.errorception.api_key.blank? && Rails.application.config.errorception.enabled %>
2
+ (function(_,e,rr,s){_errs=[s];var c=_.onerror;_.onerror=function(){var a=arguments;_errs.push(a);
3
+ c&&c.apply(this,a)};var b=function(){var c=e.createElement(rr),b=e.getElementsByTagName(rr)[0];
4
+ c.src="//beacon.errorception.com/"+s+".js";c.async=!0;b.parentNode.insertBefore(c,b)};
5
+ _.addEventListener?_.addEventListener("load",b,!1):_.attachEvent("onload",b)})
6
+ (window,document,"script","<%= Rails.application.config.errorception.api_key %>");
7
+ <% else %>
8
+ // errorception is not enabled.
9
+ <% end %>
@@ -0,0 +1,6 @@
1
+ require "errorception_rails/engine"
2
+ require "errorception_rails/version"
3
+
4
+ module ErrorceptionRails
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,7 @@
1
+ module ErrorceptionRails
2
+ class Engine < ::Rails::Engine
3
+ config.errorception = ActiveSupport::OrderedOptions.new
4
+ config.errorception.enabled = false
5
+ config.errorception.api_key = nil
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module ErrorceptionRails
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: errorception-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Thomas Baustert
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Add errorception to your Rails app
28
+ email:
29
+ - business@thomasbaustert.de
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - .ruby-version
36
+ - Gemfile
37
+ - LICENSE
38
+ - README.md
39
+ - Rakefile
40
+ - errorception-rails.gemspec
41
+ - lib/assets/javascripts/errorception_rails/errorception.js.erb
42
+ - lib/errorception_rails.rb
43
+ - lib/errorception_rails/engine.rb
44
+ - lib/errorception_rails/version.rb
45
+ homepage: https://github.com/thomasbaustert/errorception-rails
46
+ licenses:
47
+ - MIT
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 2.2.1
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Add errorception to your Rails app
69
+ test_files: []