fitter-happier 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/app/controllers/fitter_happier_controller.rb +7 -7
- data/config/routes.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a00a9fbb03c8a32b7cf5545de15c3f25394f9ab
|
4
|
+
data.tar.gz: 91de8f100a8a2acd2ae11ef5f8a85d224c93d507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71d44fd0e23006cb58f6e9cf5c2f16ffe481b925720d776cb2bc25c15088b22f5ffcfa926dee9899699169d39d4e41e4cdd24f7633ef27b4ee9874ed8d577e6e
|
7
|
+
data.tar.gz: 8433553e1502a515155f65190a9de9d6a319d91321e101fa38c8222809d12e96a5fec318bce671098313f1336e79cc64257e704e585277c3da56bf9b9cc19243
|
data/CHANGELOG
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
class FitterHappierController < ActionController::Base
|
2
2
|
layout nil
|
3
|
-
|
3
|
+
|
4
4
|
def index
|
5
5
|
render(:text => "FitterHappier Site Check Passed\n")
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
def site_check
|
9
9
|
time = Time.now.to_formatted_s(:rfc822)
|
10
10
|
render(:text => "FitterHappier Site Check Passed @ #{time}\n")
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def site_and_database_check
|
14
14
|
table_name = (Rails::VERSION::STRING >= '2.1.0' ? 'schema_migrations' : 'schema_info')
|
15
|
-
query = "SELECT max(lpad(version, 20, 0)) FROM #{table_name}"
|
15
|
+
query = "SELECT max(lpad(version, 20, '0')) FROM #{table_name}"
|
16
16
|
version = ActiveRecord::Base.connection.select_value(query).to_i
|
17
17
|
time = Time.now.to_formatted_s(:rfc822)
|
18
18
|
render(:text => "FitterHappier Site and Database Check Passed @ #{time}\nSchema Version: #{version}\n")
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
private
|
22
|
-
|
22
|
+
|
23
23
|
def process_with_silence(*args)
|
24
24
|
logger.quietly do
|
25
25
|
process_without_silence(*args)
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
alias_method_chain :process, :silence
|
30
30
|
end
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
get '/fitter_happier' => 'fitter_happier#index'
|
3
|
+
get '/fitter_happier/site_check' => 'fitter_happier#site_check'
|
4
|
+
get '/fitter_happier/site_and_database_check' => 'fitter_happier#site_and_database_check'
|
5
5
|
end
|