vitals 0.0.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.travis.yml +15 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +157 -0
  6. data/Guardfile +11 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +135 -9
  9. data/Rakefile +17 -31
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/integration/multiverse/grape-on-rack/.gitignore +7 -0
  13. data/integration/multiverse/grape-on-rack/.rspec +2 -0
  14. data/integration/multiverse/grape-on-rack/.rubocop.yml +2 -0
  15. data/integration/multiverse/grape-on-rack/.rubocop_todo.yml +50 -0
  16. data/integration/multiverse/grape-on-rack/.travis.yml +12 -0
  17. data/integration/multiverse/grape-on-rack/Gemfile +28 -0
  18. data/integration/multiverse/grape-on-rack/Gemfile.lock +187 -0
  19. data/integration/multiverse/grape-on-rack/Guardfile +8 -0
  20. data/integration/multiverse/grape-on-rack/LICENSE +21 -0
  21. data/integration/multiverse/grape-on-rack/README.md +88 -0
  22. data/integration/multiverse/grape-on-rack/Rakefile +27 -0
  23. data/integration/multiverse/grape-on-rack/api/content_type.rb +18 -0
  24. data/integration/multiverse/grape-on-rack/api/entities.rb +28 -0
  25. data/integration/multiverse/grape-on-rack/api/get_json.rb +24 -0
  26. data/integration/multiverse/grape-on-rack/api/header_versioning.rb +9 -0
  27. data/integration/multiverse/grape-on-rack/api/path_versioning.rb +9 -0
  28. data/integration/multiverse/grape-on-rack/api/ping.rb +8 -0
  29. data/integration/multiverse/grape-on-rack/api/post_json.rb +11 -0
  30. data/integration/multiverse/grape-on-rack/api/post_put.rb +24 -0
  31. data/integration/multiverse/grape-on-rack/api/rescue_from.rb +11 -0
  32. data/integration/multiverse/grape-on-rack/api/upload_file.rb +22 -0
  33. data/integration/multiverse/grape-on-rack/api/wrap_response.rb +14 -0
  34. data/integration/multiverse/grape-on-rack/api/wrap_response_decorator.rb +15 -0
  35. data/integration/multiverse/grape-on-rack/app/acme_app.rb +49 -0
  36. data/integration/multiverse/grape-on-rack/app/api.rb +18 -0
  37. data/integration/multiverse/grape-on-rack/config/application.rb +23 -0
  38. data/integration/multiverse/grape-on-rack/config/boot.rb +2 -0
  39. data/integration/multiverse/grape-on-rack/config/environment.rb +3 -0
  40. data/integration/multiverse/grape-on-rack/config/newrelic.yml +255 -0
  41. data/integration/multiverse/grape-on-rack/config.ru +11 -0
  42. data/integration/multiverse/grape-on-rack/public/errors/404.html +15 -0
  43. data/integration/multiverse/grape-on-rack/public/errors/500.html +15 -0
  44. data/integration/multiverse/grape-on-rack/public/images/index.html +1 -0
  45. data/integration/multiverse/grape-on-rack/public/images/rack-logo.png +0 -0
  46. data/integration/multiverse/grape-on-rack/public/index.html +23 -0
  47. data/integration/multiverse/grape-on-rack/public/scripts/jquery-1.7.1.min.js +4 -0
  48. data/integration/multiverse/grape-on-rack/public/scripts/ring.js +17 -0
  49. data/integration/multiverse/grape-on-rack/spec/api/post_put_spec.rb +21 -0
  50. data/integration/multiverse/grape-on-rack/spec/fixtures/grape_logo.png +0 -0
  51. data/integration/multiverse/grape-on-rack/spec/spec_helper.rb +24 -0
  52. data/integration/multiverse/grape-on-rails/.gitignore +16 -0
  53. data/integration/multiverse/grape-on-rails/.rspec +2 -0
  54. data/integration/multiverse/grape-on-rails/.rubocop.yml +6 -0
  55. data/integration/multiverse/grape-on-rails/.rubocop_todo.yml +33 -0
  56. data/integration/multiverse/grape-on-rails/.travis.yml +17 -0
  57. data/integration/multiverse/grape-on-rails/Gemfile +22 -0
  58. data/integration/multiverse/grape-on-rails/Gemfile.lock +238 -0
  59. data/integration/multiverse/grape-on-rails/README.md +29 -0
  60. data/integration/multiverse/grape-on-rails/Rakefile +16 -0
  61. data/integration/multiverse/grape-on-rails/app/api/acme/ping.rb +8 -0
  62. data/integration/multiverse/grape-on-rails/app/api/acme/post.rb +10 -0
  63. data/integration/multiverse/grape-on-rails/app/api/acme/protected.rb +13 -0
  64. data/integration/multiverse/grape-on-rails/app/api/acme/raise.rb +8 -0
  65. data/integration/multiverse/grape-on-rails/app/api/api.rb +8 -0
  66. data/integration/multiverse/grape-on-rails/app/assets/images/rails.png +0 -0
  67. data/integration/multiverse/grape-on-rails/app/assets/javascripts/application.js +15 -0
  68. data/integration/multiverse/grape-on-rails/app/assets/javascripts/welcome.js.coffee +3 -0
  69. data/integration/multiverse/grape-on-rails/app/assets/stylesheets/application.css +13 -0
  70. data/integration/multiverse/grape-on-rails/app/assets/stylesheets/welcome.css.scss +3 -0
  71. data/{test/dummy → integration/multiverse/grape-on-rails}/app/controllers/application_controller.rb +0 -0
  72. data/integration/multiverse/grape-on-rails/app/controllers/welcome_controller.rb +4 -0
  73. data/{test/dummy → integration/multiverse/grape-on-rails}/app/helpers/application_helper.rb +0 -0
  74. data/integration/multiverse/grape-on-rails/app/helpers/welcome_helper.rb +2 -0
  75. data/{test/dummy/db/development.sqlite3 → integration/multiverse/grape-on-rails/app/mailers/.gitkeep} +0 -0
  76. data/{test/dummy/db/test.sqlite3 → integration/multiverse/grape-on-rails/app/models/.gitkeep} +0 -0
  77. data/{test/dummy → integration/multiverse/grape-on-rails}/app/views/layouts/application.html.erb +2 -2
  78. data/integration/multiverse/grape-on-rails/app/views/welcome/index.html.erb +6 -0
  79. data/integration/multiverse/grape-on-rails/bin/bundle +3 -0
  80. data/integration/multiverse/grape-on-rails/bin/rails +4 -0
  81. data/integration/multiverse/grape-on-rails/bin/rake +4 -0
  82. data/{test/dummy → integration/multiverse/grape-on-rails}/config/application.rb +26 -6
  83. data/integration/multiverse/grape-on-rails/config/boot.rb +6 -0
  84. data/integration/multiverse/grape-on-rails/config/database.travis.yml +4 -0
  85. data/integration/multiverse/grape-on-rails/config/database.yml +16 -0
  86. data/{test/dummy → integration/multiverse/grape-on-rails}/config/environment.rb +1 -1
  87. data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/development.rb +4 -5
  88. data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/production.rb +9 -4
  89. data/{test/dummy → integration/multiverse/grape-on-rails}/config/environments/test.rb +9 -18
  90. data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/backtrace_silencers.rb +0 -0
  91. data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/inflections.rb +5 -0
  92. data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/mime_types.rb +0 -0
  93. data/integration/multiverse/grape-on-rails/config/initializers/reload_api.rb +13 -0
  94. data/integration/multiverse/grape-on-rails/config/initializers/secret_token.rb +1 -0
  95. data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/session_store.rb +2 -2
  96. data/integration/multiverse/grape-on-rails/config/initializers/vitals.rb +8 -0
  97. data/{test/dummy → integration/multiverse/grape-on-rails}/config/initializers/wrap_parameters.rb +0 -0
  98. data/{test/dummy → integration/multiverse/grape-on-rails}/config/locales/en.yml +0 -0
  99. data/integration/multiverse/grape-on-rails/config/routes.rb +5 -0
  100. data/integration/multiverse/grape-on-rails/config.ru +4 -0
  101. data/integration/multiverse/grape-on-rails/db/schema.rb +16 -0
  102. data/integration/multiverse/grape-on-rails/db/seeds.rb +7 -0
  103. data/integration/multiverse/grape-on-rails/doc/README_FOR_APP +2 -0
  104. data/{test/dummy/log/test.log → integration/multiverse/grape-on-rails/lib/assets/.gitkeep} +0 -0
  105. data/{test/dummy/public/favicon.ico → integration/multiverse/grape-on-rails/lib/tasks/.gitkeep} +0 -0
  106. data/integration/multiverse/grape-on-rails/log/.gitkeep +0 -0
  107. data/{test/dummy → integration/multiverse/grape-on-rails}/public/404.html +0 -0
  108. data/{test/dummy → integration/multiverse/grape-on-rails}/public/422.html +0 -0
  109. data/{test/dummy → integration/multiverse/grape-on-rails}/public/500.html +0 -1
  110. data/integration/multiverse/grape-on-rails/public/favicon.ico +0 -0
  111. data/integration/multiverse/grape-on-rails/public/robots.txt +5 -0
  112. data/{test/dummy → integration/multiverse/grape-on-rails}/script/rails +2 -2
  113. data/integration/multiverse/grape-on-rails/spec/api/ping_spec.rb +15 -0
  114. data/integration/multiverse/grape-on-rails/spec/spec_helper.rb +15 -0
  115. data/integration/multiverse/rails42_app/.gitignore +18 -0
  116. data/integration/multiverse/rails42_app/Gemfile +49 -0
  117. data/integration/multiverse/rails42_app/Gemfile.lock +167 -0
  118. data/integration/multiverse/rails42_app/README.rdoc +28 -0
  119. data/{test/dummy → integration/multiverse/rails42_app}/Rakefile +1 -2
  120. data/integration/multiverse/rails42_app/app/assets/images/.keep +0 -0
  121. data/integration/multiverse/rails42_app/app/assets/javascripts/application.js +16 -0
  122. data/integration/multiverse/rails42_app/app/assets/javascripts/posts.coffee +3 -0
  123. data/integration/multiverse/rails42_app/app/assets/stylesheets/application.css +15 -0
  124. data/integration/multiverse/rails42_app/app/assets/stylesheets/posts.scss +3 -0
  125. data/integration/multiverse/rails42_app/app/assets/stylesheets/scaffolds.scss +73 -0
  126. data/integration/multiverse/rails42_app/app/controllers/application_controller.rb +5 -0
  127. data/integration/multiverse/rails42_app/app/controllers/concerns/.keep +0 -0
  128. data/integration/multiverse/rails42_app/app/controllers/posts_controller.rb +75 -0
  129. data/integration/multiverse/rails42_app/app/helpers/application_helper.rb +2 -0
  130. data/integration/multiverse/rails42_app/app/helpers/posts_helper.rb +2 -0
  131. data/integration/multiverse/rails42_app/app/jobs/foobar_cleanup_job.rb +7 -0
  132. data/integration/multiverse/rails42_app/app/mailers/.keep +0 -0
  133. data/integration/multiverse/rails42_app/app/models/.keep +0 -0
  134. data/integration/multiverse/rails42_app/app/models/concerns/.keep +0 -0
  135. data/integration/multiverse/rails42_app/app/models/post.rb +2 -0
  136. data/integration/multiverse/rails42_app/app/views/layouts/application.html.erb +14 -0
  137. data/integration/multiverse/rails42_app/app/views/posts/_form.html.erb +21 -0
  138. data/integration/multiverse/rails42_app/app/views/posts/edit.html.erb +6 -0
  139. data/integration/multiverse/rails42_app/app/views/posts/index.html.erb +27 -0
  140. data/integration/multiverse/rails42_app/app/views/posts/index.json.jbuilder +4 -0
  141. data/integration/multiverse/rails42_app/app/views/posts/new.html.erb +5 -0
  142. data/integration/multiverse/rails42_app/app/views/posts/show.html.erb +9 -0
  143. data/integration/multiverse/rails42_app/app/views/posts/show.json.jbuilder +1 -0
  144. data/integration/multiverse/rails42_app/bin/bundle +3 -0
  145. data/integration/multiverse/rails42_app/bin/rails +9 -0
  146. data/integration/multiverse/rails42_app/bin/rake +9 -0
  147. data/integration/multiverse/rails42_app/bin/setup +29 -0
  148. data/integration/multiverse/rails42_app/bin/spring +15 -0
  149. data/integration/multiverse/rails42_app/config/application.rb +26 -0
  150. data/integration/multiverse/rails42_app/config/boot.rb +3 -0
  151. data/{test/dummy → integration/multiverse/rails42_app}/config/database.yml +8 -8
  152. data/integration/multiverse/rails42_app/config/environment.rb +5 -0
  153. data/integration/multiverse/rails42_app/config/environments/development.rb +41 -0
  154. data/integration/multiverse/rails42_app/config/environments/production.rb +79 -0
  155. data/integration/multiverse/rails42_app/config/environments/test.rb +42 -0
  156. data/integration/multiverse/rails42_app/config/initializers/assets.rb +11 -0
  157. data/integration/multiverse/rails42_app/config/initializers/backtrace_silencers.rb +7 -0
  158. data/integration/multiverse/rails42_app/config/initializers/cookies_serializer.rb +3 -0
  159. data/integration/multiverse/rails42_app/config/initializers/filter_parameter_logging.rb +4 -0
  160. data/integration/multiverse/rails42_app/config/initializers/inflections.rb +16 -0
  161. data/integration/multiverse/rails42_app/config/initializers/mime_types.rb +4 -0
  162. data/integration/multiverse/rails42_app/config/initializers/session_store.rb +3 -0
  163. data/integration/multiverse/rails42_app/config/initializers/vitals.rb +12 -0
  164. data/integration/multiverse/rails42_app/config/initializers/wrap_parameters.rb +14 -0
  165. data/integration/multiverse/rails42_app/config/locales/en.yml +23 -0
  166. data/integration/multiverse/rails42_app/config/routes.rb +57 -0
  167. data/integration/multiverse/rails42_app/config/secrets.yml +22 -0
  168. data/integration/multiverse/rails42_app/config.ru +4 -0
  169. data/integration/multiverse/rails42_app/db/migrate/20160321140358_create_posts.rb +9 -0
  170. data/integration/multiverse/rails42_app/db/schema.rb +22 -0
  171. data/integration/multiverse/rails42_app/db/seeds.rb +7 -0
  172. data/integration/multiverse/rails42_app/lib/assets/.keep +0 -0
  173. data/integration/multiverse/rails42_app/lib/tasks/.keep +0 -0
  174. data/integration/multiverse/rails42_app/log/.keep +0 -0
  175. data/integration/multiverse/rails42_app/public/404.html +67 -0
  176. data/integration/multiverse/rails42_app/public/422.html +67 -0
  177. data/integration/multiverse/rails42_app/public/500.html +66 -0
  178. data/integration/multiverse/rails42_app/public/favicon.ico +0 -0
  179. data/integration/multiverse/rails42_app/public/robots.txt +5 -0
  180. data/integration/multiverse/rails42_app/test/controllers/.keep +0 -0
  181. data/integration/multiverse/rails42_app/test/controllers/posts_controller_test.rb +49 -0
  182. data/integration/multiverse/rails42_app/test/fixtures/.keep +0 -0
  183. data/integration/multiverse/rails42_app/test/fixtures/posts.yml +7 -0
  184. data/integration/multiverse/rails42_app/test/helpers/.keep +0 -0
  185. data/integration/multiverse/rails42_app/test/integration/.keep +0 -0
  186. data/integration/multiverse/rails42_app/test/integration/vitals_flow_test.rb +78 -0
  187. data/integration/multiverse/rails42_app/test/jobs/foobar_cleanup_job_test.rb +7 -0
  188. data/integration/multiverse/rails42_app/test/mailers/.keep +0 -0
  189. data/integration/multiverse/rails42_app/test/models/.keep +0 -0
  190. data/{test/dummy/test/unit/task_test.rb → integration/multiverse/rails42_app/test/models/post_test.rb} +1 -1
  191. data/integration/multiverse/rails42_app/test/test_helper.rb +11 -0
  192. data/integration/multiverse_helper.rb +16 -0
  193. data/integration/multiverse_spec.rb +40 -0
  194. data/lib/vitals/configuration.rb +35 -0
  195. data/lib/vitals/formats/host_last_format.rb +26 -0
  196. data/lib/vitals/formats/production_format.rb +21 -0
  197. data/lib/vitals/integrations/notifications/action_controller.rb +26 -0
  198. data/lib/vitals/integrations/notifications/active_job.rb +18 -0
  199. data/lib/vitals/integrations/notifications/base.rb +20 -0
  200. data/lib/vitals/integrations/notifications/grape.rb +30 -0
  201. data/lib/vitals/integrations/rack/requests.rb +23 -0
  202. data/lib/vitals/reporters/base_reporter.rb +9 -0
  203. data/lib/vitals/reporters/console_reporter.rb +23 -0
  204. data/lib/vitals/reporters/inmem_reporter.rb +31 -0
  205. data/lib/vitals/reporters/multi_reporter.rb +24 -0
  206. data/lib/vitals/reporters/statsd_reporter.rb +27 -0
  207. data/lib/vitals/utils.rb +15 -0
  208. data/lib/vitals/version.rb +1 -1
  209. data/lib/vitals.rb +46 -23
  210. data/vitals.gemspec +48 -0
  211. metadata +404 -147
  212. data/MIT-LICENSE +0 -20
  213. data/lib/generators/vitals/templates/vitals_initializer.rb +0 -7
  214. data/lib/generators/vitals/vitals_generator.rb +0 -12
  215. data/lib/tasks/vitals_tasks.rake +0 -4
  216. data/lib/vitals/reporter.rb +0 -23
  217. data/test/dummy/app/assets/javascripts/application.js +0 -9
  218. data/test/dummy/app/assets/javascripts/tasks.js +0 -2
  219. data/test/dummy/app/assets/stylesheets/application.css +0 -7
  220. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -56
  221. data/test/dummy/app/assets/stylesheets/tasks.css +0 -4
  222. data/test/dummy/app/controllers/tasks_controller.rb +0 -83
  223. data/test/dummy/app/helpers/tasks_helper.rb +0 -2
  224. data/test/dummy/app/models/task.rb +0 -2
  225. data/test/dummy/app/views/tasks/_form.html.erb +0 -21
  226. data/test/dummy/app/views/tasks/edit.html.erb +0 -6
  227. data/test/dummy/app/views/tasks/index.html.erb +0 -23
  228. data/test/dummy/app/views/tasks/new.html.erb +0 -5
  229. data/test/dummy/app/views/tasks/show.html.erb +0 -10
  230. data/test/dummy/config/boot.rb +0 -10
  231. data/test/dummy/config/initializers/secret_token.rb +0 -7
  232. data/test/dummy/config/routes.rb +0 -60
  233. data/test/dummy/config.ru +0 -4
  234. data/test/dummy/db/migrate/20110917182114_create_tasks.rb +0 -9
  235. data/test/dummy/log/development.log +0 -55
  236. data/test/dummy/test/fixtures/tasks.yml +0 -7
  237. data/test/dummy/test/functional/tasks_controller_test.rb +0 -49
  238. data/test/dummy/test/unit/helpers/tasks_helper_test.rb +0 -4
  239. data/test/test_helper.rb +0 -10
  240. data/test/vitals_test.rb +0 -7
