openstax_utilities 4.5.2 → 5.1.0
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 +1 -1
- data/app/routines/openstax/utilities/limit_and_paginate_relation.rb +1 -1
- data/app/views/layouts/openstax/utilities/status.html.erb +2 -0
- data/app/views/openstax/utilities/status/index.html.erb +10 -6
- data/lib/openstax/utilities/assets/manifest.rb +3 -1
- data/lib/openstax/utilities/assets.rb +1 -1
- data/lib/openstax/utilities/version.rb +1 -1
- data/lib/openstax_utilities.rb +10 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f13ad1defdb5604276e2eab9d0f23793a33908a214d5a61fbb2a22fad36cc1b
|
4
|
+
data.tar.gz: '089da22149096cb195614dc678b3afe1cf2ba442b26d892ae7018bf56bb98494'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2343b8930eb4046e1caf6ebcddba02fec06f2bd765f060b5486f79b9a0cec064b4b15849a59a54ae4b8ff08c2a784039e7e8332ef3b9b63aad425a323dab5111
|
7
|
+
data.tar.gz: 0d1d416ff4b4eeb4d537193377c3f16438473924c5c997f28deefe0c8c7791abfe38b296249287d24a0907a7a2e2abd90598a4d13b089a0f1051f1bdf65a8e9a
|
@@ -7,7 +7,7 @@ class OpenStax::Utilities::StatusController < ActionController::Base
|
|
7
7
|
|
8
8
|
def index
|
9
9
|
@application_name = OSU::SITE_NAME.humanize
|
10
|
-
@environment_name =
|
10
|
+
@environment_name = OpenStax::Utilities.configuration.environment_name
|
11
11
|
|
12
12
|
@statuses = if @environment_name == 'development'
|
13
13
|
[ [ 'local', 1, 1, :ok ] ]
|
@@ -56,7 +56,7 @@ module OpenStax
|
|
56
56
|
|
57
57
|
fatal_error(offending_inputs: :per_page,
|
58
58
|
message: 'Invalid page size',
|
59
|
-
code: :invalid_per_page) if !per_page.nil? && per_page <
|
59
|
+
code: :invalid_per_page) if !per_page.nil? && per_page < 0
|
60
60
|
fatal_error(offending_inputs: :page,
|
61
61
|
message: 'Invalid page number',
|
62
62
|
code: :invalid_page) if page < 1
|
@@ -10,6 +10,8 @@
|
|
10
10
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
11
11
|
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
12
12
|
<%= csrf_meta_tags %>
|
13
|
+
|
14
|
+
<style>body { background: none; }</style>
|
13
15
|
</head>
|
14
16
|
|
15
17
|
<body id="status" class="status">
|
@@ -12,22 +12,26 @@
|
|
12
12
|
offline: '🔌',
|
13
13
|
sleeping: '💤'
|
14
14
|
}
|
15
|
-
|
16
|
-
backend = @application_name == 'Tutor' ? 'tutor-server' : @application_name.downcase
|
17
15
|
%>
|
18
16
|
|
19
17
|
<h3>Versions</h3>
|
20
18
|
|
21
19
|
<ul>
|
22
20
|
<li>
|
23
|
-
Backend (<%= backend %>): <%=
|
21
|
+
Backend (<%= OpenStax::Utilities.configuration.backend %>): <%=
|
22
|
+
OpenStax::Utilities.configuration.release_version || 'not deployed'
|
23
|
+
%>
|
24
24
|
</li>
|
25
|
+
<% unless OpenStax::Utilities.configuration.assets_url.blank? %>
|
25
26
|
<li>
|
26
|
-
Frontend (
|
27
|
+
Frontend (<%= OpenStax::Utilities.configuration.frontend %>): <%=
|
28
|
+
OpenStax::Utilities::Assets.manifest.version || 'not deployed'
|
29
|
+
%>
|
27
30
|
</li>
|
31
|
+
<% end %>
|
28
32
|
<li>
|
29
|
-
Deployment (
|
30
|
-
|
33
|
+
Deployment (<%= OpenStax::Utilities.configuration.deployment %>): <%=
|
34
|
+
OpenStax::Utilities.configuration.deployment_version || 'not deployed'
|
31
35
|
%>
|
32
36
|
</li>
|
33
37
|
</ul>
|
@@ -10,7 +10,9 @@ module OpenStax::Utilities
|
|
10
10
|
def initialize
|
11
11
|
@assets = HashWithIndifferentAccess.new
|
12
12
|
|
13
|
-
url = OpenStax::Utilities::Assets.url_for(
|
13
|
+
url = OpenStax::Utilities::Assets.url_for(
|
14
|
+
OpenStax::Utilities.configuration.assets_manifest_filename
|
15
|
+
)
|
14
16
|
|
15
17
|
begin
|
16
18
|
response = self.class.client.get url
|
data/lib/openstax_utilities.rb
CHANGED
@@ -23,7 +23,6 @@ require "openstax/utilities/assets"
|
|
23
23
|
|
24
24
|
module OpenStax
|
25
25
|
module Utilities
|
26
|
-
|
27
26
|
# ASSET_FILES = %w(openstax_utilities.css openstax_utilities.js)
|
28
27
|
|
29
28
|
# ActiveSupport.on_load(:before_initialize) do
|
@@ -31,7 +30,6 @@ module OpenStax
|
|
31
30
|
# end
|
32
31
|
|
33
32
|
class << self
|
34
|
-
|
35
33
|
###########################################################################
|
36
34
|
#
|
37
35
|
# Configuration machinery.
|
@@ -58,17 +56,25 @@ module OpenStax
|
|
58
56
|
attr_accessor :standard_datetime_format
|
59
57
|
attr_accessor :standard_time_format
|
60
58
|
attr_accessor :status_authenticate
|
59
|
+
attr_accessor :environment_name
|
60
|
+
attr_accessor :backend
|
61
|
+
attr_accessor :release_version
|
62
|
+
attr_accessor :frontend
|
63
|
+
attr_accessor :assets_url
|
64
|
+
attr_accessor :assets_manifest_filename
|
65
|
+
attr_accessor :deployment
|
66
|
+
attr_accessor :deployment_version
|
61
67
|
|
62
68
|
def initialize
|
63
69
|
@standard_date_format = "%b %d, %Y"
|
64
70
|
@standard_datetime_format = "%b %d, %Y %l:%M %p %Z"
|
65
71
|
@standard_time_format = "%l:%M %p %Z"
|
66
72
|
@status_authenticate = -> { head :forbidden }
|
73
|
+
@environment_name = 'development'
|
74
|
+
@assets_manifest_filename = 'assets.json'
|
67
75
|
super
|
68
76
|
end
|
69
77
|
end
|
70
|
-
|
71
78
|
end
|
72
|
-
|
73
79
|
end
|
74
80
|
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
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -244,7 +244,7 @@ homepage: http://github.com/openstax/openstax_utilities
|
|
244
244
|
licenses:
|
245
245
|
- MIT
|
246
246
|
metadata: {}
|
247
|
-
post_install_message:
|
247
|
+
post_install_message:
|
248
248
|
rdoc_options: []
|
249
249
|
require_paths:
|
250
250
|
- lib
|
@@ -259,8 +259,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
- !ruby/object:Gem::Version
|
260
260
|
version: '0'
|
261
261
|
requirements: []
|
262
|
-
rubygems_version: 3.
|
263
|
-
signing_key:
|
262
|
+
rubygems_version: 3.1.4
|
263
|
+
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: Utilities for OpenStax web sites
|
266
266
|
test_files: []
|