enabled airbrake

This commit is contained in:
Dan Elbert 2019-02-02 15:32:42 -06:00
parent 521c62d09b
commit d90f4f81bf
6 changed files with 156 additions and 87 deletions

13
Gemfile
View File

@ -1,24 +1,25 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'rails', '5.2.1' gem 'rails', '5.2.2'
gem 'pg', '~> 1.1.3' gem 'pg', '~> 1.1.4'
gem 'webpacker', '3.5.5' gem 'webpacker', '3.5.5'
gem 'bootsnap', '>= 1.1.0', require: false gem 'bootsnap', '>= 1.1.0', require: false
gem 'jbuilder', '~> 2.7' gem 'jbuilder', '~> 2.8'
#gem 'jbuilder', git: 'https://github.com/rails/jbuilder', branch: 'master' #gem 'jbuilder', git: 'https://github.com/rails/jbuilder', branch: 'master'
gem 'oj', '~> 3.6.8' gem 'oj', '~> 3.7.8'
gem 'kaminari', '~> 1.1.1' gem 'kaminari', '~> 1.1.1'
gem 'unitwise', '~> 2.2.0' gem 'unitwise', '~> 2.2.0'
gem 'redcarpet', '~> 3.4.0' gem 'redcarpet', '~> 3.4.0'
gem 'dalli', '~> 2.7.6' gem 'dalli', '~> 2.7.9'
gem 'airbrake', '~> 8.0.1'
# Use ActiveModel has_secure_password # Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.11' gem 'bcrypt', '~> 3.1.12'
gem 'tzinfo-data' gem 'tzinfo-data'

View File

