vitals 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +23 -3
- data/lib/vitals/utils.rb +4 -3
- data/lib/vitals/version.rb +1 -1
- data/lib/vitals.rb +13 -0
- data/vitals.gemspec +1 -1
- metadata +2 -184
- data/integration/multiverse/grape-on-rack/.gitignore +0 -7
- data/integration/multiverse/grape-on-rack/.rspec +0 -2
- data/integration/multiverse/grape-on-rack/.rubocop.yml +0 -2
- data/integration/multiverse/grape-on-rack/.rubocop_todo.yml +0 -50
- data/integration/multiverse/grape-on-rack/.travis.yml +0 -12
- data/integration/multiverse/grape-on-rack/Gemfile +0 -28
- data/integration/multiverse/grape-on-rack/Gemfile.lock +0 -187
- data/integration/multiverse/grape-on-rack/Guardfile +0 -8
- data/integration/multiverse/grape-on-rack/LICENSE +0 -21
- data/integration/multiverse/grape-on-rack/README.md +0 -88
- data/integration/multiverse/grape-on-rack/Rakefile +0 -27
- data/integration/multiverse/grape-on-rack/api/content_type.rb +0 -18
- data/integration/multiverse/grape-on-rack/api/entities.rb +0 -28
- data/integration/multiverse/grape-on-rack/api/get_json.rb +0 -24
- data/integration/multiverse/grape-on-rack/api/header_versioning.rb +0 -9
- data/integration/multiverse/grape-on-rack/api/path_versioning.rb +0 -9
- data/integration/multiverse/grape-on-rack/api/ping.rb +0 -8
- data/integration/multiverse/grape-on-rack/api/post_json.rb +0 -11
- data/integration/multiverse/grape-on-rack/api/post_put.rb +0 -24
- data/integration/multiverse/grape-on-rack/api/rescue_from.rb +0 -11
- data/integration/multiverse/grape-on-rack/api/upload_file.rb +0 -22
- data/integration/multiverse/grape-on-rack/api/wrap_response.rb +0 -14
- data/integration/multiverse/grape-on-rack/api/wrap_response_decorator.rb +0 -15
- data/integration/multiverse/grape-on-rack/app/acme_app.rb +0 -49
- data/integration/multiverse/grape-on-rack/app/api.rb +0 -18
- data/integration/multiverse/grape-on-rack/config/application.rb +0 -23
- data/integration/multiverse/grape-on-rack/config/boot.rb +0 -2
- data/integration/multiverse/grape-on-rack/config/environment.rb +0 -3
- data/integration/multiverse/grape-on-rack/config/newrelic.yml +0 -255
- data/integration/multiverse/grape-on-rack/config.ru +0 -11
- data/integration/multiverse/grape-on-rack/public/errors/404.html +0 -15
- data/integration/multiverse/grape-on-rack/public/errors/500.html +0 -15
- data/integration/multiverse/grape-on-rack/public/images/index.html +0 -1
- data/integration/multiverse/grape-on-rack/public/images/rack-logo.png +0 -0
- data/integration/multiverse/grape-on-rack/public/index.html +0 -23
- data/integration/multiverse/grape-on-rack/public/scripts/jquery-1.7.1.min.js +0 -4
- data/integration/multiverse/grape-on-rack/public/scripts/ring.js +0 -17
- data/integration/multiverse/grape-on-rack/spec/api/post_put_spec.rb +0 -21
- data/integration/multiverse/grape-on-rack/spec/fixtures/grape_logo.png +0 -0
- data/integration/multiverse/grape-on-rack/spec/spec_helper.rb +0 -24
- data/integration/multiverse/grape-on-rails/.gitignore +0 -16
- data/integration/multiverse/grape-on-rails/.rspec +0 -2
- data/integration/multiverse/grape-on-rails/.rubocop.yml +0 -6
- data/integration/multiverse/grape-on-rails/.rubocop_todo.yml +0 -33
- data/integration/multiverse/grape-on-rails/.travis.yml +0 -17
- data/integration/multiverse/grape-on-rails/Gemfile +0 -22
- data/integration/multiverse/grape-on-rails/Gemfile.lock +0 -238
- data/integration/multiverse/grape-on-rails/README.md +0 -29
- data/integration/multiverse/grape-on-rails/Rakefile +0 -16
- data/integration/multiverse/grape-on-rails/app/api/acme/ping.rb +0 -8
- data/integration/multiverse/grape-on-rails/app/api/acme/post.rb +0 -10
- data/integration/multiverse/grape-on-rails/app/api/acme/protected.rb +0 -13
- data/integration/multiverse/grape-on-rails/app/api/acme/raise.rb +0 -8
- data/integration/multiverse/grape-on-rails/app/api/api.rb +0 -8
- data/integration/multiverse/grape-on-rails/app/assets/images/rails.png +0 -0
- data/integration/multiverse/grape-on-rails/app/assets/javascripts/application.js +0 -15
- data/integration/multiverse/grape-on-rails/app/assets/javascripts/welcome.js.coffee +0 -3
- data/integration/multiverse/grape-on-rails/app/assets/stylesheets/application.css +0 -13
- data/integration/multiverse/grape-on-rails/app/assets/stylesheets/welcome.css.scss +0 -3
- data/integration/multiverse/grape-on-rails/app/controllers/application_controller.rb +0 -3
- data/integration/multiverse/grape-on-rails/app/controllers/welcome_controller.rb +0 -4
- data/integration/multiverse/grape-on-rails/app/helpers/application_helper.rb +0 -2
- data/integration/multiverse/grape-on-rails/app/helpers/welcome_helper.rb +0 -2
- data/integration/multiverse/grape-on-rails/app/mailers/.gitkeep +0 -0
- data/integration/multiverse/grape-on-rails/app/models/.gitkeep +0 -0
- data/integration/multiverse/grape-on-rails/app/views/layouts/application.html.erb +0 -14
- data/integration/multiverse/grape-on-rails/app/views/welcome/index.html.erb +0 -6
- data/integration/multiverse/grape-on-rails/bin/bundle +0 -3
- data/integration/multiverse/grape-on-rails/bin/rails +0 -4
- data/integration/multiverse/grape-on-rails/bin/rake +0 -4
- data/integration/multiverse/grape-on-rails/config/application.rb +0 -65
- data/integration/multiverse/grape-on-rails/config/boot.rb +0 -6
- data/integration/multiverse/grape-on-rails/config/database.travis.yml +0 -4
- data/integration/multiverse/grape-on-rails/config/database.yml +0 -16
- data/integration/multiverse/grape-on-rails/config/environment.rb +0 -5
- data/integration/multiverse/grape-on-rails/config/environments/development.rb +0 -29
- data/integration/multiverse/grape-on-rails/config/environments/production.rb +0 -65
- data/integration/multiverse/grape-on-rails/config/environments/test.rb +0 -33
- data/integration/multiverse/grape-on-rails/config/initializers/backtrace_silencers.rb +0 -7
- data/integration/multiverse/grape-on-rails/config/initializers/inflections.rb +0 -15
- data/integration/multiverse/grape-on-rails/config/initializers/mime_types.rb +0 -5
- data/integration/multiverse/grape-on-rails/config/initializers/reload_api.rb +0 -13
- data/integration/multiverse/grape-on-rails/config/initializers/secret_token.rb +0 -1
- data/integration/multiverse/grape-on-rails/config/initializers/session_store.rb +0 -8
- data/integration/multiverse/grape-on-rails/config/initializers/vitals.rb +0 -8
- data/integration/multiverse/grape-on-rails/config/initializers/wrap_parameters.rb +0 -14
- data/integration/multiverse/grape-on-rails/config/locales/en.yml +0 -5
- data/integration/multiverse/grape-on-rails/config/routes.rb +0 -5
- data/integration/multiverse/grape-on-rails/config.ru +0 -4
- data/integration/multiverse/grape-on-rails/db/schema.rb +0 -16
- data/integration/multiverse/grape-on-rails/db/seeds.rb +0 -7
- data/integration/multiverse/grape-on-rails/doc/README_FOR_APP +0 -2
- data/integration/multiverse/grape-on-rails/lib/assets/.gitkeep +0 -0
- data/integration/multiverse/grape-on-rails/lib/tasks/.gitkeep +0 -0
- data/integration/multiverse/grape-on-rails/log/.gitkeep +0 -0
- data/integration/multiverse/grape-on-rails/public/404.html +0 -26
- data/integration/multiverse/grape-on-rails/public/422.html +0 -26
- data/integration/multiverse/grape-on-rails/public/500.html +0 -25
- data/integration/multiverse/grape-on-rails/public/favicon.ico +0 -0
- data/integration/multiverse/grape-on-rails/public/robots.txt +0 -5
- data/integration/multiverse/grape-on-rails/script/rails +0 -6
- data/integration/multiverse/grape-on-rails/spec/api/ping_spec.rb +0 -15
- data/integration/multiverse/grape-on-rails/spec/spec_helper.rb +0 -15
- data/integration/multiverse/rails42_app/.gitignore +0 -18
- data/integration/multiverse/rails42_app/Gemfile +0 -49
- data/integration/multiverse/rails42_app/Gemfile.lock +0 -167
- data/integration/multiverse/rails42_app/README.rdoc +0 -28
- data/integration/multiverse/rails42_app/Rakefile +0 -6
- data/integration/multiverse/rails42_app/app/assets/images/.keep +0 -0
- data/integration/multiverse/rails42_app/app/assets/javascripts/application.js +0 -16
- data/integration/multiverse/rails42_app/app/assets/javascripts/posts.coffee +0 -3
- data/integration/multiverse/rails42_app/app/assets/stylesheets/application.css +0 -15
- data/integration/multiverse/rails42_app/app/assets/stylesheets/posts.scss +0 -3
- data/integration/multiverse/rails42_app/app/assets/stylesheets/scaffolds.scss +0 -73
- data/integration/multiverse/rails42_app/app/controllers/application_controller.rb +0 -5
- data/integration/multiverse/rails42_app/app/controllers/concerns/.keep +0 -0
- data/integration/multiverse/rails42_app/app/controllers/posts_controller.rb +0 -75
- data/integration/multiverse/rails42_app/app/helpers/application_helper.rb +0 -2
- data/integration/multiverse/rails42_app/app/helpers/posts_helper.rb +0 -2
- data/integration/multiverse/rails42_app/app/jobs/foobar_cleanup_job.rb +0 -7
- data/integration/multiverse/rails42_app/app/mailers/.keep +0 -0
- data/integration/multiverse/rails42_app/app/models/.keep +0 -0
- data/integration/multiverse/rails42_app/app/models/concerns/.keep +0 -0
- data/integration/multiverse/rails42_app/app/models/post.rb +0 -2
- data/integration/multiverse/rails42_app/app/views/layouts/application.html.erb +0 -14
- data/integration/multiverse/rails42_app/app/views/posts/_form.html.erb +0 -21
- data/integration/multiverse/rails42_app/app/views/posts/edit.html.erb +0 -6
- data/integration/multiverse/rails42_app/app/views/posts/index.html.erb +0 -27
- data/integration/multiverse/rails42_app/app/views/posts/index.json.jbuilder +0 -4
- data/integration/multiverse/rails42_app/app/views/posts/new.html.erb +0 -5
- data/integration/multiverse/rails42_app/app/views/posts/show.html.erb +0 -9
- data/integration/multiverse/rails42_app/app/views/posts/show.json.jbuilder +0 -1
- data/integration/multiverse/rails42_app/bin/bundle +0 -3
- data/integration/multiverse/rails42_app/bin/rails +0 -9
- data/integration/multiverse/rails42_app/bin/rake +0 -9
- data/integration/multiverse/rails42_app/bin/setup +0 -29
- data/integration/multiverse/rails42_app/bin/spring +0 -15
- data/integration/multiverse/rails42_app/config/application.rb +0 -26
- data/integration/multiverse/rails42_app/config/boot.rb +0 -3
- data/integration/multiverse/rails42_app/config/database.yml +0 -25
- data/integration/multiverse/rails42_app/config/environment.rb +0 -5
- data/integration/multiverse/rails42_app/config/environments/development.rb +0 -41
- data/integration/multiverse/rails42_app/config/environments/production.rb +0 -79
- data/integration/multiverse/rails42_app/config/environments/test.rb +0 -42
- data/integration/multiverse/rails42_app/config/initializers/assets.rb +0 -11
- data/integration/multiverse/rails42_app/config/initializers/backtrace_silencers.rb +0 -7
- data/integration/multiverse/rails42_app/config/initializers/cookies_serializer.rb +0 -3
- data/integration/multiverse/rails42_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/integration/multiverse/rails42_app/config/initializers/inflections.rb +0 -16
- data/integration/multiverse/rails42_app/config/initializers/mime_types.rb +0 -4
- data/integration/multiverse/rails42_app/config/initializers/session_store.rb +0 -3
- data/integration/multiverse/rails42_app/config/initializers/vitals.rb +0 -15
- data/integration/multiverse/rails42_app/config/initializers/wrap_parameters.rb +0 -14
- data/integration/multiverse/rails42_app/config/locales/en.yml +0 -23
- data/integration/multiverse/rails42_app/config/routes.rb +0 -57
- data/integration/multiverse/rails42_app/config/secrets.yml +0 -22
- data/integration/multiverse/rails42_app/config.ru +0 -4
- data/integration/multiverse/rails42_app/db/migrate/20160321140358_create_posts.rb +0 -9
- data/integration/multiverse/rails42_app/db/schema.rb +0 -22
- data/integration/multiverse/rails42_app/db/seeds.rb +0 -7
- data/integration/multiverse/rails42_app/lib/assets/.keep +0 -0
- data/integration/multiverse/rails42_app/lib/tasks/.keep +0 -0
- data/integration/multiverse/rails42_app/log/.keep +0 -0
- data/integration/multiverse/rails42_app/public/404.html +0 -67
- data/integration/multiverse/rails42_app/public/422.html +0 -67
- data/integration/multiverse/rails42_app/public/500.html +0 -66
- data/integration/multiverse/rails42_app/public/favicon.ico +0 -0
- data/integration/multiverse/rails42_app/public/robots.txt +0 -5
- data/integration/multiverse/rails42_app/test/controllers/.keep +0 -0
- data/integration/multiverse/rails42_app/test/controllers/posts_controller_test.rb +0 -49
- data/integration/multiverse/rails42_app/test/fixtures/.keep +0 -0
- data/integration/multiverse/rails42_app/test/fixtures/posts.yml +0 -7
- data/integration/multiverse/rails42_app/test/helpers/.keep +0 -0
- data/integration/multiverse/rails42_app/test/integration/.keep +0 -0
- data/integration/multiverse/rails42_app/test/integration/vitals_flow_test.rb +0 -96
- data/integration/multiverse/rails42_app/test/jobs/foobar_cleanup_job_test.rb +0 -7
- data/integration/multiverse/rails42_app/test/mailers/.keep +0 -0
- data/integration/multiverse/rails42_app/test/models/.keep +0 -0
- data/integration/multiverse/rails42_app/test/models/post_test.rb +0 -7
- data/integration/multiverse/rails42_app/test/test_helper.rb +0 -11
- data/integration/multiverse_helper.rb +0 -16
- data/integration/multiverse_spec.rb +0 -40
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'vitals'
|
2
|
-
|
3
|
-
Vitals.configure! do |c|
|
4
|
-
c.facility = 'rails_42'
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'vitals/integrations/notifications/action_controller'
|
8
|
-
Vitals::Integrations::Notifications::ActionController.subscribe!
|
9
|
-
|
10
|
-
require 'vitals/integrations/notifications/active_job'
|
11
|
-
Vitals::Integrations::Notifications::ActiveJob.subscribe!
|
12
|
-
|
13
|
-
require 'vitals/integrations/rack/requests'
|
14
|
-
Rails.application.config.middleware.insert_before "Rails::Rack::Logger", Vitals::Integrations::Rack::Requests
|
15
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
@@ -1,57 +0,0 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
resources :posts
|
3
|
-
# The priority is based upon order of creation: first created -> highest priority.
|
4
|
-
# See how all your routes lay out with "rake routes".
|
5
|
-
|
6
|
-
# You can have the root of your site routed with "root"
|
7
|
-
# root 'welcome#index'
|
8
|
-
|
9
|
-
# Example of regular route:
|
10
|
-
# get 'products/:id' => 'catalog#view'
|
11
|
-
|
12
|
-
# Example of named route that can be invoked with purchase_url(id: product.id)
|
13
|
-
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
14
|
-
|
15
|
-
# Example resource route (maps HTTP verbs to controller actions automatically):
|
16
|
-
# resources :products
|
17
|
-
|
18
|
-
# Example resource route with options:
|
19
|
-
# resources :products do
|
20
|
-
# member do
|
21
|
-
# get 'short'
|
22
|
-
# post 'toggle'
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
# collection do
|
26
|
-
# get 'sold'
|
27
|
-
# end
|
28
|
-
# end
|
29
|
-
|
30
|
-
# Example resource route with sub-resources:
|
31
|
-
# resources :products do
|
32
|
-
# resources :comments, :sales
|
33
|
-
# resource :seller
|
34
|
-
# end
|
35
|
-
|
36
|
-
# Example resource route with more complex sub-resources:
|
37
|
-
# resources :products do
|
38
|
-
# resources :comments
|
39
|
-
# resources :sales do
|
40
|
-
# get 'recent', on: :collection
|
41
|
-
# end
|
42
|
-
# end
|
43
|
-
|
44
|
-
# Example resource route with concerns:
|
45
|
-
# concern :toggleable do
|
46
|
-
# post 'toggle'
|
47
|
-
# end
|
48
|
-
# resources :posts, concerns: :toggleable
|
49
|
-
# resources :photos, concerns: :toggleable
|
50
|
-
|
51
|
-
# Example resource route within a namespace:
|
52
|
-
# namespace :admin do
|
53
|
-
# # Directs /admin/products/* to Admin::ProductsController
|
54
|
-
# # (app/controllers/admin/products_controller.rb)
|
55
|
-
# resources :products
|
56
|
-
# end
|
57
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
development:
|
14
|
-
secret_key_base: e36a8f4e224522a14b9104d7129cf19af517174af39f83dd9b72e52e8d3fb25e70f3d603be8d457bd7f0cf1d5fda66a4ff61755e234baeb08dd203197c7d0f3e
|
15
|
-
|
16
|
-
test:
|
17
|
-
secret_key_base: 50c9be4949a3d471b729779bd7e30b0e7dbb1a2aa3d6836dfa40c4fa00d328f7936bf2e228050a16c1771b86470fdcab77c7de98e810fe8aeab909a642791e81
|
18
|
-
|
19
|
-
# Do not keep production secrets in the repository,
|
20
|
-
# instead read values from the environment.
|
21
|
-
production:
|
22
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# This file is auto-generated from the current state of the database. Instead
|
3
|
-
# of editing this file, please use the migrations feature of Active Record to
|
4
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
-
#
|
6
|
-
# Note that this schema.rb definition is the authoritative source for your
|
7
|
-
# database schema. If you need to create the application database on another
|
8
|
-
# system, you should be using db:schema:load, not running all the migrations
|
9
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
-
#
|
12
|
-
# It's strongly recommended that you check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(version: 20160321140358) do
|
15
|
-
|
16
|
-
create_table "posts", force: :cascade do |t|
|
17
|
-
t.string "title"
|
18
|
-
t.datetime "created_at", null: false
|
19
|
-
t.datetime "updated_at", null: false
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
-
# Mayor.create(name: 'Emanuel', city: cities.first)
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<style>
|
7
|
-
body {
|
8
|
-
background-color: #EFEFEF;
|
9
|
-
color: #2E2F30;
|
10
|
-
text-align: center;
|
11
|
-
font-family: arial, sans-serif;
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
div.dialog {
|
16
|
-
width: 95%;
|
17
|
-
max-width: 33em;
|
18
|
-
margin: 4em auto 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
div.dialog > div {
|
22
|
-
border: 1px solid #CCC;
|
23
|
-
border-right-color: #999;
|
24
|
-
border-left-color: #999;
|
25
|
-
border-bottom-color: #BBB;
|
26
|
-
border-top: #B00100 solid 4px;
|
27
|
-
border-top-left-radius: 9px;
|
28
|
-
border-top-right-radius: 9px;
|
29
|
-
background-color: white;
|
30
|
-
padding: 7px 12% 0;
|
31
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
-
}
|
33
|
-
|
34
|
-
h1 {
|
35
|
-
font-size: 100%;
|
36
|
-
color: #730E15;
|
37
|
-
line-height: 1.5em;
|
38
|
-
}
|
39
|
-
|
40
|
-
div.dialog > p {
|
41
|
-
margin: 0 0 1em;
|
42
|
-
padding: 1em;
|
43
|
-
background-color: #F7F7F7;
|
44
|
-
border: 1px solid #CCC;
|
45
|
-
border-right-color: #999;
|
46
|
-
border-left-color: #999;
|
47
|
-
border-bottom-color: #999;
|
48
|
-
border-bottom-left-radius: 4px;
|
49
|
-
border-bottom-right-radius: 4px;
|
50
|
-
border-top-color: #DADADA;
|
51
|
-
color: #666;
|
52
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
-
}
|
54
|
-
</style>
|
55
|
-
</head>
|
56
|
-
|
57
|
-
<body>
|
58
|
-
<!-- This file lives in public/404.html -->
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
-
</div>
|
64
|
-
<p>If you are the application owner check the logs for more information.</p>
|
65
|
-
</div>
|
66
|
-
</body>
|
67
|
-
</html>
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<style>
|
7
|
-
body {
|
8
|
-
background-color: #EFEFEF;
|
9
|
-
color: #2E2F30;
|
10
|
-
text-align: center;
|
11
|
-
font-family: arial, sans-serif;
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
div.dialog {
|
16
|
-
width: 95%;
|
17
|
-
max-width: 33em;
|
18
|
-
margin: 4em auto 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
div.dialog > div {
|
22
|
-
border: 1px solid #CCC;
|
23
|
-
border-right-color: #999;
|
24
|
-
border-left-color: #999;
|
25
|
-
border-bottom-color: #BBB;
|
26
|
-
border-top: #B00100 solid 4px;
|
27
|
-
border-top-left-radius: 9px;
|
28
|
-
border-top-right-radius: 9px;
|
29
|
-
background-color: white;
|
30
|
-
padding: 7px 12% 0;
|
31
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
-
}
|
33
|
-
|
34
|
-
h1 {
|
35
|
-
font-size: 100%;
|
36
|
-
color: #730E15;
|
37
|
-
line-height: 1.5em;
|
38
|
-
}
|
39
|
-
|
40
|
-
div.dialog > p {
|
41
|
-
margin: 0 0 1em;
|
42
|
-
padding: 1em;
|
43
|
-
background-color: #F7F7F7;
|
44
|
-
border: 1px solid #CCC;
|
45
|
-
border-right-color: #999;
|
46
|
-
border-left-color: #999;
|
47
|
-
border-bottom-color: #999;
|
48
|
-
border-bottom-left-radius: 4px;
|
49
|
-
border-bottom-right-radius: 4px;
|
50
|
-
border-top-color: #DADADA;
|
51
|
-
color: #666;
|
52
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
-
}
|
54
|
-
</style>
|
55
|
-
</head>
|
56
|
-
|
57
|
-
<body>
|
58
|
-
<!-- This file lives in public/422.html -->
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>The change you wanted was rejected.</h1>
|
62
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
-
</div>
|
64
|
-
<p>If you are the application owner check the logs for more information.</p>
|
65
|
-
</div>
|
66
|
-
</body>
|
67
|
-
</html>
|
@@ -1,66 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<style>
|
7
|
-
body {
|
8
|
-
background-color: #EFEFEF;
|
9
|
-
color: #2E2F30;
|
10
|
-
text-align: center;
|
11
|
-
font-family: arial, sans-serif;
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
div.dialog {
|
16
|
-
width: 95%;
|
17
|
-
max-width: 33em;
|
18
|
-
margin: 4em auto 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
div.dialog > div {
|
22
|
-
border: 1px solid #CCC;
|
23
|
-
border-right-color: #999;
|
24
|
-
border-left-color: #999;
|
25
|
-
border-bottom-color: #BBB;
|
26
|
-
border-top: #B00100 solid 4px;
|
27
|
-
border-top-left-radius: 9px;
|
28
|
-
border-top-right-radius: 9px;
|
29
|
-
background-color: white;
|
30
|
-
padding: 7px 12% 0;
|
31
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
-
}
|
33
|
-
|
34
|
-
h1 {
|
35
|
-
font-size: 100%;
|
36
|
-
color: #730E15;
|
37
|
-
line-height: 1.5em;
|
38
|
-
}
|
39
|
-
|
40
|
-
div.dialog > p {
|
41
|
-
margin: 0 0 1em;
|
42
|
-
padding: 1em;
|
43
|
-
background-color: #F7F7F7;
|
44
|
-
border: 1px solid #CCC;
|
45
|
-
border-right-color: #999;
|
46
|
-
border-left-color: #999;
|
47
|
-
border-bottom-color: #999;
|
48
|
-
border-bottom-left-radius: 4px;
|
49
|
-
border-bottom-right-radius: 4px;
|
50
|
-
border-top-color: #DADADA;
|
51
|
-
color: #666;
|
52
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
-
}
|
54
|
-
</style>
|
55
|
-
</head>
|
56
|
-
|
57
|
-
<body>
|
58
|
-
<!-- This file lives in public/500.html -->
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>We're sorry, but something went wrong.</h1>
|
62
|
-
</div>
|
63
|
-
<p>If you are the application owner check the logs for more information.</p>
|
64
|
-
</div>
|
65
|
-
</body>
|
66
|
-
</html>
|
File without changes
|
File without changes
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class PostsControllerTest < ActionController::TestCase
|
4
|
-
setup do
|
5
|
-
@post = posts(:one)
|
6
|
-
end
|
7
|
-
|
8
|
-
test "should get index" do
|
9
|
-
get :index
|
10
|
-
assert_response :success
|
11
|
-
assert_not_nil assigns(:posts)
|
12
|
-
end
|
13
|
-
|
14
|
-
test "should get new" do
|
15
|
-
get :new
|
16
|
-
assert_response :success
|
17
|
-
end
|
18
|
-
|
19
|
-
test "should create post" do
|
20
|
-
assert_difference('Post.count') do
|
21
|
-
post :create, post: { title: @post.title }
|
22
|
-
end
|
23
|
-
|
24
|
-
assert_redirected_to post_path(assigns(:post))
|
25
|
-
end
|
26
|
-
|
27
|
-
test "should show post" do
|
28
|
-
get :show, id: @post
|
29
|
-
assert_response :success
|
30
|
-
end
|
31
|
-
|
32
|
-
test "should get edit" do
|
33
|
-
get :edit, id: @post
|
34
|
-
assert_response :success
|
35
|
-
end
|
36
|
-
|
37
|
-
test "should update post" do
|
38
|
-
patch :update, id: @post, post: { title: @post.title }
|
39
|
-
assert_redirected_to post_path(assigns(:post))
|
40
|
-
end
|
41
|
-
|
42
|
-
test "should destroy post" do
|
43
|
-
assert_difference('Post.count', -1) do
|
44
|
-
delete :destroy, id: @post
|
45
|
-
end
|
46
|
-
|
47
|
-
assert_redirected_to posts_path
|
48
|
-
end
|
49
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,96 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'active_support/log_subscriber/test_helper'
|
3
|
-
require 'action_controller/log_subscriber'
|
4
|
-
|
5
|
-
class TestLogSubscriber < ActiveSupport::LogSubscriber
|
6
|
-
cattr_accessor :event
|
7
|
-
|
8
|
-
def process_action event
|
9
|
-
self.class.event = event
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.controller_times
|
13
|
-
dbtime, viewtime = event.payload.slice(:db_runtime, :view_runtime).values
|
14
|
-
viewtime ||= 0
|
15
|
-
dbtime ||= 0
|
16
|
-
# all time is simulated. we don't get the 'all' time here.
|
17
|
-
[dbtime+viewtime, dbtime, viewtime]
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.flush
|
21
|
-
self.event = nil
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
class VitalsFlowTest < ActionDispatch::IntegrationTest
|
26
|
-
setup do
|
27
|
-
Vitals.reporter.flush
|
28
|
-
TestLogSubscriber.flush
|
29
|
-
TestLogSubscriber.attach_to :action_controller
|
30
|
-
end
|
31
|
-
|
32
|
-
test "get posts with rack middleware" do
|
33
|
-
get '/posts'
|
34
|
-
metrics = %w{
|
35
|
-
controllers.posts_index_get.200.all
|
36
|
-
controllers.posts_index_get.200.db
|
37
|
-
controllers.posts_index_get.200.view
|
38
|
-
requests.posts_index_get.200
|
39
|
-
}
|
40
|
-
|
41
|
-
assert_timings Vitals.reporter.reports,
|
42
|
-
metrics,
|
43
|
-
TestLogSubscriber.controller_times+[-1],
|
44
|
-
60
|
45
|
-
end
|
46
|
-
|
47
|
-
test "get new which also triggers a job" do
|
48
|
-
get '/posts/new'
|
49
|
-
|
50
|
-
metrics = %w{
|
51
|
-
jobs.default.foobarcleanup
|
52
|
-
controllers.posts_new_get.200.all
|
53
|
-
controllers.posts_new_get.200.db
|
54
|
-
controllers.posts_new_get.200.view
|
55
|
-
requests.posts_new_get.200
|
56
|
-
}
|
57
|
-
|
58
|
-
assert_timings Vitals.reporter.reports,
|
59
|
-
metrics,
|
60
|
-
[-1]+TestLogSubscriber.controller_times+[-1],
|
61
|
-
60
|
62
|
-
|
63
|
-
end
|
64
|
-
|
65
|
-
test "get posts" do
|
66
|
-
get '/posts'
|
67
|
-
|
68
|
-
metrics = %w{
|
69
|
-
controllers.posts_index_get.200.all
|
70
|
-
controllers.posts_index_get.200.db
|
71
|
-
controllers.posts_index_get.200.view
|
72
|
-
requests.posts_index_get.200
|
73
|
-
}
|
74
|
-
|
75
|
-
assert_timings Vitals.reporter.reports,
|
76
|
-
metrics,
|
77
|
-
TestLogSubscriber.controller_times+[-1],
|
78
|
-
80
|
79
|
-
end
|
80
|
-
|
81
|
-
test "post posts" do
|
82
|
-
post '/posts', post: { title: 'foobar'}
|
83
|
-
|
84
|
-
metrics = %w{
|
85
|
-
controllers.posts_create_post.302.all
|
86
|
-
controllers.posts_create_post.302.db
|
87
|
-
requests.posts_create_post.302
|
88
|
-
}
|
89
|
-
|
90
|
-
assert_timings Vitals.reporter.reports,
|
91
|
-
metrics,
|
92
|
-
TestLogSubscriber.controller_times+[-1],
|
93
|
-
80
|
94
|
-
end
|
95
|
-
|
96
|
-
end
|
File without changes
|
File without changes
|
@@ -1,11 +0,0 @@
|
|
1
|
-
ENV['RAILS_ENV'] ||= 'test'
|
2
|
-
require File.expand_path('../../config/environment', __FILE__)
|
3
|
-
require 'rails/test_help'
|
4
|
-
require File.expand_path( '../../../multiverse_helper', File.dirname(__FILE__))
|
5
|
-
|
6
|
-
class ActiveSupport::TestCase
|
7
|
-
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
8
|
-
fixtures :all
|
9
|
-
|
10
|
-
# Add more helper methods to be used by all tests here...
|
11
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
def assert_timings(reports, metrics, times, delta=30)
|
3
|
-
if Object.const_defined?('RSpec')
|
4
|
-
expect(reports.count).to eq metrics.count
|
5
|
-
metrics.zip(times).each_with_index do |(m,v), i|
|
6
|
-
expect(reports[i][:timing]).to eq m
|
7
|
-
expect(reports[i][:val]).to(be_within(delta).of(v)) if v >=0
|
8
|
-
end
|
9
|
-
else
|
10
|
-
assert_equal reports.count, metrics.count
|
11
|
-
metrics.zip(times).each_with_index do |(m,v), i|
|
12
|
-
assert_equal reports[i][:timing], m
|
13
|
-
assert_in_delta(reports[i][:val], v, delta) if v >=0
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'bundler'
|
3
|
-
require 'fileutils'
|
4
|
-
include FileUtils
|
5
|
-
|
6
|
-
|
7
|
-
describe "multiverse" do
|
8
|
-
let(:bundle){ 'bundle install --quiet --path=vendor/bundle' }
|
9
|
-
def state
|
10
|
-
puts `pwd`
|
11
|
-
end
|
12
|
-
it "rails 4.2" do
|
13
|
-
Bundler.with_clean_env do
|
14
|
-
Dir.chdir('integration/multiverse/rails42_app') do
|
15
|
-
state
|
16
|
-
system("#{bundle} && RAILS_ENV=test bundle exec rake db:migrate && bundle exec rake test").must_equal true
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
it "grape-rack" do
|
21
|
-
Bundler.with_clean_env do
|
22
|
-
Dir.chdir('integration/multiverse/grape-on-rack') do
|
23
|
-
state
|
24
|
-
system("#{bundle} && bundle exec rake spec").must_equal true
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
it "grape-rails" do
|
29
|
-
Bundler.with_clean_env do
|
30
|
-
Dir.chdir('integration/multiverse/grape-on-rails') do
|
31
|
-
state
|
32
|
-
system("#{ bundle } && bundle exec rake spec").must_equal true
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
it "padrino" do
|
37
|
-
# TODO this should test the rack middleware, and padrino uses sinatra so that's good
|
38
|
-
skip
|
39
|
-
end
|
40
|
-
end
|