cardiac 0.2.0.pre2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +2 -0
  3. data/LICENSE +22 -0
  4. data/Rakefile +66 -0
  5. data/cardiac-0.2.0.pre2.gem +0 -0
  6. data/cardiac.gemspec +48 -0
  7. data/lib/cardiac/declarations.rb +70 -0
  8. data/lib/cardiac/errors.rb +65 -0
  9. data/lib/cardiac/log_subscriber.rb +55 -0
  10. data/lib/cardiac/model/attributes.rb +146 -0
  11. data/lib/cardiac/model/base.rb +161 -0
  12. data/lib/cardiac/model/callbacks.rb +47 -0
  13. data/lib/cardiac/model/declarations.rb +106 -0
  14. data/lib/cardiac/model/dirty.rb +117 -0
  15. data/lib/cardiac/model/locale/en.yml +7 -0
  16. data/lib/cardiac/model/operations.rb +49 -0
  17. data/lib/cardiac/model/persistence.rb +171 -0
  18. data/lib/cardiac/model/querying.rb +129 -0
  19. data/lib/cardiac/model/validations.rb +124 -0
  20. data/lib/cardiac/model.rb +17 -0
  21. data/lib/cardiac/operation_builder.rb +75 -0
  22. data/lib/cardiac/operation_handler.rb +215 -0
  23. data/lib/cardiac/railtie.rb +20 -0
  24. data/lib/cardiac/reflections.rb +85 -0
  25. data/lib/cardiac/representation.rb +124 -0
  26. data/lib/cardiac/resource/adapter.rb +178 -0
  27. data/lib/cardiac/resource/builder.rb +107 -0
  28. data/lib/cardiac/resource/codec_methods.rb +58 -0
  29. data/lib/cardiac/resource/config_methods.rb +39 -0
  30. data/lib/cardiac/resource/extension_methods.rb +115 -0
  31. data/lib/cardiac/resource/request_methods.rb +138 -0
  32. data/lib/cardiac/resource/subresource.rb +88 -0
  33. data/lib/cardiac/resource/uri_methods.rb +176 -0
  34. data/lib/cardiac/resource.rb +77 -0
  35. data/lib/cardiac/util.rb +120 -0
  36. data/lib/cardiac/version.rb +3 -0
  37. data/lib/cardiac.rb +61 -0
  38. data/spec/rails-3.2/Gemfile +9 -0
  39. data/spec/rails-3.2/Gemfile.lock +136 -0
  40. data/spec/rails-3.2/Rakefile +10 -0
  41. data/spec/rails-3.2/app_root/app/assets/javascripts/application.js +15 -0
  42. data/spec/rails-3.2/app_root/app/assets/stylesheets/application.css +13 -0
  43. data/spec/rails-3.2/app_root/app/controllers/application_controller.rb +3 -0
  44. data/spec/rails-3.2/app_root/app/helpers/application_helper.rb +2 -0
  45. data/spec/rails-3.2/app_root/app/views/layouts/application.html.erb +14 -0
  46. data/spec/rails-3.2/app_root/config/application.rb +29 -0
  47. data/spec/rails-3.2/app_root/config/boot.rb +13 -0
  48. data/spec/rails-3.2/app_root/config/database.yml +25 -0
  49. data/spec/rails-3.2/app_root/config/environment.rb +5 -0
  50. data/spec/rails-3.2/app_root/config/environments/development.rb +10 -0
  51. data/spec/rails-3.2/app_root/config/environments/production.rb +11 -0
  52. data/spec/rails-3.2/app_root/config/environments/test.rb +11 -0
  53. data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +7 -0
  54. data/spec/rails-3.2/app_root/config/initializers/inflections.rb +15 -0
  55. data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +5 -0
  56. data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +7 -0
  57. data/spec/rails-3.2/app_root/config/initializers/session_store.rb +8 -0
  58. data/spec/rails-3.2/app_root/config/initializers/wrap_parameters.rb +14 -0
  59. data/spec/rails-3.2/app_root/config/locales/en.yml +5 -0
  60. data/spec/rails-3.2/app_root/config/routes.rb +2 -0
  61. data/spec/rails-3.2/app_root/db/test.sqlite3 +0 -0
  62. data/spec/rails-3.2/app_root/log/test.log +2403 -0
  63. data/spec/rails-3.2/app_root/public/404.html +26 -0
  64. data/spec/rails-3.2/app_root/public/422.html +26 -0
  65. data/spec/rails-3.2/app_root/public/500.html +25 -0
  66. data/spec/rails-3.2/app_root/public/favicon.ico +0 -0
  67. data/spec/rails-3.2/app_root/script/rails +6 -0
  68. data/spec/rails-3.2/spec/spec_helper.rb +25 -0
  69. data/spec/rails-4.0/Gemfile +9 -0
  70. data/spec/rails-4.0/Gemfile.lock +132 -0
  71. data/spec/rails-4.0/Rakefile +10 -0
  72. data/spec/rails-4.0/app_root/app/assets/javascripts/application.js +15 -0
  73. data/spec/rails-4.0/app_root/app/assets/stylesheets/application.css +13 -0
  74. data/spec/rails-4.0/app_root/app/controllers/application_controller.rb +3 -0
  75. data/spec/rails-4.0/app_root/app/helpers/application_helper.rb +2 -0
  76. data/spec/rails-4.0/app_root/app/views/layouts/application.html.erb +14 -0
  77. data/spec/rails-4.0/app_root/config/application.rb +28 -0
  78. data/spec/rails-4.0/app_root/config/boot.rb +13 -0
  79. data/spec/rails-4.0/app_root/config/database.yml +25 -0
  80. data/spec/rails-4.0/app_root/config/environment.rb +5 -0
  81. data/spec/rails-4.0/app_root/config/environments/development.rb +9 -0
  82. data/spec/rails-4.0/app_root/config/environments/production.rb +11 -0
  83. data/spec/rails-4.0/app_root/config/environments/test.rb +10 -0
  84. data/spec/rails-4.0/app_root/config/initializers/backtrace_silencers.rb +7 -0
  85. data/spec/rails-4.0/app_root/config/initializers/inflections.rb +15 -0
  86. data/spec/rails-4.0/app_root/config/initializers/mime_types.rb +5 -0
  87. data/spec/rails-4.0/app_root/config/initializers/secret_token.rb +7 -0
  88. data/spec/rails-4.0/app_root/config/initializers/session_store.rb +8 -0
  89. data/spec/rails-4.0/app_root/config/initializers/wrap_parameters.rb +14 -0
  90. data/spec/rails-4.0/app_root/config/locales/en.yml +5 -0
  91. data/spec/rails-4.0/app_root/config/routes.rb +2 -0
  92. data/spec/rails-4.0/app_root/db/test.sqlite3 +0 -0
  93. data/spec/rails-4.0/app_root/log/development.log +50 -0
  94. data/spec/rails-4.0/app_root/log/test.log +2399 -0
  95. data/spec/rails-4.0/app_root/public/404.html +26 -0
  96. data/spec/rails-4.0/app_root/public/422.html +26 -0
  97. data/spec/rails-4.0/app_root/public/500.html +25 -0
  98. data/spec/rails-4.0/app_root/public/favicon.ico +0 -0
  99. data/spec/rails-4.0/app_root/script/rails +6 -0
  100. data/spec/rails-4.0/spec/spec_helper.rb +25 -0
  101. data/spec/shared/cardiac/declarations_spec.rb +103 -0
  102. data/spec/shared/cardiac/model/base_spec.rb +446 -0
  103. data/spec/shared/cardiac/operation_builder_spec.rb +96 -0
  104. data/spec/shared/cardiac/operation_handler_spec.rb +82 -0
  105. data/spec/shared/cardiac/representation/reflection_spec.rb +73 -0
  106. data/spec/shared/cardiac/resource/adapter_spec.rb +83 -0
  107. data/spec/shared/cardiac/resource/builder_spec.rb +52 -0
  108. data/spec/shared/cardiac/resource/codec_methods_spec.rb +63 -0
  109. data/spec/shared/cardiac/resource/config_methods_spec.rb +52 -0
  110. data/spec/shared/cardiac/resource/extension_methods_spec.rb +215 -0
  111. data/spec/shared/cardiac/resource/request_methods_spec.rb +186 -0
  112. data/spec/shared/cardiac/resource/uri_methods_spec.rb +212 -0
  113. data/spec/shared/support/client_execution.rb +28 -0
  114. data/spec/spec_helper.rb +24 -0
  115. metadata +463 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,25 @@