@ -1,67 +1,71 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (5.2.1) actioncable (5.2.2)
actionpack (= 5.2.1) actionpack (= 5.2.2)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailer (5.2.1) actionmailer (5.2.2)
actionpack (= 5.2.1) actionpack (= 5.2.2)
actionview (= 5.2.1) actionview (= 5.2.2)
activejob (= 5.2.1) activejob (= 5.2.2)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.2.1) actionpack (5.2.2)
actionview (= 5.2.1) actionview (= 5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
rack (~> 2.0) rack (~> 2.0)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.1) actionview (5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.1) activejob (5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.2.1) activemodel (5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
activerecord (5.2.1) activerecord (5.2.2)
activemodel (= 5.2.1) activemodel (= 5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
arel (>= 9.0) arel (>= 9.0)
activestorage (5.2.1) activestorage (5.2.2)
actionpack (= 5.2.1) actionpack (= 5.2.2)
activerecord (= 5.2.1) activerecord (= 5.2.2)
marcel (~> 0.3.1) marcel (~> 0.3.1)
activesupport (5.2.1) activesupport (5.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
minitest (~> 5.1) minitest (~> 5.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
airbrake (8.0.1)
airbrake-ruby (~> 3.0)
airbrake-ruby (3.1.0)
tdigest (= 0.1.1)
arel (9.0.0) arel (9.0.0)
bcrypt (3.1.12) bcrypt (3.1.12)
bootsnap (1.3.2) bootsnap (1.3.2)
msgpack (~> 1.0) msgpack (~> 1.0)
builder (3.2.3) builder (3.2.3)
coderay (1.1.2) coderay (1.1.2)
concurrent-ruby (1.0.5) concurrent-ruby (1.1.4)
crass (1.0.4) crass (1.0.4)
dalli (2.7.8) dalli (2.7.9)
database_cleaner (1.7.0) database_cleaner (1.7.0)
diff-lcs (1.3) diff-lcs (1.3)
erubi (1.7.1) erubi (1.8.0)
factory_bot (4.11.1) factory_bot (4.11.1)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_bot_rails (4.11.1) factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1) factory_bot (~> 4.11.1)
railties (>= 3.0.0) railties (>= 3.0.0)
ffi (1.9.25) ffi (1.10.0)
formatador (0.2.5) formatador (0.2.5)
globalid (0.4.1) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
guard (2.14.2) guard (2.14.2)
formatador (>= 0.2.4) formatador (>= 0.2.4)
@ -77,9 +81,9 @@ GEM
guard (~> 2.1) guard (~> 2.1)
guard-compat (~> 1.1) guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0) rspec (>= 2.99.0, < 4.0)
i18n (1.1.0) i18n (1.5.3)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jbuilder (2.7.0) jbuilder (2.8.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
multi_json (>= 1.2) multi_json (>= 1.2)
kaminari (1.1.1) kaminari (1.1.1)
@ -99,74 +103,75 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2) ruby_dep (~> 1.2)
loofah (2.2.2) loofah (2.2.3)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
lumberjack (1.0.13) lumberjack (1.0.13)
mail (2.7.0) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
marcel (0.3.2) marcel (0.3.3)
mimemagic (~> 0.3.2) mimemagic (~> 0.3.2)
memoizable (0.4.2) memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
method_source (0.9.0) method_source (0.9.2)
mimemagic (0.3.2) mimemagic (0.3.3)
mini_mime (1.0.1) mini_mime (1.0.1)
mini_portile2 (2.3.0) mini_portile2 (2.4.0)
minitest (5.11.3) minitest (5.11.3)
msgpack (1.2.4) msgpack (1.2.6)
multi_json (1.13.1) multi_json (1.13.1)
nenv (0.3.0) nenv (0.3.0)
nio4r (2.3.1) nio4r (2.3.1)
nokogiri (1.8.4) nokogiri (1.10.1)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.4.0)
notiffany (0.1.1) notiffany (0.1.1)
nenv (~> 0.1) nenv (~> 0.1)
shellany (~> 0.0) shellany (~> 0.0)
oj (3.6.8) oj (3.7.8)
parslet (1.8.2) parslet (1.8.2)
pg (1.1.3) pg (1.1.4)
pry (0.11.3) pry (0.12.2)
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.9.0) method_source (~> 0.9.0)
puma (3.12.0) puma (3.12.0)
rack (2.0.5) rack (2.0.6)
rack-proxy (0.6.4) rack-proxy (0.6.5)
rack rack
rack-test (1.1.0) rack-test (1.1.0)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
rails (5.2.1) rails (5.2.2)
actioncable (= 5.2.1) actioncable (= 5.2.2)
actionmailer (= 5.2.1) actionmailer (= 5.2.2)
actionpack (= 5.2.1) actionpack (= 5.2.2)
actionview (= 5.2.1) actionview (= 5.2.2)
activejob (= 5.2.1) activejob (= 5.2.2)
activemodel (= 5.2.1) activemodel (= 5.2.2)
activerecord (= 5.2.1) activerecord (= 5.2.2)
activestorage (= 5.2.1) activestorage (= 5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
bundler (>= 1.3.0) bundler (>= 1.3.0)
railties (= 5.2.1) railties (= 5.2.2)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2) rails-controller-testing (1.0.4)
actionpack (~> 5.x, >= 5.0.1) actionpack (>= 5.0.1.x)
actionview (~> 5.x, >= 5.0.1) actionview (>= 5.0.1.x)
activesupport (~> 5.x) activesupport (>= 5.0.1.x)
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4) rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2) loofah (~> 2.2, >= 2.2.2)
railties (5.2.1) railties (5.2.2)
actionpack (= 5.2.1) actionpack (= 5.2.2)
activesupport (= 5.2.1) activesupport (= 5.2.2)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0) thor (>= 0.19.0, < 2.0)
rake (12.3.1) rake (12.3.2)
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.9.10) rb-inotify (0.10.0)
ffi (>= 0.5.0, < 2) ffi (~> 1.0)
rbtree (0.4.2)
redcarpet (3.4.0) redcarpet (3.4.0)
rspec (3.8.0) rspec (3.8.0)
rspec-core (~> 3.8.0) rspec-core (~> 3.8.0)
@ -174,13 +179,13 @@ GEM
rspec-mocks (~> 3.8.0) rspec-mocks (~> 3.8.0)
rspec-core (3.8.0) rspec-core (3.8.0)
rspec-support (~> 3.8.0) rspec-support (~> 3.8.0)
rspec-expectations (3.8.1) rspec-expectations (3.8.2)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0) rspec-support (~> 3.8.0)
rspec-mocks (3.8.0) rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0) rspec-support (~> 3.8.0)
rspec-rails (3.8.0) rspec-rails (3.8.2)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
@ -200,11 +205,13 @@ GEM
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.3.13) sqlite3 (1.3.13)
thor (0.20.0) tdigest (0.1.1)
rbtree (~> 0.4.2)
thor (0.20.3)
thread_safe (0.3.6) thread_safe (0.3.6)
tzinfo (1.2.5) tzinfo (1.2.5)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo-data (1.2018.5) tzinfo-data (1.2018.9)
tzinfo (>= 1.0.0) tzinfo (>= 1.0.0)
unitwise (2.2.0) unitwise (2.2.0)
liner (~> 0.2) liner (~> 0.2)
@ -223,19 +230,20 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
bcrypt (~> 3.1.11) airbrake (~> 8.0.1)
bcrypt (~> 3.1.12)
bootsnap (>= 1.1.0) bootsnap (>= 1.1.0)
dalli (~> 2.7.6) dalli (~> 2.7.9)
database_cleaner (~> 1.7.0) database_cleaner (~> 1.7.0)
factory_bot_rails (~> 4.11.1) factory_bot_rails (~> 4.11.1)
guard (~> 2.14.2) guard (~> 2.14.2)
guard-rspec guard-rspec
jbuilder (~> 2.7) jbuilder (~> 2.8)
kaminari (~> 1.1.1) kaminari (~> 1.1.1)
oj (~> 3.6.8) oj (~> 3.7.8)
pg (~> 1.1.3) pg (~> 1.1.4)
puma (~> 3.12) puma (~> 3.12)
rails (= 5.2.1) rails (= 5.2.2)
rails-controller-testing rails-controller-testing
redcarpet (~> 3.4.0) redcarpet (~> 3.4.0)
rspec-rails (~> 3.8.0) rspec-rails (~> 3.8.0)
@ -245,4 +253,4 @@ DEPENDENCIES
webpacker (= 3.5.5) webpacker (= 3.5.5)
BUNDLED WITH BUNDLED WITH
1.16.4 2.0.1

