openstax_utilities 4.5.2 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a0f5f4c56fdba82e036469ad782df61b733f67e3061ea4c12416257d399e477
4
- data.tar.gz: 063645a0e123dc5e916f499a4ce3ecfa734a04a2092742e9bb5c200be52a55c7
3
+ metadata.gz: f669c295f76fbae48ac64196c9e7f2766de0117bf6c782bf3d7b756d504d7202
4
+ data.tar.gz: d2848098c86245d8dbf392ea5baebddb45308d56d89795fd9b66f22461edd426
5
5
  SHA512:
6
- metadata.gz: f698f5074753000c1a83989a6aa78238d00fb17291390c8f0abef3eb7112be2fa4edb72a068bdfade5cab9f56df401a8027bfff79b1b0af521557b8795e2682f
7
- data.tar.gz: c1aa9accccf3acad744e2090762f6c83af9c3e2cc0f0d8f2d0c30eb2b8277b40490740d741403c53a643b9666bfa24f0454a0a1b6a8a1d5dceef0e4ad7207f24
6
+ metadata.gz: 0e1fd6032f2d551ff8a3892dca07b9e21526c0b4ea17099fd4feb46ad600da894da92beded99fa4f2047091cdef63ab1b7d5012a20318a9877fd6f58f1b387f6
7
+ data.tar.gz: bfe7a0eb33ee4b661300d3b9e65a5f45642dd6ecb39b9a7d22c06d5d0e49b45470f6dda9583442eaf79fd6f4180f494ef3320765bfbc6cfcd95964d16b29c0db
@@ -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 = Rails.application.secrets.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 ] ]
@@ -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 %>): <%= Rails.application.secrets.release_version || 'not deployed' %>
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 (tutor-js): <%= OpenStax::Utilities::Assets.manifest.version || 'not deployed' %>
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 (tutor-deployment): <%=
30
- Rails.application.secrets.deployment_version || 'not deployed'
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('assets.json')
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
@@ -4,7 +4,7 @@ require_relative 'assets/manifest'
4
4
  module OpenStax::Utilities
5
5
  module Assets
6
6
  def self.url
7
- url = Rails.application.secrets.assets_url
7
+ url = OpenStax::Utilities.configuration.assets_url
8
8
  url.ends_with?('/') ? url : "#{url}/"
9
9
  end
10
10
 
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Utilities
3
- VERSION = '4.5.2'
3
+ VERSION = '5.0.0'
4
4
  end
5
5
  end
@@ -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.5.2
4
+ version: 5.0.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: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-11-19 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.2.7
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: []