errordite 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +6 -0
- data/Gemfile +5 -0
- data/Guardfile +24 -0
- data/LICENSE.txt +22 -0
- data/README.md +23 -0
- data/Rakefile +20 -0
- data/errordite-rack.gemspec +21 -0
- data/errordite-rails.gemspec +21 -0
- data/errordite.gemspec +28 -0
- data/examples/rack/Gemfile +4 -0
- data/examples/rack/config.ru +7 -0
- data/examples/rails/.gitignore +16 -0
- data/examples/rails/Gemfile +36 -0
- data/examples/rails/README.rdoc +28 -0
- data/examples/rails/Rakefile +6 -0
- data/examples/rails/app/assets/images/.keep +0 -0
- data/examples/rails/app/assets/javascripts/application.js +16 -0
- data/examples/rails/app/assets/stylesheets/application.css +13 -0
- data/examples/rails/app/controllers/application_controller.rb +5 -0
- data/examples/rails/app/controllers/concerns/.keep +0 -0
- data/examples/rails/app/helpers/application_helper.rb +2 -0
- data/examples/rails/app/mailers/.keep +0 -0
- data/examples/rails/app/models/.keep +0 -0
- data/examples/rails/app/models/concerns/.keep +0 -0
- data/examples/rails/app/views/layouts/application.html.erb +14 -0
- data/examples/rails/bin/bundle +3 -0
- data/examples/rails/bin/rails +4 -0
- data/examples/rails/bin/rake +4 -0
- data/examples/rails/config.ru +4 -0
- data/examples/rails/config/application.rb +23 -0
- data/examples/rails/config/boot.rb +4 -0
- data/examples/rails/config/database.yml +25 -0
- data/examples/rails/config/environment.rb +5 -0
- data/examples/rails/config/environments/development.rb +29 -0
- data/examples/rails/config/environments/production.rb +80 -0
- data/examples/rails/config/environments/test.rb +36 -0
- data/examples/rails/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/rails/config/initializers/inflections.rb +16 -0
- data/examples/rails/config/initializers/mime_types.rb +5 -0
- data/examples/rails/config/initializers/secret_token.rb +12 -0
- data/examples/rails/config/initializers/session_store.rb +3 -0
- data/examples/rails/config/initializers/wrap_parameters.rb +14 -0
- data/examples/rails/config/locales/en.yml +23 -0
- data/examples/rails/config/routes.rb +56 -0
- data/examples/rails/db/seeds.rb +7 -0
- data/examples/rails/lib/assets/.keep +0 -0
- data/examples/rails/lib/tasks/.keep +0 -0
- data/examples/rails/log/.keep +0 -0
- data/examples/rails/public/404.html +58 -0
- data/examples/rails/public/422.html +58 -0
- data/examples/rails/public/500.html +57 -0
- data/examples/rails/public/favicon.ico +0 -0
- data/examples/rails/public/robots.txt +5 -0
- data/lib/errordite-rails.rb +7 -0
- data/lib/errordite.rb +33 -0
- data/lib/errordite/client.rb +44 -0
- data/lib/errordite/config.rb +44 -0
- data/lib/errordite/rack.rb +22 -0
- data/lib/errordite/serializer.rb +62 -0
- data/lib/errordite/version.rb +3 -0
- data/spec/lib/errordite/client_spec.rb +64 -0
- data/spec/lib/errordite/config_spec.rb +61 -0
- data/spec/lib/errordite/serializer_spec.rb +66 -0
- data/spec/lib/errordite_spec.rb +34 -0
- data/spec/spec_helper.rb +1 -0
- metadata +214 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3bb7e8209b3537789911d8a8e3b7f54a2cdb53e0
|
4
|
+
data.tar.gz: ce35f91845c4b98c27873de43d11d5d613ee6c28
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 040f7bf811dc52c428dcb649f6e849fad80129e0978f39196993e98413ef6f537ea60a826db0043c6cc3c276cb58da9b971a19b13307c8fe049755cde2afbac1
|
7
|
+
data.tar.gz: e0794c50108be962117e22cf5559f9da58315369597b7a0b3c823211bdc5a23ffc491d3491f66724b5fc6c56448afd466125ff1f93936421e2ad570a21596db6
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'rspec' do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
|
9
|
+
# Rails example
|
10
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
11
|
+
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
12
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
13
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
14
|
+
watch('config/routes.rb') { "spec/routing" }
|
15
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
16
|
+
|
17
|
+
# Capybara features specs
|
18
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
19
|
+
|
20
|
+
# Turnip features and steps
|
21
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
22
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
23
|
+
end
|
24
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Tom Ward
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Errordite
|
2
|
+
|
3
|
+
A ruby client for https://www.errordite.com
|
4
|
+
|
5
|
+
## Adding errordite to your application
|
6
|
+
|
7
|
+
There are different gems for general, rack, and rails applications, so add either `errordite`, `errordite-rack` or `errordite-rails` to your `Gemfile` and reinstall the bundle.
|
8
|
+
|
9
|
+
For rails applications, errordite will automatically be added to capture and log all errors thrown during a request. For rack applications, you'll need to explicitly add rack middleware, adding something like this to your `config.ru` file:
|
10
|
+
|
11
|
+
use Errordite::Rack
|
12
|
+
|
13
|
+
## Setting the errordite api token
|
14
|
+
|
15
|
+
Errordite uses a unique api token to identify users, and you'll need to set this before it can record errors. This can be done in one of two ways. The first (and preferred method) is to set the environment variable `ERRORDITE_TOKEN` with your API key. If this isn't possible you can also directly set `Errordite.config.api_key`.
|
16
|
+
|
17
|
+
## Capturing non-request related errors
|
18
|
+
|
19
|
+
Using `errordite-rail` or adding the `Errordite::Rack` middleware will capture errors that occur during a request to your application, but it's also useful to capture errors that happen outside a web process. An example might be errors from a job queue or similar. This is easy to achieve, using `Errordite.monitor(&block)`. e.g.:
|
20
|
+
|
21
|
+
Errordite.monitor do
|
22
|
+
ErrorProneQueue.process_next_job
|
23
|
+
end
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'bundler/gem_helper'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
gems = ['errordite', 'errordite-rack', 'errordite-rails']
|
7
|
+
gems.each do |gem|
|
8
|
+
namespace gem do
|
9
|
+
Bundler::GemHelper.install_tasks name: gem
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'build all gems'
|
14
|
+
task build: gems.map {|g| "#{g}:build"}
|
15
|
+
desc 'install all gems'
|
16
|
+
task install: gems.map {|g| "#{g}:install"}
|
17
|
+
desc 'release all gems'
|
18
|
+
task release: gems.map {|g| "#{g}:release"}
|
19
|
+
|
20
|
+
task :default => :spec
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'errordite/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "errordite-rack"
|
8
|
+
spec.version = Errordite::VERSION
|
9
|
+
spec.authors = ["Tom Ward"]
|
10
|
+
spec.email = ["tom@popdog.net"]
|
11
|
+
spec.description = %q{A rack client for www.errordite.com}
|
12
|
+
spec.summary = %q{A rack client for www.errordite.com}
|
13
|
+
spec.homepage = "https://www.errordite.com"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = ["lib/errordite-rack.rb", "lib/errordite/version.rb"]
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_dependency "errordite", Errordite::VERSION
|
20
|
+
spec.add_dependency "rack"
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'errordite/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "errordite-rails"
|
8
|
+
spec.version = Errordite::VERSION
|
9
|
+
spec.authors = ["Tom Ward"]
|
10
|
+
spec.email = ["tom@popdog.net"]
|
11
|
+
spec.description = %q{A rails client for www.errordite.com}
|
12
|
+
spec.summary = %q{A rails client for www.errordite.com}
|
13
|
+
spec.homepage = "https://www.errordite.com"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = ["lib/errordite-rails.rb", "lib/errordite/version.rb"]
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_dependency "errordite", Errordite::VERSION
|
20
|
+
spec.add_dependency "rails"
|
21
|
+
end
|
data/errordite.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'errordite/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "errordite"
|
8
|
+
spec.version = Errordite::VERSION
|
9
|
+
spec.authors = ["Tom Ward"]
|
10
|
+
spec.email = ["tom@popdog.net"]
|
11
|
+
spec.description = %q{A ruby client for www.errordite.com}
|
12
|
+
spec.summary = %q{A ruby client for www.errordite.com}
|
13
|
+
spec.homepage = "https://www.errordite.com"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.files = `git ls-files`.split($/) - ["lib/errordite-rack.rb"]
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_dependency "json"
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
spec.add_development_dependency "guard"
|
26
|
+
spec.add_development_dependency "rb-fsevent"
|
27
|
+
spec.add_development_dependency "guard-rspec"
|
28
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
@@ -0,0 +1,36 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
4
|
+
gem 'rails', '4.0.0'
|
5
|
+
|
6
|
+
# Use sqlite3 as the database for Active Record
|
7
|
+
gem 'sqlite3'
|
8
|
+
|
9
|
+
# Use SCSS for stylesheets
|
10
|
+
gem 'sass-rails', '~> 4.0.0'
|
11
|
+
|
12
|
+
# Use Uglifier as compressor for JavaScript assets
|
13
|
+
gem 'uglifier', '>= 1.3.0'
|
14
|
+
|
15
|
+
# Use CoffeeScript for .js.coffee assets and views
|
16
|
+
gem 'coffee-rails', '~> 4.0.0'
|
17
|
+
|
18
|
+
|
19
|
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
20
|
+
# gem 'therubyracer', platforms: :ruby
|
21
|
+
|
22
|
+
# Use jquery as the JavaScript library
|
23
|
+
gem 'jquery-rails'
|
24
|
+
|
25
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
26
|
+
gem 'turbolinks'
|
27
|
+
|
28
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
29
|
+
gem 'jbuilder', '~> 1.2'
|
30
|
+
|
31
|
+
group :doc do
|
32
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
33
|
+
gem 'sdoc', require: false
|
34
|
+
end
|
35
|
+
|
36
|
+
gem 'errordite-rails', path: "../.."
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>ExampleApp</title>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env)
|
8
|
+
|
9
|
+
module ExampleApp
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: sqlite3
|
8
|
+
database: db/development.sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
13
|
+
# re-generated from your development database when you run "rake".
|
14
|
+
# Do not set this db to the same as development or production.
|
15
|
+
test:
|
16
|
+
adapter: sqlite3
|
17
|
+
database: db/test.sqlite3
|
18
|
+
pool: 5
|
19
|
+
timeout: 5000
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: sqlite3
|
23
|
+
database: db/production.sqlite3
|
24
|
+
pool: 5
|
25
|
+
timeout: 5000
|