View File

@ -0,0 +1,59 @@
Airbrake.configure do |c|
c.host = 'https://errbit.elbert.us'
c.project_id = 13
c.project_key = 'd2344e1439d68f942ee8fa09f18e69c6'
# Configures the root directory of your project. Expects a String or a
# Pathname, which represents the path to your project. Providing this option
# helps us to filter out repetitive data from backtrace frames and link to
# GitHub files from our dashboard.
# https://github.com/airbrake/airbrake-ruby#root_directory
c.root_directory = Rails.root
# By default, Airbrake Ruby outputs to STDOUT. In Rails apps it makes sense to
# use the Rails' logger.
# https://github.com/airbrake/airbrake-ruby#logger
c.logger = Rails.logger
# Configures the environment the application is running in. Helps the Airbrake
# dashboard to distinguish between exceptions occurring in different
# environments.
# NOTE: This option must be set in order to make the 'ignore_environments'
# option work.
# https://github.com/airbrake/airbrake-ruby#environment
c.environment = Rails.env
# Setting this option allows Airbrake to filter exceptions occurring in
# unwanted environments such as :test.
# NOTE: This option *does not* work if you don't set the 'environment' option.
# https://github.com/airbrake/airbrake-ruby#ignore_environments
c.ignore_environments = %w[test]
# A list of parameters that should be filtered out of what is sent to
# Airbrake. By default, all "password" attributes will have their contents
# replaced.
# https://github.com/airbrake/airbrake-ruby#blacklist_keys
c.blacklist_keys = [/password/i, /authorization/i]
# Alternatively, you can integrate with Rails' filter_parameters.
# Read more: https://goo.gl/gqQ1xS
# c.blacklist_keys = Rails.application.config.filter_parameters
end
# A filter that collects request body information. Enable it if you are sure you
# don't send sensitive information to Airbrake in your body (such as passwords).
# https://github.com/airbrake/airbrake#requestbodyfilter
# Airbrake.add_filter(Airbrake::Rack::RequestBodyFilter.new)
# Attaches thread & fiber local variables along with general thread information.
# Airbrake.add_filter(Airbrake::Filters::ThreadFilter.new)
# Attaches loaded dependencies to the notice object
# (under context/versions/dependencies).
# Airbrake.add_filter(Airbrake::Filters::DependencyFilter.new)
# If you want to convert your log messages to Airbrake errors, we offer an
# integration with the Logger class from stdlib.
# https://github.com/airbrake/airbrake#logger
# Rails.logger = Airbrake::AirbrakeLogger.new(Rails.logger)

View File

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_09_15_004420) do ActiveRecord::Schema.define(version: 2018_09_15_134841) do
create_table "food_units", force: :cascade do |t| create_table "food_units", force: :cascade do |t|
t.integer "food_id", null: false t.integer "food_id", null: false
@ -25,7 +25,7 @@ ActiveRecord::Schema.define(version: 2018_09_15_004420) do
t.text "notes" t.text "notes"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "ndbn", limit: 5 t.string "ndbn", limit: 25
t.decimal "water", precision: 10, scale: 2 t.decimal "water", precision: 10, scale: 2
t.decimal "protein", precision: 10, scale: 2 t.decimal "protein", precision: 10, scale: 2
t.decimal "lipids", precision: 10, scale: 2 t.decimal "lipids", precision: 10, scale: 2

View File

@ -3,7 +3,7 @@
"@rails/webpacker": "^3.5.5", "@rails/webpacker": "^3.5.5",
"@tweenjs/tween.js": "^17.2.0", "@tweenjs/tween.js": "^17.2.0",
"autosize": "^4.0.1", "autosize": "^4.0.1",
"bulma": "^0.7.1", "bulma": "^0.7.2",
"caniuse-lite": "^1.0.30000815", "caniuse-lite": "^1.0.30000815",
"cheerio": "^1.0.0-rc.2", "cheerio": "^1.0.0-rc.2",
"css-loader": "^0.28.11", "css-loader": "^0.28.11",

View File

@ -1020,9 +1020,10 @@ builtin-status-codes@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
bulma@^0.7.1: bulma@^0.7.2:
version "0.7.1" version "0.7.2"
resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.1.tgz#73c2e3b2930c90cc272029cbd19918b493fca486" resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.2.tgz#8e944377b74c7926558830d38d8e19eaf49f5fb6"
integrity sha512-6JHEu8U/1xsyOst/El5ImLcZIiE2JFXgvrz8GGWbnDLwTNRPJzdAM0aoUM1Ns0avALcVb6KZz9NhzmU53dGDcQ==
bytes@3.0.0: bytes@3.0.0:
version "3.0.0" version "3.0.0"