cardiac 0.2.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/LICENSE +22 -0
- data/Rakefile +66 -0
- data/cardiac-0.2.0.pre2.gem +0 -0
- data/cardiac.gemspec +48 -0
- data/lib/cardiac/declarations.rb +70 -0
- data/lib/cardiac/errors.rb +65 -0
- data/lib/cardiac/log_subscriber.rb +55 -0
- data/lib/cardiac/model/attributes.rb +146 -0
- data/lib/cardiac/model/base.rb +161 -0
- data/lib/cardiac/model/callbacks.rb +47 -0
- data/lib/cardiac/model/declarations.rb +106 -0
- data/lib/cardiac/model/dirty.rb +117 -0
- data/lib/cardiac/model/locale/en.yml +7 -0
- data/lib/cardiac/model/operations.rb +49 -0
- data/lib/cardiac/model/persistence.rb +171 -0
- data/lib/cardiac/model/querying.rb +129 -0
- data/lib/cardiac/model/validations.rb +124 -0
- data/lib/cardiac/model.rb +17 -0
- data/lib/cardiac/operation_builder.rb +75 -0
- data/lib/cardiac/operation_handler.rb +215 -0
- data/lib/cardiac/railtie.rb +20 -0
- data/lib/cardiac/reflections.rb +85 -0
- data/lib/cardiac/representation.rb +124 -0
- data/lib/cardiac/resource/adapter.rb +178 -0
- data/lib/cardiac/resource/builder.rb +107 -0
- data/lib/cardiac/resource/codec_methods.rb +58 -0
- data/lib/cardiac/resource/config_methods.rb +39 -0
- data/lib/cardiac/resource/extension_methods.rb +115 -0
- data/lib/cardiac/resource/request_methods.rb +138 -0
- data/lib/cardiac/resource/subresource.rb +88 -0
- data/lib/cardiac/resource/uri_methods.rb +176 -0
- data/lib/cardiac/resource.rb +77 -0
- data/lib/cardiac/util.rb +120 -0
- data/lib/cardiac/version.rb +3 -0
- data/lib/cardiac.rb +61 -0
- data/spec/rails-3.2/Gemfile +9 -0
- data/spec/rails-3.2/Gemfile.lock +136 -0
- data/spec/rails-3.2/Rakefile +10 -0
- data/spec/rails-3.2/app_root/app/assets/javascripts/application.js +15 -0
- data/spec/rails-3.2/app_root/app/assets/stylesheets/application.css +13 -0
- data/spec/rails-3.2/app_root/app/controllers/application_controller.rb +3 -0
- data/spec/rails-3.2/app_root/app/helpers/application_helper.rb +2 -0
- data/spec/rails-3.2/app_root/app/views/layouts/application.html.erb +14 -0
- data/spec/rails-3.2/app_root/config/application.rb +29 -0
- data/spec/rails-3.2/app_root/config/boot.rb +13 -0
- data/spec/rails-3.2/app_root/config/database.yml +25 -0
- data/spec/rails-3.2/app_root/config/environment.rb +5 -0
- data/spec/rails-3.2/app_root/config/environments/development.rb +10 -0
- data/spec/rails-3.2/app_root/config/environments/production.rb +11 -0
- data/spec/rails-3.2/app_root/config/environments/test.rb +11 -0
- data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails-3.2/app_root/config/initializers/inflections.rb +15 -0
- data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +5 -0
- data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +7 -0
- data/spec/rails-3.2/app_root/config/initializers/session_store.rb +8 -0
- data/spec/rails-3.2/app_root/config/initializers/wrap_parameters.rb +14 -0
- data/spec/rails-3.2/app_root/config/locales/en.yml +5 -0
- data/spec/rails-3.2/app_root/config/routes.rb +2 -0
- data/spec/rails-3.2/app_root/db/test.sqlite3 +0 -0
- data/spec/rails-3.2/app_root/log/test.log +2403 -0
- data/spec/rails-3.2/app_root/public/404.html +26 -0
- data/spec/rails-3.2/app_root/public/422.html +26 -0
- data/spec/rails-3.2/app_root/public/500.html +25 -0
- data/spec/rails-3.2/app_root/public/favicon.ico +0 -0
- data/spec/rails-3.2/app_root/script/rails +6 -0
- data/spec/rails-3.2/spec/spec_helper.rb +25 -0
- data/spec/rails-4.0/Gemfile +9 -0
- data/spec/rails-4.0/Gemfile.lock +132 -0
- data/spec/rails-4.0/Rakefile +10 -0
- data/spec/rails-4.0/app_root/app/assets/javascripts/application.js +15 -0
- data/spec/rails-4.0/app_root/app/assets/stylesheets/application.css +13 -0
- data/spec/rails-4.0/app_root/app/controllers/application_controller.rb +3 -0
- data/spec/rails-4.0/app_root/app/helpers/application_helper.rb +2 -0
- data/spec/rails-4.0/app_root/app/views/layouts/application.html.erb +14 -0
- data/spec/rails-4.0/app_root/config/application.rb +28 -0
- data/spec/rails-4.0/app_root/config/boot.rb +13 -0
- data/spec/rails-4.0/app_root/config/database.yml +25 -0
- data/spec/rails-4.0/app_root/config/environment.rb +5 -0
- data/spec/rails-4.0/app_root/config/environments/development.rb +9 -0
- data/spec/rails-4.0/app_root/config/environments/production.rb +11 -0
- data/spec/rails-4.0/app_root/config/environments/test.rb +10 -0
- data/spec/rails-4.0/app_root/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails-4.0/app_root/config/initializers/inflections.rb +15 -0
- data/spec/rails-4.0/app_root/config/initializers/mime_types.rb +5 -0
- data/spec/rails-4.0/app_root/config/initializers/secret_token.rb +7 -0
- data/spec/rails-4.0/app_root/config/initializers/session_store.rb +8 -0
- data/spec/rails-4.0/app_root/config/initializers/wrap_parameters.rb +14 -0
- data/spec/rails-4.0/app_root/config/locales/en.yml +5 -0
- data/spec/rails-4.0/app_root/config/routes.rb +2 -0
- data/spec/rails-4.0/app_root/db/test.sqlite3 +0 -0
- data/spec/rails-4.0/app_root/log/development.log +50 -0
- data/spec/rails-4.0/app_root/log/test.log +2399 -0
- data/spec/rails-4.0/app_root/public/404.html +26 -0
- data/spec/rails-4.0/app_root/public/422.html +26 -0
- data/spec/rails-4.0/app_root/public/500.html +25 -0
- data/spec/rails-4.0/app_root/public/favicon.ico +0 -0
- data/spec/rails-4.0/app_root/script/rails +6 -0
- data/spec/rails-4.0/spec/spec_helper.rb +25 -0
- data/spec/shared/cardiac/declarations_spec.rb +103 -0
- data/spec/shared/cardiac/model/base_spec.rb +446 -0
- data/spec/shared/cardiac/operation_builder_spec.rb +96 -0
- data/spec/shared/cardiac/operation_handler_spec.rb +82 -0
- data/spec/shared/cardiac/representation/reflection_spec.rb +73 -0
- data/spec/shared/cardiac/resource/adapter_spec.rb +83 -0
- data/spec/shared/cardiac/resource/builder_spec.rb +52 -0
- data/spec/shared/cardiac/resource/codec_methods_spec.rb +63 -0
- data/spec/shared/cardiac/resource/config_methods_spec.rb +52 -0
- data/spec/shared/cardiac/resource/extension_methods_spec.rb +215 -0
- data/spec/shared/cardiac/resource/request_methods_spec.rb +186 -0
- data/spec/shared/cardiac/resource/uri_methods_spec.rb +212 -0
- data/spec/shared/support/client_execution.rb +28 -0
- data/spec/spec_helper.rb +24 -0
- 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,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,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,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,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
|
Binary file
|
@@ -0,0 +1,50 @@
|
|
1
|
+
[1m[36mDummy GET (3.5ms)[0m [1mhttp://date.jsontest.com/[0m 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
|
+
[1m[36mDummy GET (174.4ms)[0m [1mhttp://date.jsontest.com/[0m
|
4
|
+
[1m[35mDummy GET (145.6ms)[0m http://date.jsontest.com/
|
5
|
+
[1m[36mDummy GET (111.1ms)[0m [1mhttp://dev-distribution-api.nmass.gci/publications?unit=9999[0m EXCEPTION: ["Cardiac::RequestFailedError", "Bad Request"]
|
6
|
+
Cardiac::RequestFailedError: Bad Request: http://dev-distribution-api.nmass.gci/publications?unit=9999
|
7
|
+
[1m[36mDummy GET (47.4ms)[0m [1mhttp://dev-distribution-api.nmass.gci/publications?unit=9999[0m EXCEPTION: ["Cardiac::RequestFailedError", "Bad Request"]
|
8
|
+
Cardiac::RequestFailedError: Bad Request: http://dev-distribution-api.nmass.gci/publications?unit=9999
|
9
|
+
[1m[36mDummy GET (793.3ms)[0m [1mhttp://dev-distribution-api.nmass.gci/publications?unit=9999[0m
|
10
|
+
[1m[35mDummy GET (50.2ms)[0m http://dev-distribution-api.nmass.gci/publications?unit=9999
|
11
|
+
[1m[36mDummy GET (350.6ms)[0m [1mhttp://dev-distribution-api.nmass.gci/publications?unit=9999[0m
|
12
|
+
[1m[35mDummy GET (232.9ms)[0m http://dev-distribution-api.nmass.gci/publications?unit=9999
|
13
|
+
[1m[36mDummy GET (128.6ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
14
|
+
[1m[35mDummy GET (67.9ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
15
|
+
[1m[36mDummy GET (73.2ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
16
|
+
[1m[35mDummy GET (30.4ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
17
|
+
[1m[36mDummy GET (59.0ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
18
|
+
[1m[36mDummy GET (133.7ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
19
|
+
[1m[35mDummy GET (55.5ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
20
|
+
[1m[36mDummy GET (80.0ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m 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
|
+
[1m[36mDummy GET (115.9ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
23
|
+
[1m[36mDummy GET (88.0ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
24
|
+
[1m[35mDummy GET (5.1ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
25
|
+
[1m[36mDummy GET (97.0ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
26
|
+
[1m[35mDummy GET (5.0ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
27
|
+
[1m[36mDummy GET (2.8ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
28
|
+
[1m[35mDummy GET (4.1ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
29
|
+
[1m[36mDummy GET (3.3ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
30
|
+
[1m[35mDummy GET (3.9ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
31
|
+
[1m[36mDummy GET (109.5ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
32
|
+
[1m[35mDummy GET (5.6ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
33
|
+
[1m[36mDummy GET[0m ( 166.0ms) [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
34
|
+
[1m[36mDummy GET ( 87.4ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
35
|
+
[1m[36mDummy GET ( 82.8ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
36
|
+
[1m[36mDummy GET (82.2ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
37
|
+
[1m[35mDummy GET (CACHED 4.7ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
38
|
+
[1m[36mDummy GET (CACHED 4.8ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
39
|
+
[1m[35mDummy GET (CACHED 4.1ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
40
|
+
[1m[36mDummy GET (CACHED 3.7ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
41
|
+
[1m[35mDummy GET (CACHED 3.2ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
42
|
+
[1m[36mDummy GET (CACHED 3.1ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
43
|
+
[1m[35mDummy GET (CACHED 3.7ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
44
|
+
[1m[36mDummy GET (CACHED 3.7ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
45
|
+
[1m[35mDummy GET (CACHED 3.8ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
46
|
+
[1m[36mDummy GET (CACHED 3.7ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
47
|
+
[1m[35mDummy GET (CACHED 4.4ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
48
|
+
[1m[36mDummy GET (CACHED 4.3ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|
49
|
+
[1m[35mDummy GET (CACHED 4.2ms)[0m http://dev-distribution-api.nmass.gci/exchange_databases
|
50
|
+
[1m[36mDummy GET (CACHED 3.7ms)[0m [1mhttp://dev-distribution-api.nmass.gci/exchange_databases[0m
|