vitals 0.0.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.travis.yml +15 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +157 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +135 -9
- data/Rakefile +17 -31
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/integration/multiverse/grape-on-rack/.gitignore +7 -0
- data/integration/multiverse/grape-on-rack/.rspec +2 -0
- data/integration/multiverse/grape-on-rack/.rubocop.yml +2 -0
- data/integration/multiverse/grape-on-rack/.rubocop_todo.yml +50 -0
- data/integration/multiverse/grape-on-rack/.travis.yml +12 -0
- data/integration/multiverse/grape-on-rack/Gemfile +28 -0
- data/integration/multiverse/grape-on-rack/Gemfile.lock +187 -0
- data/integration/multiverse/grape-on-rack/Guardfile +8 -0
- data/integration/multiverse/grape-on-rack/LICENSE +21 -0
- data/integration/multiverse/grape-on-rack/README.md +88 -0
- data/integration/multiverse/grape-on-rack/Rakefile +27 -0
- data/integration/multiverse/grape-on-rack/api/content_type.rb +18 -0
- data/integration/multiverse/grape-on-rack/api/entities.rb +28 -0
- data/integration/multiverse/grape-on-rack/api/get_json.rb +24 -0
- data/integration/multiverse/grape-on-rack/api/header_versioning.rb +9 -0
- data/integration/multiverse/grape-on-rack/api/path_versioning.rb +9 -0
- data/integration/multiverse/grape-on-rack/api/ping.rb +8 -0
- data/integration/multiverse/grape-on-rack/api/post_json.rb +11 -0
- data/integration/multiverse/grape-on-rack/api/post_put.rb +24 -0
- data/integration/multiverse/grape-on-rack/api/rescue_from.rb +11 -0
- data/integration/multiverse/grape-on-rack/api/upload_file.rb +22 -0
- data/integration/multiverse/grape-on-rack/api/wrap_response.rb +14 -0
- data/integration/multiverse/grape-on-rack/api/wrap_response_decorator.rb +15 -0
- data/integration/multiverse/grape-on-rack/app/acme_app.rb +49 -0
- data/integration/multiverse/grape-on-rack/app/api.rb +18 -0
- data/integration/multiverse/grape-on-rack/config/application.rb +23 -0
- data/integration/multiverse/grape-on-rack/config/boot.rb +2 -0
- data/integration/multiverse/grape-on-rack/config/environment.rb +3 -0
- data/integration/multiverse/grape-on-rack/config/newrelic.yml +255 -0
- data/integration/multiverse/grape-on-rack/config.ru +11 -0
- data/integration/multiverse/grape-on-rack/public/errors/404.html +15 -0
- data/integration/multiverse/grape-on-rack/public/errors/500.html +15 -0
- data/integration/multiverse/grape-on-rack/public/images/index.html +1 -0
- data/integration/multiverse/grape-on-rack/public/images/rack-logo.png +0 -0
- data/integration/multiverse/grape-on-rack/public/index.html +23 -0
- data/integration/multiverse/grape-on-rack/public/scripts/jquery-1.7.1.min.js +4 -0
- data/integration/multiverse/grape-on-rack/public/scripts/ring.js +17 -0
- data/integration/multiverse/grape-on-rack/spec/api/post_put_spec.rb +21 -0
- data/integration/multiverse/grape-on-rack/spec/fixtures/grape_logo.png +0 -0
- data/integration/multiverse/grape-on-rack/spec/spec_helper.rb +24 -0
- data/integration/multiverse/grape-on-rails/.gitignore +16 -0
- data/integration/multiverse/grape-on-rails/.rspec +2 -0
- data/integration/multiverse/grape-on-rails/.rubocop.yml +6 -0
- data/integration/multiverse/grape-on-rails/.rubocop_todo.yml +33 -0
- data/integration/multiverse/grape-on-rails/.travis.yml +17 -0
- data/integration/multiverse/grape-on-rails/Gemfile +22 -0
- data/integration/multiverse/grape-on-rails/Gemfile.lock +238 -0
- data/integration/multiverse/grape-on-rails/README.md +29 -0
- data/integration/multiverse/grape-on-rails/Rakefile +16 -0
- data/integration/multiverse/grape-on-rails/app/api/acme/ping.rb +8 -0
- data/integration/multiverse/grape-on-rails/app/api/acme/post.rb +10 -0
- data/integration/multiverse/grape-on-rails/app/api/acme/protected.rb +13 -0
- data/integration/multiverse/grape-on-rails/app/api/acme/raise.rb +8 -0
- data/integration/multiverse/grape-on-rails/app/api/api.rb +8 -0
- data/integration/multiverse/grape-on-rails/app/assets/images/rails.png +0 -0
- data/integration/multiverse/grape-on-rails/app/assets/javascripts/application.js +15 -0
- data/integration/multiverse/grape-on-rails/app/assets/javascripts/welcome.js.coffee +3 -0
- data/integration/multiverse/grape-on-rails/app/assets/stylesheets/application.css +13 -0
- data/integration/multiverse/grape-on-rails/app/assets/stylesheets/welcome.css.scss +3 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/app/controllers/application_controller.rb +0 -0
- data/integration/multiverse/grape-on-rails/app/controllers/welcome_controller.rb +4 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/app/helpers/application_helper.rb +0 -0
- data/integration/multiverse/grape-on-rails/app/helpers/welcome_helper.rb +2 -0
- data/{test/dummy/db/development.sqlite3 → integration/multiverse/grape-on-rails/app/mailers/.gitkeep} +0 -0
- data/{test/dummy/db/test.sqlite3 → integration/multiverse/grape-on-rails/app/models/.gitkeep} +0 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/app/views/layouts/application.html.erb +2 -2
- data/integration/multiverse/grape-on-rails/app/views/welcome/index.html.erb +6 -0
- data/integration/multiverse/grape-on-rails/bin/bundle +3 -0
- data/integration/multiverse/grape-on-rails/bin/rails +4 -0
- data/integration/multiverse/grape-on-rails/bin/rake +4 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/application.rb +26 -6
- data/integration/multiverse/grape-on-rails/config/boot.rb +6 -0
- data/integration/multiverse/grape-on-rails/config/database.travis.yml +4 -0
- data/integration/multiverse/grape-on-rails/config/database.yml +16 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/environment.rb +1 -1
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/development.rb +4 -5
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/production.rb +9 -4
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/test.rb +9 -18
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/backtrace_silencers.rb +0 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/inflections.rb +5 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/mime_types.rb +0 -0
- data/integration/multiverse/grape-on-rails/config/initializers/reload_api.rb +13 -0
- data/integration/multiverse/grape-on-rails/config/initializers/secret_token.rb +1 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/session_store.rb +2 -2
- data/integration/multiverse/grape-on-rails/config/initializers/vitals.rb +8 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/wrap_parameters.rb +0 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/config/locales/en.yml +0 -0
- data/integration/multiverse/grape-on-rails/config/routes.rb +5 -0
- data/integration/multiverse/grape-on-rails/config.ru +4 -0
- data/integration/multiverse/grape-on-rails/db/schema.rb +16 -0
- data/integration/multiverse/grape-on-rails/db/seeds.rb +7 -0
- data/integration/multiverse/grape-on-rails/doc/README_FOR_APP +2 -0
- data/{test/dummy/log/test.log → integration/multiverse/grape-on-rails/lib/assets/.gitkeep} +0 -0
- data/{test/dummy/public/favicon.ico → integration/multiverse/grape-on-rails/lib/tasks/.gitkeep} +0 -0
- data/integration/multiverse/grape-on-rails/log/.gitkeep +0 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/public/404.html +0 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/public/422.html +0 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/public/500.html +0 -1
- data/integration/multiverse/grape-on-rails/public/favicon.ico +0 -0
- data/integration/multiverse/grape-on-rails/public/robots.txt +5 -0
- data/{test/dummy → integration/multiverse/grape-on-rails}/script/rails +2 -2
- data/integration/multiverse/grape-on-rails/spec/api/ping_spec.rb +15 -0
- data/integration/multiverse/grape-on-rails/spec/spec_helper.rb +15 -0
- data/integration/multiverse/rails42_app/.gitignore +18 -0
- data/integration/multiverse/rails42_app/Gemfile +49 -0
- data/integration/multiverse/rails42_app/Gemfile.lock +167 -0
- data/integration/multiverse/rails42_app/README.rdoc +28 -0
- data/{test/dummy → integration/multiverse/rails42_app}/Rakefile +1 -2
- data/integration/multiverse/rails42_app/app/assets/images/.keep +0 -0
- data/integration/multiverse/rails42_app/app/assets/javascripts/application.js +16 -0
- data/integration/multiverse/rails42_app/app/assets/javascripts/posts.coffee +3 -0
- data/integration/multiverse/rails42_app/app/assets/stylesheets/application.css +15 -0
- data/integration/multiverse/rails42_app/app/assets/stylesheets/posts.scss +3 -0
- data/integration/multiverse/rails42_app/app/assets/stylesheets/scaffolds.scss +73 -0
- data/integration/multiverse/rails42_app/app/controllers/application_controller.rb +5 -0
- data/integration/multiverse/rails42_app/app/controllers/concerns/.keep +0 -0
- data/integration/multiverse/rails42_app/app/controllers/posts_controller.rb +75 -0
- data/integration/multiverse/rails42_app/app/helpers/application_helper.rb +2 -0
- data/integration/multiverse/rails42_app/app/helpers/posts_helper.rb +2 -0
- data/integration/multiverse/rails42_app/app/jobs/foobar_cleanup_job.rb +7 -0
- 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 +2 -0
- data/integration/multiverse/rails42_app/app/views/layouts/application.html.erb +14 -0
- data/integration/multiverse/rails42_app/app/views/posts/_form.html.erb +21 -0
- data/integration/multiverse/rails42_app/app/views/posts/edit.html.erb +6 -0
- data/integration/multiverse/rails42_app/app/views/posts/index.html.erb +27 -0
- data/integration/multiverse/rails42_app/app/views/posts/index.json.jbuilder +4 -0
- data/integration/multiverse/rails42_app/app/views/posts/new.html.erb +5 -0
- data/integration/multiverse/rails42_app/app/views/posts/show.html.erb +9 -0
- data/integration/multiverse/rails42_app/app/views/posts/show.json.jbuilder +1 -0
- data/integration/multiverse/rails42_app/bin/bundle +3 -0
- data/integration/multiverse/rails42_app/bin/rails +9 -0
- data/integration/multiverse/rails42_app/bin/rake +9 -0
- data/integration/multiverse/rails42_app/bin/setup +29 -0
- data/integration/multiverse/rails42_app/bin/spring +15 -0
- data/integration/multiverse/rails42_app/config/application.rb +26 -0
- data/integration/multiverse/rails42_app/config/boot.rb +3 -0
- data/{test/dummy → integration/multiverse/rails42_app}/config/database.yml +8 -8
- data/integration/multiverse/rails42_app/config/environment.rb +5 -0
- data/integration/multiverse/rails42_app/config/environments/development.rb +41 -0
- data/integration/multiverse/rails42_app/config/environments/production.rb +79 -0
- data/integration/multiverse/rails42_app/config/environments/test.rb +42 -0
- data/integration/multiverse/rails42_app/config/initializers/assets.rb +11 -0
- data/integration/multiverse/rails42_app/config/initializers/backtrace_silencers.rb +7 -0
- data/integration/multiverse/rails42_app/config/initializers/cookies_serializer.rb +3 -0
- data/integration/multiverse/rails42_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/integration/multiverse/rails42_app/config/initializers/inflections.rb +16 -0
- data/integration/multiverse/rails42_app/config/initializers/mime_types.rb +4 -0
- data/integration/multiverse/rails42_app/config/initializers/session_store.rb +3 -0
- data/integration/multiverse/rails42_app/config/initializers/vitals.rb +12 -0
- data/integration/multiverse/rails42_app/config/initializers/wrap_parameters.rb +14 -0
- data/integration/multiverse/rails42_app/config/locales/en.yml +23 -0
- data/integration/multiverse/rails42_app/config/routes.rb +57 -0
- data/integration/multiverse/rails42_app/config/secrets.yml +22 -0
- data/integration/multiverse/rails42_app/config.ru +4 -0
- data/integration/multiverse/rails42_app/db/migrate/20160321140358_create_posts.rb +9 -0
- data/integration/multiverse/rails42_app/db/schema.rb +22 -0
- data/integration/multiverse/rails42_app/db/seeds.rb +7 -0
- 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 +67 -0
- data/integration/multiverse/rails42_app/public/422.html +67 -0
- data/integration/multiverse/rails42_app/public/500.html +66 -0
- data/integration/multiverse/rails42_app/public/favicon.ico +0 -0
- data/integration/multiverse/rails42_app/public/robots.txt +5 -0
- data/integration/multiverse/rails42_app/test/controllers/.keep +0 -0
- data/integration/multiverse/rails42_app/test/controllers/posts_controller_test.rb +49 -0
- data/integration/multiverse/rails42_app/test/fixtures/.keep +0 -0
- data/integration/multiverse/rails42_app/test/fixtures/posts.yml +7 -0
- 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 +78 -0
- data/integration/multiverse/rails42_app/test/jobs/foobar_cleanup_job_test.rb +7 -0
- data/integration/multiverse/rails42_app/test/mailers/.keep +0 -0
- data/integration/multiverse/rails42_app/test/models/.keep +0 -0
- data/{test/dummy/test/unit/task_test.rb → integration/multiverse/rails42_app/test/models/post_test.rb} +1 -1
- data/integration/multiverse/rails42_app/test/test_helper.rb +11 -0
- data/integration/multiverse_helper.rb +16 -0
- data/integration/multiverse_spec.rb +40 -0
- data/lib/vitals/configuration.rb +35 -0
- data/lib/vitals/formats/host_last_format.rb +26 -0
- data/lib/vitals/formats/production_format.rb +21 -0
- data/lib/vitals/integrations/notifications/action_controller.rb +26 -0
- data/lib/vitals/integrations/notifications/active_job.rb +18 -0
- data/lib/vitals/integrations/notifications/base.rb +20 -0
- data/lib/vitals/integrations/notifications/grape.rb +30 -0
- data/lib/vitals/integrations/rack/requests.rb +23 -0
- data/lib/vitals/reporters/base_reporter.rb +9 -0
- data/lib/vitals/reporters/console_reporter.rb +23 -0
- data/lib/vitals/reporters/inmem_reporter.rb +31 -0
- data/lib/vitals/reporters/multi_reporter.rb +24 -0
- data/lib/vitals/reporters/statsd_reporter.rb +27 -0
- data/lib/vitals/utils.rb +15 -0
- data/lib/vitals/version.rb +1 -1
- data/lib/vitals.rb +46 -23
- data/vitals.gemspec +48 -0
- metadata +404 -147
- data/MIT-LICENSE +0 -20
- data/lib/generators/vitals/templates/vitals_initializer.rb +0 -7
- data/lib/generators/vitals/vitals_generator.rb +0 -12
- data/lib/tasks/vitals_tasks.rake +0 -4
- data/lib/vitals/reporter.rb +0 -23
- data/test/dummy/app/assets/javascripts/application.js +0 -9
- data/test/dummy/app/assets/javascripts/tasks.js +0 -2
- data/test/dummy/app/assets/stylesheets/application.css +0 -7
- data/test/dummy/app/assets/stylesheets/scaffold.css +0 -56
- data/test/dummy/app/assets/stylesheets/tasks.css +0 -4
- data/test/dummy/app/controllers/tasks_controller.rb +0 -83
- data/test/dummy/app/helpers/tasks_helper.rb +0 -2
- data/test/dummy/app/models/task.rb +0 -2
- data/test/dummy/app/views/tasks/_form.html.erb +0 -21
- data/test/dummy/app/views/tasks/edit.html.erb +0 -6
- data/test/dummy/app/views/tasks/index.html.erb +0 -23
- data/test/dummy/app/views/tasks/new.html.erb +0 -5
- data/test/dummy/app/views/tasks/show.html.erb +0 -10
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/routes.rb +0 -60
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/migrate/20110917182114_create_tasks.rb +0 -9
- data/test/dummy/log/development.log +0 -55
- data/test/dummy/test/fixtures/tasks.yml +0 -7
- data/test/dummy/test/functional/tasks_controller_test.rb +0 -49
- data/test/dummy/test/unit/helpers/tasks_helper_test.rb +0 -4
- data/test/test_helper.rb +0 -10
- data/test/vitals_test.rb +0 -7
data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/development.rb
RENAMED
@@ -1,14 +1,13 @@
|
|
1
|
-
|
1
|
+
GrapeOnRails::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
|
+
config.eager_load = false
|
5
|
+
|
4
6
|
# In the development environment your application's code is reloaded on
|
5
|
-
# every request.
|
7
|
+
# every request. This slows down response time but is perfect for development
|
6
8
|
# since you don't have to restart the web server when you make code changes.
|
7
9
|
config.cache_classes = false
|
8
10
|
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
11
|
# Show full error reports and disable caching
|
13
12
|
config.consider_all_requests_local = true
|
14
13
|
config.action_controller.perform_caching = false
|
@@ -1,6 +1,8 @@
|
|
1
|
-
|
1
|
+
GrapeOnRails::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
|
+
config.eager_load = true
|
5
|
+
|
4
6
|
# Code is not reloaded between requests
|
5
7
|
config.cache_classes = true
|
6
8
|
|
@@ -9,7 +11,7 @@ Dummy::Application.configure do
|
|
9
11
|
config.action_controller.perform_caching = true
|
10
12
|
|
11
13
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
-
config.
|
14
|
+
config.serve_static_files = false
|
13
15
|
|
14
16
|
# Compress JavaScripts and CSS
|
15
17
|
config.assets.compress = true
|
@@ -20,7 +22,7 @@ Dummy::Application.configure do
|
|
20
22
|
# Generate digests for assets URLs
|
21
23
|
config.assets.digest = true
|
22
24
|
|
23
|
-
# Defaults to
|
25
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
26
|
# config.assets.manifest = YOUR_PATH
|
25
27
|
|
26
28
|
# Specifies the header that your server uses for sending files
|
@@ -33,8 +35,11 @@ Dummy::Application.configure do
|
|
33
35
|
# See everything in the log (default is :info)
|
34
36
|
# config.log_level = :debug
|
35
37
|
|
38
|
+
# Prepend all log lines with the following tags
|
39
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
40
|
+
|
36
41
|
# Use a different logger for distributed setups
|
37
|
-
# config.logger = SyslogLogger.new
|
42
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
38
43
|
|
39
44
|
# Use a different cache store in production
|
40
45
|
# config.cache_store = :mem_cache_store
|
@@ -1,42 +1,33 @@
|
|
1
|
-
|
1
|
+
GrapeOnRails::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
|
+
config.eager_load = false
|
5
|
+
|
4
6
|
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite.
|
7
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
8
|
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs.
|
9
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
10
|
config.cache_classes = true
|
9
11
|
|
10
12
|
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.
|
12
|
-
config.static_cache_control =
|
13
|
-
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
13
|
+
config.serve_static_files = true
|
14
|
+
config.static_cache_control = 'public, max-age=3600'
|
16
15
|
|
17
16
|
# Show full error reports and disable caching
|
18
17
|
config.consider_all_requests_local = true
|
19
18
|
config.action_controller.perform_caching = false
|
20
19
|
|
21
20
|
# Raise exceptions instead of rendering exception templates
|
22
|
-
config.action_dispatch.show_exceptions =
|
21
|
+
config.action_dispatch.show_exceptions = true
|
23
22
|
|
24
23
|
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection
|
24
|
+
config.action_controller.allow_forgery_protection = false
|
26
25
|
|
27
26
|
# Tell Action Mailer not to deliver emails to the real world.
|
28
27
|
# The :test delivery method accumulates sent emails in the
|
29
28
|
# ActionMailer::Base.deliveries array.
|
30
29
|
config.action_mailer.delivery_method = :test
|
31
30
|
|
32
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
-
# like if you have constraints or database-specific column types
|
35
|
-
# config.active_record.schema_format = :sql
|
36
|
-
|
37
31
|
# Print deprecation notices to the stderr
|
38
32
|
config.active_support.deprecation = :stderr
|
39
|
-
|
40
|
-
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
|
41
|
-
config.assets.allow_debugging = true
|
42
33
|
end
|
data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/backtrace_silencers.rb
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
api_dir = "#{Rails.root}/app/api"
|
2
|
+
file_ext = 'rb'
|
3
|
+
|
4
|
+
api_files = Dir["#{api_dir}/**/*.#{file_ext}"]
|
5
|
+
|
6
|
+
api_reloader = ActiveSupport::FileUpdateChecker.new(api_files, api_dir => file_ext) do
|
7
|
+
Rails.logger.info 'Reload routes for changed api files'
|
8
|
+
Rails.application.reload_routes!
|
9
|
+
end
|
10
|
+
|
11
|
+
ActionDispatch::Reloader.to_prepare do
|
12
|
+
api_reloader.execute_if_updated
|
13
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
GrapeOnRails::Application.config.secret_key_base = 'secret'
|
data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/session_store.rb
RENAMED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
|
3
|
+
GrapeOnRails::Application.config.session_store :cookie_store, key: '_grape-on-rails_session'
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
7
|
# (create the session table with "rails generate session_migration")
|
8
|
-
#
|
8
|
+
# GrapeOnRails::Application.config.session_store :active_record_store
|
data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/wrap_parameters.rb
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
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: 0) do
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,7 @@
|
|
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
|
data/{test/dummy/public/favicon.ico → integration/multiverse/grape-on-rails/lib/tasks/.gitkeep}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
3
|
|
4
|
-
APP_PATH = File.expand_path('../../config/application',
|
5
|
-
require File.expand_path('../../config/boot',
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
6
|
require 'rails/commands'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Acme::Ping do
|
4
|
+
before do
|
5
|
+
Vitals.reporter.flush
|
6
|
+
end
|
7
|
+
it 'ping' do
|
8
|
+
get '/api/ping'
|
9
|
+
metrics = %w{
|
10
|
+
grape.api.ping_get.200.all
|
11
|
+
}
|
12
|
+
assert_timings Vitals.reporter.reports, metrics, [0]
|
13
|
+
expect(response.body).to eq({ ping: 'pong' }.to_json)
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
ENV['RAILS_ENV'] = 'test'
|
4
|
+
|
5
|
+
require File.expand_path('../../config/environment', __FILE__)
|
6
|
+
|
7
|
+
require 'rspec/rails'
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.mock_with :rspec
|
10
|
+
config.expect_with :rspec
|
11
|
+
config.include RSpec::Rails::RequestExampleGroup, type: :request, file_path: /spec\/api/
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'capybara/rspec'
|
15
|
+
require File.expand_path( '../../../multiverse_helper', File.dirname(__FILE__))
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-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/*
|
16
|
+
!/log/.keep
|
17
|
+
/tmp
|
18
|
+
vendor/
|
@@ -0,0 +1,49 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
|
4
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
5
|
+
gem 'rails', '4.2.5'
|
6
|
+
# Use sqlite3 as the database for Active Record
|
7
|
+
gem 'sqlite3'
|
8
|
+
# Use SCSS for stylesheets
|
9
|
+
gem 'sass-rails', '~> 5.0'
|
10
|
+
# Use Uglifier as compressor for JavaScript assets
|
11
|
+
gem 'uglifier', '>= 1.3.0'
|
12
|
+
# Use CoffeeScript for .coffee assets and views
|
13
|
+
gem 'coffee-rails', '~> 4.1.0'
|
14
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
15
|
+
# gem 'therubyracer', platforms: :ruby
|
16
|
+
|
17
|
+
# Use jquery as the JavaScript library
|
18
|
+
gem 'jquery-rails'
|
19
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
20
|
+
gem 'turbolinks'
|
21
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
22
|
+
gem 'jbuilder', '~> 2.0'
|
23
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
24
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
25
|
+
|
26
|
+
# Use ActiveModel has_secure_password
|
27
|
+
# gem 'bcrypt', '~> 3.1.7'
|
28
|
+
|
29
|
+
# Use Unicorn as the app server
|
30
|
+
# gem 'unicorn'
|
31
|
+
|
32
|
+
# Use Capistrano for deployment
|
33
|
+
# gem 'capistrano-rails', group: :development
|
34
|
+
|
35
|
+
group :development, :test do
|
36
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
37
|
+
gem 'byebug'
|
38
|
+
end
|
39
|
+
|
40
|
+
group :development do
|
41
|
+
# Access an IRB console on exception pages or by using <%= console %> in views
|
42
|
+
gem 'web-console', '~> 2.0'
|
43
|
+
|
44
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
45
|
+
gem 'spring'
|
46
|
+
end
|
47
|
+
|
48
|
+
gem 'vitals', path: '../../../'
|
49
|
+
|
@@ -0,0 +1,167 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../../
|
3
|
+
specs:
|
4
|
+
vitals (0.3.0)
|
5
|
+
statsd-ruby (~> 1.3.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (4.2.5)
|
11
|
+
actionpack (= 4.2.5)
|
12
|
+
actionview (= 4.2.5)
|
13
|
+
activejob (= 4.2.5)
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
actionpack (4.2.5)
|
17
|
+
actionview (= 4.2.5)
|
18
|
+
activesupport (= 4.2.5)
|
19
|
+
rack (~> 1.6)
|
20
|
+
rack-test (~> 0.6.2)
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
23
|
+
actionview (4.2.5)
|
24
|
+
activesupport (= 4.2.5)
|
25
|
+
builder (~> 3.1)
|
26
|
+
erubis (~> 2.7.0)
|
27
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
activejob (4.2.5)
|
30
|
+
activesupport (= 4.2.5)
|
31
|
+
globalid (>= 0.3.0)
|
32
|
+
activemodel (4.2.5)
|
33
|
+
activesupport (= 4.2.5)
|
34
|
+
builder (~> 3.1)
|
35
|
+
activerecord (4.2.5)
|
36
|
+
activemodel (= 4.2.5)
|
37
|
+
activesupport (= 4.2.5)
|
38
|
+
arel (~> 6.0)
|
39
|
+
activesupport (4.2.5)
|
40
|
+
i18n (~> 0.7)
|
41
|
+
json (~> 1.7, >= 1.7.7)
|
42
|
+
minitest (~> 5.1)
|
43
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
44
|
+
tzinfo (~> 1.1)
|
45
|
+
arel (6.0.3)
|
46
|
+
binding_of_caller (0.7.2)
|
47
|
+
debug_inspector (>= 0.0.1)
|
48
|
+
builder (3.2.2)
|
49
|
+
byebug (8.2.2)
|
50
|
+
coffee-rails (4.1.1)
|
51
|
+
coffee-script (>= 2.2.0)
|
52
|
+
railties (>= 4.0.0, < 5.1.x)
|
53
|
+
coffee-script (2.4.1)
|
54
|
+
coffee-script-source
|
55
|
+
execjs
|
56
|
+
coffee-script-source (1.10.0)
|
57
|
+
concurrent-ruby (1.0.1)
|
58
|
+
debug_inspector (0.0.2)
|
59
|
+
erubis (2.7.0)
|
60
|
+
execjs (2.6.0)
|
61
|
+
globalid (0.3.6)
|
62
|
+
activesupport (>= 4.1.0)
|
63
|
+
i18n (0.7.0)
|
64
|
+
jbuilder (2.4.1)
|
65
|
+
activesupport (>= 3.0.0, < 5.1)
|
66
|
+
multi_json (~> 1.2)
|
67
|
+
jquery-rails (4.1.1)
|
68
|
+
rails-dom-testing (>= 1, < 3)
|
69
|
+
railties (>= 4.2.0)
|
70
|
+
thor (>= 0.14, < 2.0)
|
71
|
+
json (1.8.3)
|
72
|
+
loofah (2.0.3)
|
73
|
+
nokogiri (>= 1.5.9)
|
74
|
+
mail (2.6.3)
|
75
|
+
mime-types (>= 1.16, < 3)
|
76
|
+
mime-types (2.99.1)
|
77
|
+
mini_portile2 (2.0.0)
|
78
|
+
minitest (5.8.4)
|
79
|
+
multi_json (1.11.2)
|
80
|
+
nokogiri (1.6.7.2)
|
81
|
+
mini_portile2 (~> 2.0.0.rc2)
|
82
|
+
rack (1.6.4)
|
83
|
+
rack-test (0.6.3)
|
84
|
+
rack (>= 1.0)
|
85
|
+
rails (4.2.5)
|
86
|
+
actionmailer (= 4.2.5)
|
87
|
+
actionpack (= 4.2.5)
|
88
|
+
actionview (= 4.2.5)
|
89
|
+
activejob (= 4.2.5)
|
90
|
+
activemodel (= 4.2.5)
|
91
|
+
activerecord (= 4.2.5)
|
92
|
+
activesupport (= 4.2.5)
|
93
|
+
bundler (>= 1.3.0, < 2.0)
|
94
|
+
railties (= 4.2.5)
|
95
|
+
sprockets-rails
|
96
|
+
rails-deprecated_sanitizer (1.0.3)
|
97
|
+
activesupport (>= 4.2.0.alpha)
|
98
|
+
rails-dom-testing (1.0.7)
|
99
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
100
|
+
nokogiri (~> 1.6.0)
|
101
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
102
|
+
rails-html-sanitizer (1.0.3)
|
103
|
+
loofah (~> 2.0)
|
104
|
+
railties (4.2.5)
|
105
|
+
actionpack (= 4.2.5)
|
106
|
+
activesupport (= 4.2.5)
|
107
|
+
rake (>= 0.8.7)
|
108
|
+
thor (>= 0.18.1, < 2.0)
|
109
|
+
rake (11.1.1)
|
110
|
+
rdoc (4.2.2)
|
111
|
+
json (~> 1.4)
|
112
|
+
sass (3.4.21)
|
113
|
+
sass-rails (5.0.4)
|
114
|
+
railties (>= 4.0.0, < 5.0)
|
115
|
+
sass (~> 3.1)
|
116
|
+
sprockets (>= 2.8, < 4.0)
|
117
|
+
sprockets-rails (>= 2.0, < 4.0)
|
118
|
+
tilt (>= 1.1, < 3)
|
119
|
+
sdoc (0.4.1)
|
120
|
+
json (~> 1.7, >= 1.7.7)
|
121
|
+
rdoc (~> 4.0)
|
122
|
+
spring (1.6.4)
|
123
|
+
sprockets (3.5.2)
|
124
|
+
concurrent-ruby (~> 1.0)
|
125
|
+
rack (> 1, < 3)
|
126
|
+
sprockets-rails (3.0.4)
|
127
|
+
actionpack (>= 4.0)
|
128
|
+
activesupport (>= 4.0)
|
129
|
+
sprockets (>= 3.0.0)
|
130
|
+
sqlite3 (1.3.11)
|
131
|
+
statsd-ruby (1.3.0)
|
132
|
+
thor (0.19.1)
|
133
|
+
thread_safe (0.3.5)
|
134
|
+
tilt (2.0.2)
|
135
|
+
turbolinks (2.5.3)
|
136
|
+
coffee-rails
|
137
|
+
tzinfo (1.2.2)
|
138
|
+
thread_safe (~> 0.1)
|
139
|
+
uglifier (2.7.2)
|
140
|
+
execjs (>= 0.3.0)
|
141
|
+
json (>= 1.8.0)
|
142
|
+
web-console (2.3.0)
|
143
|
+
activemodel (>= 4.0)
|
144
|
+
binding_of_caller (>= 0.7.2)
|
145
|
+
railties (>= 4.0)
|
146
|
+
sprockets-rails (>= 2.0, < 4.0)
|
147
|
+
|
148
|
+
PLATFORMS
|
149
|
+
ruby
|
150
|
+
|
151
|
+
DEPENDENCIES
|
152
|
+
byebug
|
153
|
+
coffee-rails (~> 4.1.0)
|
154
|
+
jbuilder (~> 2.0)
|
155
|
+
jquery-rails
|
156
|
+
rails (= 4.2.5)
|
157
|
+
sass-rails (~> 5.0)
|
158
|
+
sdoc (~> 0.4.0)
|
159
|
+
spring
|
160
|
+
sqlite3
|
161
|
+
turbolinks
|
162
|
+
uglifier (>= 1.3.0)
|
163
|
+
vitals!
|
164
|
+
web-console (~> 2.0)
|
165
|
+
|
166
|
+
BUNDLED WITH
|
167
|
+
1.11.2
|
@@ -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>.
|
@@ -1,7 +1,6 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
3
|
|
5
4
|
require File.expand_path('../config/application', __FILE__)
|
6
5
|
|
7
|
-
|
6
|
+
Rails.application.load_tasks
|
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 any plugin's vendor/assets/javascripts directory 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/rails/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,15 @@
|
|
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 any plugin's vendor/assets/stylesheets directory 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 bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|