1
+ # For code shared by all dummy Rails apps.
2
+ $: << File.join(File.dirname(__FILE__), "/../../lib" )
3
+
4
+ ENV['RAILS_ENV'] = 'test'
5
+ ENV['RAILS_ROOT'] = 'app_root'
6
+
7
+ # Load the Rails environment and testing framework
8
+ require "#{File.dirname(__FILE__)}/../app_root/config/environment"
9
+ require 'rspec/rails'
10
+
11
+ # Load dependencies
12
+ # require 'has_defaults'
13
+
14
+ # Require support code
15
+ Dir["../shared/support/**/*.rb"].each {|f| require f}
16
+
17
+ # Run the migrations
18
+ #print "\033[30m" # dark gray text
19
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
20
+ #print "\033[0m"
21
+
22
+ RSpec.configure do |config|
23
+ config.use_transactional_fixtures = true
24
+ config.use_instantiated_fixtures = false
25
+ end
@@ -0,0 +1,9 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'sqlite3'
4
+ gem 'rails', '~> 4.0', '< 4.1'
5
+ gem 'rspec', '~> 3.0', '< 3.1'
6
+ gem 'rspec-rails', '~> 3.0', '< 3.1'
7
+ gem 'rspec-collection_matchers', '~> 1.0'
8
+ gem 'awesome_print'
9
+ gem 'cardiac', :path => '../..'
@@ -0,0 +1,132 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ cardiac (0.2.0.pre1)
5
+ active_attr (>= 0.8.2)
6
+ activemodel (>= 3.2, < 4.1)
7
+ activesupport (>= 3.2, < 4.1)
8
+ i18n (~> 0.6, >= 0.6.4)
9
+ json (> 1.8.0)
10
+ mime-types (> 1.1)
11
+ multi_json (~> 1.0)
12
+ rack (>= 1.4.5)
13
+ rack-cache (~> 1.2)
14
+ rack-client (~> 0.4.2)
15
+
16
+ GEM
17
+ remote: http://rubygems.org/
18
+ specs:
19
+ actionmailer (4.0.9)
20
+ actionpack (= 4.0.9)
21
+ mail (~> 2.5.4)
22
+ actionpack (4.0.9)
23
+ activesupport (= 4.0.9)
24
+ builder (~> 3.1.0)
25
+ erubis (~> 2.7.0)
26
+ rack (~> 1.5.2)
27
+ rack-test (~> 0.6.2)
28
+ active_attr (0.8.4)
29
+ activemodel (>= 3.0.2, < 4.2)
30
+ activesupport (>= 3.0.2, < 4.2)
31
+ activemodel (4.0.9)
32
+ activesupport (= 4.0.9)
33
+ builder (~> 3.1.0)
34
+ activerecord (4.0.9)
35
+ activemodel (= 4.0.9)
36
+ activerecord-deprecated_finders (~> 1.0.2)
37
+ activesupport (= 4.0.9)
38
+ arel (~> 4.0.0)
39
+ activerecord-deprecated_finders (1.0.3)
40
+ activesupport (4.0.9)
41
+ i18n (~> 0.6, >= 0.6.9)
42
+ minitest (~> 4.2)
43
+ multi_json (~> 1.3)
44
+ thread_safe (~> 0.1)
45
+ tzinfo (~> 0.3.37)
46
+ arel (4.0.2)
47
+ awesome_print (1.2.0)
48
+ builder (3.1.4)
49
+ diff-lcs (1.2.5)
50
+ erubis (2.7.0)
51
+ hike (1.2.3)
52
+ i18n (0.6.11)
53
+ json (1.8.1)
54
+ mail (2.5.4)
55
+ mime-types (~> 1.16)
56
+ treetop (~> 1.4.8)
57
+ mime-types (1.25.1)
58
+ minitest (4.7.5)
59
+ multi_json (1.10.1)
60
+ polyglot (0.3.5)
61
+ rack (1.5.2)
62
+ rack-cache (1.2)
63
+ rack (>= 0.4)
64
+ rack-client (0.4.2)
65
+ rack (>= 1.0.0)
66
+ rack-test (0.6.2)
67
+ rack (>= 1.0)
68
+ rails (4.0.9)
69
+ actionmailer (= 4.0.9)
70
+ actionpack (= 4.0.9)
71
+ activerecord (= 4.0.9)
72
+ activesupport (= 4.0.9)
73
+ bundler (>= 1.3.0, < 2.0)
74
+ railties (= 4.0.9)
75
+ sprockets-rails (~> 2.0)
76
+ railties (4.0.9)
77
+ actionpack (= 4.0.9)
78
+ activesupport (= 4.0.9)
79
+ rake (>= 0.8.7)
80
+ thor (>= 0.18.1, < 2.0)
81
+ rake (10.3.2)
82
+ rspec (3.0.0)
83
+ rspec-core (~> 3.0.0)
84
+ rspec-expectations (~> 3.0.0)
85
+ rspec-mocks (~> 3.0.0)
86
+ rspec-collection_matchers (1.0.0)
87
+ rspec-expectations (>= 2.99.0.beta1)
88
+ rspec-core (3.0.4)
89
+ rspec-support (~> 3.0.0)
90
+ rspec-expectations (3.0.4)
91
+ diff-lcs (>= 1.2.0, < 2.0)
92
+ rspec-support (~> 3.0.0)
93
+ rspec-mocks (3.0.4)
94
+ rspec-support (~> 3.0.0)
95
+ rspec-rails (3.0.2)
96
+ actionpack (>= 3.0)
97
+ activesupport (>= 3.0)
98
+ railties (>= 3.0)
99
+ rspec-core (~> 3.0.0)
100
+ rspec-expectations (~> 3.0.0)
101
+ rspec-mocks (~> 3.0.0)
102
+ rspec-support (~> 3.0.0)
103
+ rspec-support (3.0.4)
104
+ sprockets (2.12.1)
105
+ hike (~> 1.2)
106
+ multi_json (~> 1.0)
107
+ rack (~> 1.0)
108
+ tilt (~> 1.1, != 1.3.0)
109
+ sprockets-rails (2.1.4)
110
+ actionpack (>= 3.0)
111
+ activesupport (>= 3.0)
112
+ sprockets (~> 2.8)
113
+ sqlite3 (1.3.9)
114
+ thor (0.19.1)
115
+ thread_safe (0.3.4)
116
+ tilt (1.4.1)
117
+ treetop (1.4.15)
118
+ polyglot
119
+ polyglot (>= 0.3.1)
120
+ tzinfo (0.3.41)
121
+
122
+ PLATFORMS
123
+ ruby
124
+
125
+ DEPENDENCIES
126
+ awesome_print
127
+ cardiac!
128
+ rails (~> 4.0, < 4.1)
129
+ rspec (~> 3.0, < 3.1)
130
+ rspec-collection_matchers (~> 1.0)
131
+ rspec-rails (~> 3.0, < 3.1)
132
+ sqlite3
@@ -0,0 +1,10 @@
1
+ require 'rake'
2
+ require 'rspec/core/rake_task'
3
+
4
+ desc 'Default: Run all specs for rails 4.0'
5
+ task :default => :spec
6
+
7
+ desc 'Run all specs for rails 4.0'
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.pattern = defined?(SPEC) ? SPEC : ['**/*_spec.rb', '../shared/**/*_spec.rb']
10
+ end
@@ -0,0 +1,15 @@
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 vendor/assets/javascripts of plugins, if any, 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
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,13 @@
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Cardiac Test</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,28 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+
7
+ module CardiacTest
8
+ class Application < Rails::Application
9
+ config.encoding = "utf-8"
10
+ config.cache_classes = true
11
+ config.consider_all_requests_local = true
12
+
13
+ config.root = File.expand_path('../..', __FILE__)
14
+
15
+ config.active_support.deprecation = :stderr
16
+ config.active_support.escape_html_entities_in_json = true
17
+ config.action_controller.perform_caching = false
18
+ config.action_dispatch.show_exceptions = false
19
+ config.action_controller.allow_forgery_protection = false
20
+ config.action_mailer.delivery_method = :test
21
+
22
+ config.secret_key_base = "ABC" if config.respond_to?(:secret_key_base=)
23
+ config.eager_load = false if config.respond_to?(:eager_load)
24
+ config.assets.enabled = false
25
+ config.assets.version = '1.0'
26
+
27
+ end
28
+ end
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ CardiacTest::Application.initialize!
@@ -0,0 +1,9 @@
1
+ CardiacTest::Application.configure do
2
+ config.cache_classes = false
3
+ config.consider_all_requests_local = true
4
+ config.action_controller.perform_caching = false
5
+ config.active_support.deprecation = :log
6
+ config.action_dispatch.best_standards_support = :builtin
7
+ config.assets.compress = false
8
+ config.assets.debug = false
9
+ end
@@ -0,0 +1,11 @@
1
+ CardiacTest::Application.configure do
2
+ config.cache_classes = true
3
+ config.consider_all_requests_local = false
4
+ config.action_controller.perform_caching = true
5
+ config.serve_static_assets = false
6
+ config.assets.compress = true
7
+ config.assets.compile = false
8
+ config.assets.digest = true
9
+ config.i18n.fallbacks = true
10
+ config.active_support.deprecation = :notify
11
+ end
@@ -0,0 +1,10 @@
1
+ CardiacTest::Application.configure do
2
+ config.cache_classes = true
3
+ config.serve_static_assets = true
4
+ config.static_cache_control = "public, max-age=3600"
5
+ config.consider_all_requests_local = true
6
+ config.action_controller.perform_caching = false
7
+ config.action_dispatch.show_exceptions = false
8
+ config.action_controller.allow_forgery_protection = false
9
+ config.active_support.deprecation = :stderr
10
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ CardiacTest::Application.config.secret_token = '08195ea9feb8279c35f318c1cdcfd9979b2a22259daafc862b554c476e5945d5599782a84561b522aa4e13ffb4ad1c16422e3e4dcc2f049e304366da124f519f'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ CardiacTest::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # CardiacTest::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
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]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,2 @@
1
+ CardiacTest::Application.routes.draw do
2
+ end
@@ -0,0 +1,50 @@
1
+ Dummy GET (3.5ms) http://date.jsontest.com/ EXCEPTION: ["NoMethodError", "undefined method `type_for_extension' for MIME::Types:Class"]
2
+ NoMethodError: undefined method `type_for_extension' for MIME::Types:Class: http://date.jsontest.com/
3
+ Dummy GET (174.4ms) http://date.jsontest.com/
4
+ Dummy GET (145.6ms) http://date.jsontest.com/
5
+ Dummy GET (111.1ms) http://dev-distribution-api.nmass.gci/publications?unit=9999 EXCEPTION: ["Cardiac::RequestFailedError", "Bad Request"]
6
+ Cardiac::RequestFailedError: Bad Request: http://dev-distribution-api.nmass.gci/publications?unit=9999
7
+ Dummy GET (47.4ms) http://dev-distribution-api.nmass.gci/publications?unit=9999 EXCEPTION: ["Cardiac::RequestFailedError", "Bad Request"]
8
+ Cardiac::RequestFailedError: Bad Request: http://dev-distribution-api.nmass.gci/publications?unit=9999
9
+ Dummy GET (793.3ms) http://dev-distribution-api.nmass.gci/publications?unit=9999
10
+ Dummy GET (50.2ms) http://dev-distribution-api.nmass.gci/publications?unit=9999
11
+ Dummy GET (350.6ms) http://dev-distribution-api.nmass.gci/publications?unit=9999
12
+ Dummy GET (232.9ms) http://dev-distribution-api.nmass.gci/publications?unit=9999
13
+ Dummy GET (128.6ms) http://dev-distribution-api.nmass.gci/exchange_databases
14
+ Dummy GET (67.9ms) http://dev-distribution-api.nmass.gci/exchange_databases
15
+ Dummy GET (73.2ms) http://dev-distribution-api.nmass.gci/exchange_databases
16
+ Dummy GET (30.4ms) http://dev-distribution-api.nmass.gci/exchange_databases
17
+ Dummy GET (59.0ms) http://dev-distribution-api.nmass.gci/exchange_databases
18
+ Dummy GET (133.7ms) http://dev-distribution-api.nmass.gci/exchange_databases
19
+ Dummy GET (55.5ms) http://dev-distribution-api.nmass.gci/exchange_databases
20
+ Dummy GET (80.0ms) http://dev-distribution-api.nmass.gci/exchange_databases EXCEPTION: ["NoMethodError", "undefined method `instance_variable' for #<Rack::Cache::Storage:0x000000022b88e0>"]
21
+ NoMethodError: undefined method `instance_variable' for #<Rack::Cache::Storage:0x000000022b88e0>: http://dev-distribution-api.nmass.gci/exchange_databases
22
+ Dummy GET (115.9ms) http://dev-distribution-api.nmass.gci/exchange_databases
23
+ Dummy GET (88.0ms) http://dev-distribution-api.nmass.gci/exchange_databases
24
+ Dummy GET (5.1ms) http://dev-distribution-api.nmass.gci/exchange_databases
25
+ Dummy GET (97.0ms) http://dev-distribution-api.nmass.gci/exchange_databases
26
+ Dummy GET (5.0ms) http://dev-distribution-api.nmass.gci/exchange_databases
27
+ Dummy GET (2.8ms) http://dev-distribution-api.nmass.gci/exchange_databases
28
+ Dummy GET (4.1ms) http://dev-distribution-api.nmass.gci/exchange_databases
29
+ Dummy GET (3.3ms) http://dev-distribution-api.nmass.gci/exchange_databases
30
+ Dummy GET (3.9ms) http://dev-distribution-api.nmass.gci/exchange_databases
31
+ Dummy GET (109.5ms) http://dev-distribution-api.nmass.gci/exchange_databases
32
+ Dummy GET (5.6ms) http://dev-distribution-api.nmass.gci/exchange_databases
33
+ Dummy GET ( 166.0ms) http://dev-distribution-api.nmass.gci/exchange_databases
34
+ Dummy GET ( 87.4ms) http://dev-distribution-api.nmass.gci/exchange_databases
35
+ Dummy GET ( 82.8ms) http://dev-distribution-api.nmass.gci/exchange_databases
36
+ Dummy GET (82.2ms) http://dev-distribution-api.nmass.gci/exchange_databases
37
+ Dummy GET (CACHED 4.7ms) http://dev-distribution-api.nmass.gci/exchange_databases
38
+ Dummy GET (CACHED 4.8ms) http://dev-distribution-api.nmass.gci/exchange_databases
39
+ Dummy GET (CACHED 4.1ms) http://dev-distribution-api.nmass.gci/exchange_databases
40
+ Dummy GET (CACHED 3.7ms) http://dev-distribution-api.nmass.gci/exchange_databases
41
+ Dummy GET (CACHED 3.2ms) http://dev-distribution-api.nmass.gci/exchange_databases
42
+ Dummy GET (CACHED 3.1ms) http://dev-distribution-api.nmass.gci/exchange_databases
43
+ Dummy GET (CACHED 3.7ms) http://dev-distribution-api.nmass.gci/exchange_databases
44
+ Dummy GET (CACHED 3.7ms) http://dev-distribution-api.nmass.gci/exchange_databases
45
+ Dummy GET (CACHED 3.8ms) http://dev-distribution-api.nmass.gci/exchange_databases
46
+ Dummy GET (CACHED 3.7ms) http://dev-distribution-api.nmass.gci/exchange_databases
47
+ Dummy GET (CACHED 4.4ms) http://dev-distribution-api.nmass.gci/exchange_databases
48
+ Dummy GET (CACHED 4.3ms) http://dev-distribution-api.nmass.gci/exchange_databases
49
+ Dummy GET (CACHED 4.2ms) http://dev-distribution-api.nmass.gci/exchange_databases
50
+ Dummy GET (CACHED 3.7ms) http://dev-distribution-api.nmass.gci/exchange_databases