@@ -1,14 +1,13 @@
1
- Dummy::Application.configure do
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. This slows down response time but is perfect for development
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
- Dummy::Application.configure do
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.serve_static_assets = false
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 Rails.root.join("public/assets")
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
- Dummy::Application.configure do
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. You never need to work with it otherwise. Remember that
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. Don't rely on the data there!
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.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
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 = false
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 = false
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
@@ -8,3 +8,8 @@
8
8
  # inflect.irregular 'person', 'people'
9
9
  # inflect.uncountable %w( fish sheep )
10
10
  # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -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'
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
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
- # Dummy::Application.config.session_store :active_record_store
8
+ # GrapeOnRails::Application.config.session_store :active_record_store
@@ -0,0 +1,8 @@
1
+ require 'vitals'
2
+ Vitals.configure! do |c|
3
+ c.facility = 'grape_app'
4
+ end
5
+
6
+ require 'vitals/integrations/notifications/grape'
7
+ Vitals::Integrations::Notifications::Grape.subscribe!
8
+
@@ -0,0 +1,5 @@
1
+ GrapeOnRails::Application.routes.draw do
2
+ get 'welcome/index'
3
+ mount API => '/'
4
+ root 'welcome#index'
5
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run GrapeOnRails::Application
@@ -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)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -20,7 +20,6 @@
20
20
  <!-- This file lives in public/500.html -->
21
21
  <div class="dialog">
22
22
  <h1>We're sorry, but something went wrong.</h1>
23
- <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
23
  </div>
25
24
  </body>
26
25
  </html>
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -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', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
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
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -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,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -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
+ */
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the Posts controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/