-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
121 changed files
with
7,813 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
app/Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG RUBY_VERSION | ||
FROM ruby:$RUBY_VERSION | ||
|
||
RUN apt-get update | ||
|
||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | ||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
|
||
RUN apt-get install -y nodejs yarn | ||
|
||
WORKDIR /bugsnag | ||
COPY temp-bugsnag-lib ./ | ||
|
||
WORKDIR /usr/src/app | ||
COPY app/Gemfile /usr/src/app/ | ||
RUN bundle install | ||
|
||
RUN cat Gemfile.lock | ||
|
||
COPY app/ /usr/src/app | ||
|
||
RUN bundle exec rake db:migrate | ||
|
||
RUN bundle exec rake app:update:bin | ||
|
||
CMD ["bundle", "exec", "bin/rails", "s", "-b", "0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | ||
# | ||
# If you find yourself ignoring temporary files generated by your text editor | ||
# or operating system, you probably want to add a global ignore instead: | ||
# git config --global core.excludesfile '~/.gitignore_global' | ||
|
||
# Ignore bundler config. | ||
/.bundle | ||
|
||
# Ignore the default SQLite database. | ||
/db/*.sqlite3 | ||
/db/*.sqlite3-journal | ||
|
||
# Ignore all logfiles and tempfiles. | ||
/log/* | ||
/tmp/* | ||
!/log/.keep | ||
!/tmp/.keep | ||
|
||
# Ignore uploaded files in development. | ||
/storage/* | ||
!/storage/.keep | ||
|
||
/public/assets | ||
.byebug_history | ||
|
||
# Ignore master key for decrypting credentials and more. | ||
/config/master.key | ||
|
||
/public/packs | ||
/public/packs-test | ||
/node_modules | ||
/yarn-error.log | ||
yarn-debug.log* | ||
.yarn-integrity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
source 'https://rubygems.org' | ||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | ||
|
||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | ||
gem 'rails', '~> 6.0.0.beta3' | ||
# Use sqlite3 as the database for Active Record | ||
gem 'sqlite3', '~> 1.3', '>= 1.3.6' | ||
# Use Puma as the app server | ||
gem 'puma', '~> 3.11' | ||
# Use SCSS for stylesheets | ||
gem 'sass-rails', '~> 5.0' | ||
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker | ||
gem 'webpacker', '>= 4.0.0.rc.3' | ||
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks | ||
gem 'turbolinks', '~> 5' | ||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | ||
gem 'jbuilder', '~> 2.5' | ||
# Use Redis adapter to run Action Cable in production | ||
# gem 'redis', '~> 4.0' | ||
# Use Active Model has_secure_password | ||
# gem 'bcrypt', '~> 3.1.7' | ||
|
||
# Use Active Storage variant | ||
# gem 'image_processing', '~> 1.2' | ||
|
||
# Reduces boot times through caching; required in config/boot.rb | ||
gem 'bootsnap', '>= 1.4.1', require: false | ||
|
||
group :development, :test do | ||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console | ||
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] | ||
end | ||
|
||
group :development do | ||
# Access an interactive console on exception pages or by calling 'console' anywhere in the code. | ||
gem 'web-console', '>= 3.3.0' | ||
gem 'listen', '>= 3.0.5', '< 3.2' | ||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | ||
gem 'spring' | ||
gem 'spring-watcher-listen', '~> 2.0.0' | ||
end | ||
|
||
group :test do | ||
# Adds support for Capybara system testing and selenium driver | ||
gem 'capybara', '>= 2.15' | ||
gem 'selenium-webdriver' | ||
# Easy installation and use of chromedriver to run system tests with Chrome | ||
gem 'chromedriver-helper' | ||
end | ||
|
||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] | ||
|
||
# Added at 2019-04-24 17:24:14 +0100 by amoinet: | ||
gem "bugsnag", "~> 6.11" | ||
|
||
gem "clearance", "~> 1.16" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# README | ||
|
||
This README would normally document whatever steps are necessary to get the | ||
application up and running. | ||
|
||
Things you may want to cover: | ||
|
||
* Ruby version | ||
|
||
* System dependencies | ||
|
||
* Configuration | ||
|
||
* Database creation | ||
|
||
* Database initialization | ||
|
||
* How to run the test suite | ||
|
||
* Services (job queues, cache servers, search engines, etc.) | ||
|
||
* Deployment instructions | ||
|
||
* ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Add your own tasks in files placed in lib/tasks ending in .rake, | ||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | ||
|
||
require_relative 'config/application' | ||
|
||
Rails.application.load_tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//= link_tree ../images | ||
//= link_directory ../stylesheets .css |
Empty file.
15 changes: 15 additions & 0 deletions
15
features/fixtures/rails6/app/app/assets/stylesheets/application.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* This is a manifest file that'll be compiled into application.css, which will include all the files | ||
* listed below. | ||
* | ||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's | ||
* vendor/assets/stylesheets directory can be referenced here using a relative path. | ||
* | ||
* You're free to add application-wide styles to this file and they'll appear at the bottom of the | ||
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS | ||
* files in this directory. Styles in this file should be added after the last require_* statement. | ||
* It is generally better to create a new file per style scope. | ||
* | ||
*= require_tree . | ||
*= require_self | ||
*/ |
4 changes: 4 additions & 0 deletions
4
features/fixtures/rails6/app/app/channels/application_cable/channel.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
end | ||
end |
4 changes: 4 additions & 0 deletions
4
features/fixtures/rails6/app/app/channels/application_cable/connection.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module ApplicationCable | ||
class Connection < ActionCable::Connection::Base | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
features/fixtures/rails6/app/app/controllers/api_key_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class ApiKeyController < ActionController::Base | ||
protect_from_forgery | ||
|
||
def environment | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
|
||
def changing | ||
Bugsnag.configure do |conf| | ||
conf.api_key = params[:api_key] | ||
end | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
features/fixtures/rails6/app/app/controllers/app_type_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class AppTypeController < ActionController::Base | ||
protect_from_forgery | ||
|
||
def initializer | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
|
||
def after | ||
Bugsnag.configure do |conf| | ||
conf.app_type = params[:type] | ||
end | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
end |
21 changes: 21 additions & 0 deletions
21
features/fixtures/rails6/app/app/controllers/app_version_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class AppVersionController < ActionController::Base | ||
protect_from_forgery | ||
|
||
def default | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
|
||
def initializer | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
|
||
def after | ||
Bugsnag.configure do |conf| | ||
conf.app_version = params[:version] | ||
end | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
features/fixtures/rails6/app/app/controllers/application_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class ApplicationController < ActionController::Base | ||
protect_from_forgery | ||
|
||
def index | ||
render json: {} | ||
end | ||
end |
27 changes: 27 additions & 0 deletions
27
features/fixtures/rails6/app/app/controllers/auto_notify_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class AutoNotifyController < ActionController::Base | ||
protect_from_forgery | ||
|
||
def unhandled | ||
generate_unhandled_error | ||
end | ||
|
||
def handled | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
|
||
def unhandled_after | ||
Bugsnag.configure do |conf| | ||
conf.auto_notify = false | ||
end | ||
generate_unhandled_error | ||
end | ||
|
||
def handled_after | ||
Bugsnag.configure do |conf| | ||
conf.auto_notify = false | ||
end | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
end |
40 changes: 40 additions & 0 deletions
40
features/fixtures/rails6/app/app/controllers/before_notify_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
class BeforeNotifyController < ActionController::Base | ||
protect_from_forgery | ||
before_bugsnag_notify :add_diagnostics_to_bugsnag | ||
|
||
def handled | ||
Bugsnag.before_notify_callbacks << Proc.new do |report| | ||
report.add_tab(:before_notify, { | ||
:source => "rails_before_handled" | ||
}) | ||
end | ||
Bugsnag.notify("handled string") | ||
render json: {} | ||
end | ||
|
||
def unhandled | ||
Bugsnag.before_notify_callbacks << Proc.new do |report| | ||
report.add_tab(:before_notify, { | ||
:source => "rails_before_unhandled" | ||
}) | ||
end | ||
generate_unhandled_error | ||
end | ||
|
||
def inline | ||
Bugsnag.notify("handled string") do |report| | ||
report.add_tab(:before_notify, { | ||
:source => "rails_inline" | ||
}) | ||
end | ||
render json: {} | ||
end | ||
|
||
private | ||
|
||
def add_diagnostics_to_bugsnag(report) | ||
report.add_tab(:controller, { | ||
:name => "BeforeNotifyController" | ||
}) | ||
end | ||
end |
24 changes: 24 additions & 0 deletions
24
features/fixtures/rails6/app/app/controllers/breadcrumbs_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class BreadcrumbsController < ApplicationController | ||
def handled | ||
Bugsnag.notify("Request breadcrumb") | ||
render json: {} | ||
end | ||
|
||
def sql_breadcrumb | ||
User.find_by(email: "foo") | ||
Bugsnag.notify("SQL breadcrumb") | ||
render json: {} | ||
end | ||
|
||
def active_job | ||
NotifyJob.perform_later | ||
render json: {} | ||
end | ||
|
||
def cache_read | ||
Rails.cache.write('test', true) | ||
Rails.cache.read('test') | ||
Bugsnag.notify("Cache breadcrumb") | ||
render json: {} | ||
end | ||
end |
Oops, something went wrong.