nulogy-fitter-happier 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +14 -0
- data/README.md +1 -51
- data/config/routes.rb +3 -3
- data/lib/fitter_happier/engine.rb +1 -1
- metadata +73 -65
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/config/application.rb +0 -15
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -54
- data/spec/dummy/config/environments/production.rb +0 -86
- data/spec/dummy/config/environments/test.rb +0 -42
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config.ru +0 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +0 -58
- data/spec/fitter_happier_request_spec.rb +0 -44
- data/spec/fitter_happier_routing_spec.rb +0 -14
- data/spec/spec_helper.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23bb0ec4fda8e30037c29e588ab6271be6830cf39f0562cef70304832cfae138
|
4
|
+
data.tar.gz: ea979a2f9893b777ab5b8edad30df729e3d0e92eb3dfb50bd5d770801ebfebbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de1933777ee2d9c1c489dd6f04a9437e9a2c22fb525b282581fdd6ed94ceea2d63a5274f5e0b0c0d7b1eeee23b256574210020bd326d48be31f67e1e5acfe7e9
|
7
|
+
data.tar.gz: 8a7994e7712644b7a4d2fad6c7afd1dcdb02d75a1c0eea76a8196ad249e2e89d6112833db3fa7d36cbc6dd2da82fe56d7a7a4a1f29cd86c54f96720e199284b4
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
Version 1.6.0
|
5
|
+
=============
|
6
|
+
|
7
|
+
* Drop support for Rails 6.x
|
8
|
+
* Add support for Rails 8.0
|
9
|
+
* Bump the ruby version
|
10
|
+
* Introduce and configure rubocop
|
11
|
+
* Introduce and configure appraisals
|
12
|
+
|
13
|
+
Version 1.5.2
|
14
|
+
=============
|
15
|
+
|
16
|
+
* Relax NewRelic dependency
|
17
|
+
|
4
18
|
Version 1.5.1
|
5
19
|
=============
|
6
20
|
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
FitterHappier
|
1
|
+
FitterHappier
|
2
2
|
=============
|
3
3
|
|
4
4
|
FitterHappier provides actions for monitoring a rails site and database availability. FitterHappier's monitoring controller disables unnecessary Rails features, like sessions, layouts, and logging, for lightning-fast monitoring URIs.
|
@@ -23,56 +23,6 @@ Add the following to your gemfile
|
|
23
23
|
|
24
24
|
gem 'fitter-happier'
|
25
25
|
|
26
|
-
Monit
|
27
|
-
=====
|
28
|
-
|
29
|
-
You can do simple checks with monit like this:
|
30
|
-
|
31
|
-
if failed host 127.0.0.1 port 5000
|
32
|
-
protocol HTTP request /fitter_happier with checksum 15b8a1ee66d740fbfc00297684bb5430 then restart
|
33
|
-
|
34
|
-
Keepalived/LVS
|
35
|
-
==============
|
36
|
-
|
37
|
-
You can also do this in a keepalived/LVS setup:
|
38
|
-
|
39
|
-
virtual_server 169.254.y.z 80 {
|
40
|
-
delay_loop 15
|
41
|
-
lb_algo lc
|
42
|
-
lb_kind NAT
|
43
|
-
nat_mask 255.255.255.0
|
44
|
-
persistence_timeout 0
|
45
|
-
protocol TCP
|
46
|
-
sorry_server 127.0.0.1 80
|
47
|
-
virtualhost www.myfacetube.com
|
48
|
-
real_server 10.0.1.34 80 {
|
49
|
-
weight 1
|
50
|
-
HTTP_GET {
|
51
|
-
url {
|
52
|
-
path /fitter_happier
|
53
|
-
status_code 200
|
54
|
-
}
|
55
|
-
connect_port 80
|
56
|
-
connect_timeout 5
|
57
|
-
nb_get_retry 20
|
58
|
-
delay_before_retry 2
|
59
|
-
}
|
60
|
-
}
|
61
|
-
real_server 10.0.1.35 80 {
|
62
|
-
weight 1
|
63
|
-
HTTP_GET {
|
64
|
-
url {
|
65
|
-
path /fitter_happier
|
66
|
-
status_code 200
|
67
|
-
}
|
68
|
-
connect_port 80
|
69
|
-
connect_timeout 5
|
70
|
-
nb_get_retry 20
|
71
|
-
delay_before_retry 2
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
26
|
# License
|
77
27
|
|
78
28
|
[Licensed under MIT](./MIT-LICENSE)
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
FitterHappier::Engine.routes.draw do
|
2
|
-
get
|
3
|
-
get
|
4
|
-
get
|
2
|
+
get "/fitter_happier" => "heartbeat#index"
|
3
|
+
get "/fitter_happier/site_check" => "heartbeat#site_check"
|
4
|
+
get "/fitter_happier/site_and_database_check" => "heartbeat#site_and_database_check"
|
5
5
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nulogy-fitter-happier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nulogy Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,122 +16,164 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '8.
|
22
|
+
version: '8.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '7.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '8.
|
32
|
+
version: '8.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activerecord
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '7.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '8.
|
42
|
+
version: '8.1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '7.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '8.
|
52
|
+
version: '8.1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: newrelic_rpm
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 8.16.0
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '10.0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 8.16.0
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '10.0'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: railties
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
79
|
+
version: '7.0'
|
80
80
|
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '8.
|
82
|
+
version: '8.1'
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '7.0'
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: '8.
|
92
|
+
version: '8.1'
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: appraisal
|
95
|
+
requirement: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '2.5'
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - "~>"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '2.5'
|
93
107
|
- !ruby/object:Gem::Dependency
|
94
108
|
name: rake
|
95
109
|
requirement: !ruby/object:Gem::Requirement
|
96
110
|
requirements:
|
97
111
|
- - "~>"
|
98
112
|
- !ruby/object:Gem::Version
|
99
|
-
version: '13.
|
113
|
+
version: '13.2'
|
100
114
|
type: :development
|
101
115
|
prerelease: false
|
102
116
|
version_requirements: !ruby/object:Gem::Requirement
|
103
117
|
requirements:
|
104
118
|
- - "~>"
|
105
119
|
- !ruby/object:Gem::Version
|
106
|
-
version: '13.
|
120
|
+
version: '13.2'
|
107
121
|
- !ruby/object:Gem::Dependency
|
108
122
|
name: rspec-rails
|
109
123
|
requirement: !ruby/object:Gem::Requirement
|
110
124
|
requirements:
|
111
125
|
- - "~>"
|
112
126
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
127
|
+
version: '7.1'
|
128
|
+
type: :development
|
129
|
+
prerelease: false
|
130
|
+
version_requirements: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - "~>"
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '7.1'
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: rubocop
|
137
|
+
requirement: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - "~>"
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '1.69'
|
114
142
|
type: :development
|
115
143
|
prerelease: false
|
116
144
|
version_requirements: !ruby/object:Gem::Requirement
|
117
145
|
requirements:
|
118
146
|
- - "~>"
|
119
147
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
148
|
+
version: '1.69'
|
121
149
|
- !ruby/object:Gem::Dependency
|
122
|
-
name:
|
150
|
+
name: rubocop-rake
|
123
151
|
requirement: !ruby/object:Gem::Requirement
|
124
152
|
requirements:
|
125
153
|
- - "~>"
|
126
154
|
- !ruby/object:Gem::Version
|
127
|
-
version: '
|
155
|
+
version: '0.6'
|
128
156
|
type: :development
|
129
157
|
prerelease: false
|
130
158
|
version_requirements: !ruby/object:Gem::Requirement
|
131
159
|
requirements:
|
132
160
|
- - "~>"
|
133
161
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
162
|
+
version: '0.6'
|
163
|
+
- !ruby/object:Gem::Dependency
|
164
|
+
name: rubocop-rspec
|
165
|
+
requirement: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - "~>"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '3.3'
|
170
|
+
type: :development
|
171
|
+
prerelease: false
|
172
|
+
version_requirements: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - "~>"
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '3.3'
|
135
177
|
description: send bug reports to https://github.com/nulogy/fitter-happier/
|
136
178
|
email:
|
137
179
|
- engineering@nulogy.com
|
@@ -148,31 +190,14 @@ files:
|
|
148
190
|
- config/routes.rb
|
149
191
|
- lib/fitter_happier.rb
|
150
192
|
- lib/fitter_happier/engine.rb
|
151
|
-
- spec/dummy/Rakefile
|
152
|
-
- spec/dummy/app/controllers/application_controller.rb
|
153
|
-
- spec/dummy/config.ru
|
154
|
-
- spec/dummy/config/application.rb
|
155
|
-
- spec/dummy/config/boot.rb
|
156
|
-
- spec/dummy/config/database.yml
|
157
|
-
- spec/dummy/config/environment.rb
|
158
|
-
- spec/dummy/config/environments/development.rb
|
159
|
-
- spec/dummy/config/environments/production.rb
|
160
|
-
- spec/dummy/config/environments/test.rb
|
161
|
-
- spec/dummy/config/routes.rb
|
162
|
-
- spec/dummy/config/secrets.yml
|
163
|
-
- spec/dummy/db/test.sqlite3
|
164
|
-
- spec/dummy/log/test.log
|
165
|
-
- spec/fitter_happier_request_spec.rb
|
166
|
-
- spec/fitter_happier_routing_spec.rb
|
167
|
-
- spec/spec_helper.rb
|
168
193
|
homepage: https://github.com/nulogy/fitter-happier
|
169
194
|
licenses:
|
170
195
|
- MIT
|
171
196
|
metadata:
|
172
|
-
homepage_uri: https://github.com/nulogy/fitter-happier
|
173
|
-
changelog_uri: https://github.com/nulogy/fitter-happier/blob/master/CHANGELOG
|
174
|
-
source_code_uri: https://github.com/nulogy/fitter-happier
|
175
197
|
bug_tracker_uri: https://github.com/nulogy/fitter-happier/issues
|
198
|
+
changelog_uri: https://github.com/nulogy/fitter-happier/blob/master/CHANGELOG
|
199
|
+
homepage_uri: https://github.com/nulogy/fitter-happier
|
200
|
+
rubygems_mfa_required: 'true'
|
176
201
|
post_install_message:
|
177
202
|
rdoc_options: []
|
178
203
|
require_paths:
|
@@ -181,33 +206,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
206
|
requirements:
|
182
207
|
- - ">="
|
183
208
|
- !ruby/object:Gem::Version
|
184
|
-
version: '
|
209
|
+
version: '3.2'
|
185
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
211
|
requirements:
|
187
212
|
- - ">="
|
188
213
|
- !ruby/object:Gem::Version
|
189
214
|
version: '0'
|
190
215
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
216
|
+
rubygems_version: 3.5.23
|
192
217
|
signing_key:
|
193
218
|
specification_version: 4
|
194
219
|
summary: FitterHappier is a plug-in that provides actions for monitoring site and/or
|
195
220
|
database availability for rails apps.
|
196
|
-
test_files:
|
197
|
-
- spec/spec_helper.rb
|
198
|
-
- spec/dummy/app/controllers/application_controller.rb
|
199
|
-
- spec/dummy/config/secrets.yml
|
200
|
-
- spec/dummy/config/routes.rb
|
201
|
-
- spec/dummy/config/environments/production.rb
|
202
|
-
- spec/dummy/config/environments/development.rb
|
203
|
-
- spec/dummy/config/environments/test.rb
|
204
|
-
- spec/dummy/config/environment.rb
|
205
|
-
- spec/dummy/config/application.rb
|
206
|
-
- spec/dummy/config/database.yml
|
207
|
-
- spec/dummy/config/boot.rb
|
208
|
-
- spec/dummy/config.ru
|
209
|
-
- spec/dummy/Rakefile
|
210
|
-
- spec/dummy/db/test.sqlite3
|
211
|
-
- spec/dummy/log/test.log
|
212
|
-
- spec/fitter_happier_routing_spec.rb
|
213
|
-
- spec/fitter_happier_request_spec.rb
|
221
|
+
test_files: []
|
data/spec/dummy/Rakefile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative 'boot'
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require(*Rails.groups)
|
6
|
-
require "newrelic_rpm"
|
7
|
-
require "fitter_happier"
|
8
|
-
|
9
|
-
module Dummy
|
10
|
-
class Application < Rails::Application
|
11
|
-
# Settings in config/environments/* take precedence over those specified here.
|
12
|
-
# Application configuration should go into files in config/initializers
|
13
|
-
# -- all .rb files in that directory are automatically loaded.
|
14
|
-
end
|
15
|
-
end
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,25 +0,0 @@
|
|
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
|
-
#
|
7
|
-
default: &default
|
8
|
-
adapter: sqlite3
|
9
|
-
pool: 5
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
development:
|
13
|
-
<<: *default
|
14
|
-
database: db/development.sqlite3
|
15
|
-
|
16
|
-
# Warning: The database defined as "test" will be erased and
|
17
|
-
# re-generated from your development database when you run "rake".
|
18
|
-
# Do not set this db to the same as development or production.
|
19
|
-
test:
|
20
|
-
<<: *default
|
21
|
-
database: db/test.sqlite3
|
22
|
-
|
23
|
-
production:
|
24
|
-
<<: *default
|
25
|
-
database: db/production.sqlite3
|
@@ -1,54 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports.
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
|
15
|
-
# Enable/disable caching. By default caching is disabled.
|
16
|
-
if Rails.root.join('tmp/caching-dev.txt').exist?
|
17
|
-
config.action_controller.perform_caching = true
|
18
|
-
|
19
|
-
config.cache_store = :memory_store
|
20
|
-
config.public_file_server.headers = {
|
21
|
-
'Cache-Control' => 'public, max-age=172800'
|
22
|
-
}
|
23
|
-
else
|
24
|
-
config.action_controller.perform_caching = false
|
25
|
-
|
26
|
-
config.cache_store = :null_store
|
27
|
-
end
|
28
|
-
|
29
|
-
# Don't care if the mailer can't send.
|
30
|
-
config.action_mailer.raise_delivery_errors = false
|
31
|
-
|
32
|
-
config.action_mailer.perform_caching = false
|
33
|
-
|
34
|
-
# Print deprecation notices to the Rails logger.
|
35
|
-
config.active_support.deprecation = :log
|
36
|
-
|
37
|
-
# Raise an error on page load if there are pending migrations.
|
38
|
-
config.active_record.migration_error = :page_load
|
39
|
-
|
40
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
41
|
-
# This option may cause significant delays in view rendering with a large
|
42
|
-
# number of complex assets.
|
43
|
-
config.assets.debug = true
|
44
|
-
|
45
|
-
# Suppress logger output for asset requests.
|
46
|
-
config.assets.quiet = true
|
47
|
-
|
48
|
-
# Raises error for missing translations
|
49
|
-
# config.action_view.raise_on_missing_translations = true
|
50
|
-
|
51
|
-
# Use an evented file watcher to asynchronously detect changes in source code,
|
52
|
-
# routes, locales, etc. This feature depends on the listen gem.
|
53
|
-
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
54
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# Code is not reloaded between requests.
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both threaded web servers
|
9
|
-
# and those relying on copy on write to perform better.
|
10
|
-
# Rake tasks automatically ignore this option for performance.
|
11
|
-
config.eager_load = true
|
12
|
-
|
13
|
-
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local = false
|
15
|
-
config.action_controller.perform_caching = true
|
16
|
-
|
17
|
-
# Disable serving static files from the `/public` folder by default since
|
18
|
-
# Apache or NGINX already handles this.
|
19
|
-
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
20
|
-
|
21
|
-
# Compress JavaScripts and CSS.
|
22
|
-
config.assets.js_compressor = :uglifier
|
23
|
-
# config.assets.css_compressor = :sass
|
24
|
-
|
25
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
26
|
-
config.assets.compile = false
|
27
|
-
|
28
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
29
|
-
|
30
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
31
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
32
|
-
|
33
|
-
# Specifies the header that your server uses for sending files.
|
34
|
-
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
35
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
36
|
-
|
37
|
-
# Mount Action Cable outside main process or domain
|
38
|
-
# config.action_cable.mount_path = nil
|
39
|
-
# config.action_cable.url = 'wss://example.com/cable'
|
40
|
-
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
41
|
-
|
42
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
-
# config.force_ssl = true
|
44
|
-
|
45
|
-
# Use the lowest log level to ensure availability of diagnostic information
|
46
|
-
# when problems arise.
|
47
|
-
config.log_level = :debug
|
48
|
-
|
49
|
-
# Prepend all log lines with the following tags.
|
50
|
-
config.log_tags = [ :request_id ]
|
51
|
-
|
52
|
-
# Use a different cache store in production.
|
53
|
-
# config.cache_store = :mem_cache_store
|
54
|
-
|
55
|
-
# Use a real queuing backend for Active Job (and separate queues per environment)
|
56
|
-
# config.active_job.queue_adapter = :resque
|
57
|
-
# config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
|
58
|
-
config.action_mailer.perform_caching = false
|
59
|
-
|
60
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
61
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
62
|
-
# config.action_mailer.raise_delivery_errors = false
|
63
|
-
|
64
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
65
|
-
# the I18n.default_locale when a translation cannot be found).
|
66
|
-
config.i18n.fallbacks = true
|
67
|
-
|
68
|
-
# Send deprecation notices to registered listeners.
|
69
|
-
config.active_support.deprecation = :notify
|
70
|
-
|
71
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
72
|
-
config.log_formatter = ::Logger::Formatter.new
|
73
|
-
|
74
|
-
# Use a different logger for distributed setups.
|
75
|
-
# require 'syslog/logger'
|
76
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
77
|
-
|
78
|
-
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
79
|
-
logger = ActiveSupport::Logger.new(STDOUT)
|
80
|
-
logger.formatter = config.log_formatter
|
81
|
-
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
82
|
-
end
|
83
|
-
|
84
|
-
# Do not dump schema after migrations.
|
85
|
-
config.active_record.dump_schema_after_migration = false
|
86
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# 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!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure public file server for tests with Cache-Control for performance.
|
16
|
-
config.public_file_server.enabled = true
|
17
|
-
config.public_file_server.headers = {
|
18
|
-
'Cache-Control' => 'public, max-age=3600'
|
19
|
-
}
|
20
|
-
|
21
|
-
# Show full error reports and disable caching.
|
22
|
-
config.consider_all_requests_local = true
|
23
|
-
config.action_controller.perform_caching = false
|
24
|
-
|
25
|
-
# Raise exceptions instead of rendering exception templates.
|
26
|
-
config.action_dispatch.show_exceptions = false
|
27
|
-
|
28
|
-
# Disable request forgery protection in test environment.
|
29
|
-
config.action_controller.allow_forgery_protection = false
|
30
|
-
# config.action_mailer.perform_caching = false
|
31
|
-
|
32
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
33
|
-
# The :test delivery method accumulates sent emails in the
|
34
|
-
# ActionMailer::Base.deliveries array.
|
35
|
-
# config.action_mailer.delivery_method = :test
|
36
|
-
|
37
|
-
# Print deprecation notices to the stderr.
|
38
|
-
config.active_support.deprecation = :stderr
|
39
|
-
|
40
|
-
# Raises error for missing translations
|
41
|
-
# config.action_view.raise_on_missing_translations = true
|
42
|
-
end
|
data/spec/dummy/config/routes.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rails secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
development:
|
14
|
-
secret_key_base: INSERT_SECRET_HERE
|
15
|
-
|
16
|
-
test:
|
17
|
-
secret_key_base: INSERT_SECRET_HERE
|
18
|
-
|
19
|
-
# Do not keep production secrets in the repository,
|
20
|
-
# instead read values from the environment.
|
21
|
-
production:
|
22
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
data/spec/dummy/config.ru
DELETED
data/spec/dummy/db/test.sqlite3
DELETED
File without changes
|
data/spec/dummy/log/test.log
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
[1m[35m (1.2ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
2
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
3
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
4
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
5
|
-
Started GET "/fitter_happier" for 127.0.0.1 at 2021-06-06 21:03:04 -0400
|
6
|
-
Processing by FitterHappier::HeartbeatController#index as HTML
|
7
|
-
Completed 200 OK in 10ms (Views: 3.0ms | ActiveRecord: 0.0ms | Allocations: 1149)
|
8
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
9
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
10
|
-
Started GET "/fitter_happier" for 127.0.0.1 at 2021-06-06 21:03:04 -0400
|
11
|
-
Processing by FitterHappier::HeartbeatController#index as HTML
|
12
|
-
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 150)
|
13
|
-
Started GET "/fitter_happier/site_check" for 127.0.0.1 at 2021-06-06 21:03:04 -0400
|
14
|
-
Processing by FitterHappier::HeartbeatController#site_check as HTML
|
15
|
-
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 147)
|
16
|
-
Started GET "/fitter_happier/site_and_database_check" for 127.0.0.1 at 2021-06-06 21:03:04 -0400
|
17
|
-
Processing by FitterHappier::HeartbeatController#site_and_database_check as HTML
|
18
|
-
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 186)
|
19
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
20
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
21
|
-
Started GET "/fitter_happier/site_and_database_check" for 127.0.0.1 at 2021-06-06 21:03:04 -0400
|
22
|
-
Processing by FitterHappier::HeartbeatController#site_and_database_check as HTML
|
23
|
-
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 172)
|
24
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
25
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
26
|
-
Started GET "/fitter_happier/site_check" for 127.0.0.1 at 2021-06-06 21:03:04 -0400
|
27
|
-
Processing by FitterHappier::HeartbeatController#site_check as HTML
|
28
|
-
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 111)
|
29
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
30
|
-
[1m[35m (0.9ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
31
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
32
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
33
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
34
|
-
Started GET "/fitter_happier/site_and_database_check" for 127.0.0.1 at 2022-09-22 03:36:59 -0400
|
35
|
-
Processing by FitterHappier::HeartbeatController#site_and_database_check as HTML
|
36
|
-
Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms | Allocations: 1141)
|
37
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
38
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
39
|
-
Started GET "/fitter_happier/site_check" for 127.0.0.1 at 2022-09-22 03:36:59 -0400
|
40
|
-
Processing by FitterHappier::HeartbeatController#site_check as HTML
|
41
|
-
Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 110)
|
42
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
43
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
44
|
-
Started GET "/fitter_happier" for 127.0.0.1 at 2022-09-22 03:36:59 -0400
|
45
|
-
Processing by FitterHappier::HeartbeatController#index as HTML
|
46
|
-
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 139)
|
47
|
-
Started GET "/fitter_happier/site_check" for 127.0.0.1 at 2022-09-22 03:36:59 -0400
|
48
|
-
Processing by FitterHappier::HeartbeatController#site_check as HTML
|
49
|
-
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 145)
|
50
|
-
Started GET "/fitter_happier/site_and_database_check" for 127.0.0.1 at 2022-09-22 03:36:59 -0400
|
51
|
-
Processing by FitterHappier::HeartbeatController#site_and_database_check as HTML
|
52
|
-
Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 185)
|
53
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
54
|
-
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
55
|
-
Started GET "/fitter_happier" for 127.0.0.1 at 2022-09-22 03:36:59 -0400
|
56
|
-
Processing by FitterHappier::HeartbeatController#index as HTML
|
57
|
-
Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 103)
|
58
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
module FitterHappier
|
4
|
-
RSpec.describe "FitterHappier request spec", type: :request do
|
5
|
-
before do
|
6
|
-
allow(DatabaseCheck).to receive(:schema_version)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "can GET index" do
|
10
|
-
get "/fitter_happier"
|
11
|
-
|
12
|
-
expect(response.status).to eq(200)
|
13
|
-
expect(response.body).to match(/FitterHappier Site Check Passed/)
|
14
|
-
end
|
15
|
-
|
16
|
-
it "can GET site_check" do
|
17
|
-
get "/fitter_happier/site_check"
|
18
|
-
|
19
|
-
expect(response.status).to eq(200)
|
20
|
-
expected_body = %r{FitterHappier Site Check Passed @ [A-z]{3}, \d{2} [A-z]{3} \d{4} \d{2}:\d{2}:\d{2} [0-9\-]+}
|
21
|
-
expect(response.body).to match(expected_body)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "can GET site_and_database_check" do
|
25
|
-
expect(DatabaseCheck).to receive(:schema_version).and_return(12345)
|
26
|
-
|
27
|
-
get "/fitter_happier/site_and_database_check"
|
28
|
-
|
29
|
-
expect(response.status).to eq(200)
|
30
|
-
expected_body = %r{FitterHappier Site and Database Check Passed @ [A-z]{3}, \d{2} [A-z]{3} \d{4} \d{2}:\d{2}:\d{2} [0-9\-]+\nSchema Version: \d+}
|
31
|
-
expect(response.body).to match(expected_body)
|
32
|
-
end
|
33
|
-
|
34
|
-
it "makes NewRelic ignore the requests" do
|
35
|
-
expect(NewRelicAdapter).to receive(:ignore_transaction).exactly(3).times
|
36
|
-
|
37
|
-
get "/fitter_happier"
|
38
|
-
get "/fitter_happier/site_check"
|
39
|
-
get "/fitter_happier/site_and_database_check"
|
40
|
-
|
41
|
-
expect(response.status).to eq(200)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
# NOTE: May not be supported on Rails 3 and require Rails 4+
|
4
|
-
module FitterHappier
|
5
|
-
RSpec.describe "FitterHappier routing spec", type: :routing do
|
6
|
-
routes { FitterHappier::Engine.routes }
|
7
|
-
|
8
|
-
it "tests routing" do
|
9
|
-
expect(get: "fitter_happier").to route_to(controller: "fitter_happier/heartbeat", action: "index")
|
10
|
-
expect(get: "fitter_happier/site_check").to route_to(controller: "fitter_happier/heartbeat", action: "site_check")
|
11
|
-
expect(get: "fitter_happier/site_and_database_check").to route_to(controller: "fitter_happier/heartbeat", action: "site_and_database_check")
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
ENV["RAILS_ENV"] ||= "test"
|
2
|
-
|
3
|
-
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
|
-
require "rspec/rails"
|
5
|
-
|
6
|
-
RSpec.configure do |config|
|
7
|
-
config.mock_with :rspec
|
8
|
-
config.use_transactional_fixtures = true
|
9
|
-
config.infer_base_class_for_anonymous_controllers = false
|
10
|
-
config.order = "random"
|
11
|
-
end
|