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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23bd083b2474dd40ea6848f919c4adbc50cc1cbaa927b8de0f968888100a3f8d
4
- data.tar.gz: 0a35031fbb7df47f6675307130187e24e9bf4bec4699c8a129c0697832877653
3
+ metadata.gz: 1fc638888ec40480230d18462cdefff1a6e653ad8b38fb93cd563afc3f88c782
4
+ data.tar.gz: dac0c0a677baa299992be68197a4db1653efb70283f9a4f2d969deb92aa3ac63
5
5
  SHA512:
6
- metadata.gz: b3bee8a0ca7d846e020da56ff82a50bde40317e772e7287d8853c8847009fa1ec857bc79865c8850f9f69a7e50817c1e3e2a85188ab35de21607fa0038b32397
7
- data.tar.gz: 3a11784b8209459777082d0939c5d2ad6e2ee5373476f518056586b5ceb0d2371ecf2362ee8ffee1755e1321bf6e30d09be32e5ef791958782a801f19131b2f5
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
- <header>
17
- <h2 style="margin-left: 16px;"><%= title %></h2>
18
- </header>
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 } } %>
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Utilities
3
- VERSION = '4.4.0'
3
+ VERSION = '4.4.1'
4
4
  end
5
5
  end
@@ -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.0
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-05 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails