openstax_utilities 4.4.0 → 4.4.1
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.
- checksums.yaml +4 -4
- data/app/controllers/openstax/utilities/status_controller.rb +8 -0
- data/app/views/layouts/openstax/utilities/status.html.erb +3 -5
- data/app/views/openstax/utilities/status/index.html.erb +5 -0
- data/lib/openstax/utilities/version.rb +1 -1
- data/lib/openstax_utilities.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fc638888ec40480230d18462cdefff1a6e653ad8b38fb93cd563afc3f88c782
|
|
4
|
+
data.tar.gz: dac0c0a677baa299992be68197a4db1653efb70283f9a4f2d969deb92aa3ac63
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '000787a51fa7167e3859f8da026e633bce6f1ff1bc3076ad13afbd9b0cb6b6e2ef41f320e0ef05ac0650305ff6db1aac4ef791316abe153f0dd50ab181bbdd7f'
|
|
7
|
+
data.tar.gz: ef8c92ee27d11186bb3720e0964909dc9a65ae50cc961f7f99e0e9e519ef1f3024fc1210eb80b9511253e70ecdf5ab85b4588f1d8ebf3dd3c08f0e612e9d8c6c
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require 'aws-sdk-autoscaling'
|
|
2
2
|
|
|
3
3
|
class OpenStax::Utilities::StatusController < ActionController::Base
|
|
4
|
+
before_action :authenticate
|
|
5
|
+
|
|
4
6
|
layout 'openstax/utilities/status'
|
|
5
7
|
|
|
6
8
|
def index
|
|
@@ -63,4 +65,10 @@ class OpenStax::Utilities::StatusController < ActionController::Base
|
|
|
63
65
|
end
|
|
64
66
|
end
|
|
65
67
|
end
|
|
68
|
+
|
|
69
|
+
protected
|
|
70
|
+
|
|
71
|
+
def authenticate
|
|
72
|
+
instance_exec &OpenStax::Utilities.configuration.status_authenticate
|
|
73
|
+
end
|
|
66
74
|
end
|
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
15
|
<body id="status" class="status">
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
16
|
+
<div class="body">
|
|
17
|
+
<div class="body-container" style="margin-left: 16px;">
|
|
18
|
+
<header><h2><%= title %></h2></header>
|
|
19
19
|
|
|
20
|
-
<div class="body" style="margin-left: 16px;">
|
|
21
|
-
<div class="body-container">
|
|
22
20
|
<%= yield %>
|
|
23
21
|
</div>
|
|
24
22
|
</div>
|
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
<li>
|
|
24
24
|
Frontend (tutor-js): <%= OpenStax::Utilities::Assets.manifest.version || 'not deployed' %>
|
|
25
25
|
</li>
|
|
26
|
+
<li>
|
|
27
|
+
Deployment (tutor-deployment): <%=
|
|
28
|
+
Rails.application.secrets.deployment_version || 'not deployed'
|
|
29
|
+
%>
|
|
30
|
+
</li>
|
|
26
31
|
</ul>
|
|
27
32
|
|
|
28
33
|
<% status = status_icons.find { |key, _| @statuses.any? { |_, _, _, status| status == key } } %>
|
data/lib/openstax_utilities.rb
CHANGED
|
@@ -57,11 +57,13 @@ module OpenStax
|
|
|
57
57
|
attr_accessor :standard_date_format
|
|
58
58
|
attr_accessor :standard_datetime_format
|
|
59
59
|
attr_accessor :standard_time_format
|
|
60
|
+
attr_accessor :status_authenticate
|
|
60
61
|
|
|
61
62
|
def initialize
|
|
62
63
|
@standard_date_format = "%b %d, %Y"
|
|
63
64
|
@standard_datetime_format = "%b %d, %Y %l:%M %p %Z"
|
|
64
65
|
@standard_time_format = "%l:%M %p %Z"
|
|
66
|
+
@status_authenticate = -> { head :forbidden }
|
|
65
67
|
super
|
|
66
68
|
end
|
|
67
69
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openstax_utilities
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.4.
|
|
4
|
+
version: 4.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- JP Slavinsky
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-01-
|
|
11
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|