openstax_utilities 4.2.3 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/app/controllers/openstax/utilities/status_controller.rb +81 -0
- data/app/views/layouts/openstax/utilities/status.html.erb +24 -0
- data/app/views/openstax/utilities/status/index.html.erb +52 -0
- data/config/routes.rb +3 -0
- data/lib/openstax/utilities/assets.rb +29 -0
- data/lib/openstax/utilities/assets/manifest.rb +66 -0
- data/lib/openstax/utilities/engine.rb +8 -3
- data/lib/openstax/utilities/version.rb +1 -1
- data/lib/openstax_utilities.rb +7 -5
- metadata +90 -105
- data/spec/dummy/README.md +0 -1
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/access_policies/dummier_access_policy.rb +0 -10
- data/spec/dummy/app/access_policies/dummy_access_policy.rb +0 -10
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/user.rb +0 -2
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -23
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -78
- data/spec/dummy/config/environments/test.rb +0 -39
- data/spec/dummy/config/initializers/access_policies.rb +0 -1
- data/spec/dummy/config/initializers/assets.rb +0 -8
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/search_users.rb +0 -26
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -2
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/db/migrate/0_create_users.rb +0 -16
- data/spec/dummy/db/schema.rb +0 -29
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/user.rb +0 -8
- data/spec/lib/openstax/utilities/access_policy_spec.rb +0 -68
- data/spec/rails_helper.rb +0 -54
- data/spec/routines/openstax/utilities/limit_and_paginate_relation_spec.rb +0 -72
- data/spec/routines/openstax/utilities/order_relation_spec.rb +0 -57
- data/spec/routines/openstax/utilities/search_and_organize_relation_spec.rb +0 -139
- data/spec/routines/openstax/utilities/search_relation_spec.rb +0 -81
- data/spec/spec_helper.rb +0 -85
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f4d1192783928b4f282084e72dbaf1cbeb322670d8af58bbbc0766f4bf21675f
|
4
|
+
data.tar.gz: fdd43154979bc0a7f997e0ce96f6f9322e8aceedce34644fa25b09950f64bf29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7307c95428084dd8c3545c8bd8e81a830de28e352954ca3f37a66b0b49836140c8e1fbb46fe99485adc1ebf12a0bddba995b401fd9ac138feb10546fde5d7316
|
7
|
+
data.tar.gz: 6568675770199473e6d80e5a272bc302b63cb64d0e571280cefc3da0bb5b38238f1d486ad8628e3afa48f6a7bca8e00e614a5ae5fb0e81e74b9d877f7e3e4452
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
OpenStax Utilities
|
2
2
|
==================
|
3
3
|
|
4
|
-
[![
|
4
|
+
[![Tests](https://github.com/openstax/openstax_utilities/workflows/Tests/badge.svg)](https://github.com/openstax/openstax_utilities/actions?query=workflow:Tests)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/openstax/openstax_utilities.png)](https://codeclimate.com/github/openstax/openstax_utilities)
|
6
6
|
|
7
7
|
A set of common utilities for the various OpenStax projects.
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'aws-sdk-autoscaling'
|
2
|
+
|
3
|
+
class OpenStax::Utilities::StatusController < ActionController::Base
|
4
|
+
before_action :authenticate
|
5
|
+
|
6
|
+
layout 'openstax/utilities/status'
|
7
|
+
|
8
|
+
def index
|
9
|
+
@application_name = Rails.application.class.parent_name
|
10
|
+
@environment_name = Rails.application.secrets.environment_name
|
11
|
+
|
12
|
+
@statuses = if @environment_name == 'development'
|
13
|
+
[ [ 'local', 1, 1, :ok ] ]
|
14
|
+
else
|
15
|
+
queues = Delayed::Worker.queue_attributes.keys.map(&:to_s) - [ 'migration' ]
|
16
|
+
asgs = [ 'migration', 'web', 'cron', 'background' ] + queues.map do |queue|
|
17
|
+
"background-#{queue}"
|
18
|
+
end
|
19
|
+
|
20
|
+
Aws::AutoScaling::Client.new.describe_auto_scaling_groups(
|
21
|
+
auto_scaling_group_names: asgs.map do |asg|
|
22
|
+
"#{@environment_name}-#{@application_name.downcase}-#{asg}-asg"
|
23
|
+
end
|
24
|
+
).auto_scaling_groups.map do |asg|
|
25
|
+
name = asg.auto_scaling_group_name.sub(
|
26
|
+
"#{@environment_name}-#{@application_name.downcase}-", ''
|
27
|
+
).chomp('-asg')
|
28
|
+
|
29
|
+
status = if asg.desired_capacity == 0
|
30
|
+
if [ 'web', 'background', 'cron' ].include?(name)
|
31
|
+
:configuration_error
|
32
|
+
elsif asg.instances.size > 0
|
33
|
+
:shutting_down
|
34
|
+
else
|
35
|
+
:sleeping
|
36
|
+
end
|
37
|
+
elsif asg.instances.all? do |instance|
|
38
|
+
instance.health_status != 'Healthy' || instance.lifecycle_state != 'InService'
|
39
|
+
end
|
40
|
+
case name
|
41
|
+
when 'web'
|
42
|
+
:down
|
43
|
+
when 'background', 'cron'
|
44
|
+
:impacted
|
45
|
+
else
|
46
|
+
:offline
|
47
|
+
end
|
48
|
+
elsif name == 'migration'
|
49
|
+
:migrating
|
50
|
+
elsif asg.max_size > 1 && asg.desired_capacity == asg.max_size
|
51
|
+
:at_capacity
|
52
|
+
elsif asg.instances.size < asg.desired_capacity
|
53
|
+
:scaling_up
|
54
|
+
elsif asg.instances.size > asg.desired_capacity
|
55
|
+
:scaling_down
|
56
|
+
else
|
57
|
+
:ok
|
58
|
+
end
|
59
|
+
|
60
|
+
[ name, asg.instances.size, asg.max_size, status ]
|
61
|
+
end.sort_by do |name, _, _, _|
|
62
|
+
case name
|
63
|
+
when 'migration'
|
64
|
+
'0'
|
65
|
+
when 'web'
|
66
|
+
'1'
|
67
|
+
when 'cron'
|
68
|
+
'2'
|
69
|
+
else
|
70
|
+
"3#{name}"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
protected
|
77
|
+
|
78
|
+
def authenticate
|
79
|
+
instance_exec &OpenStax::Utilities.configuration.status_authenticate
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% title = "OpenStax #{@application_name} (#{@environment_name}) Status" %>
|
2
|
+
|
3
|
+
<!DOCTYPE html>
|
4
|
+
<html>
|
5
|
+
<head>
|
6
|
+
<title><%= title %></title>
|
7
|
+
<meta name="robots" content="noindex">
|
8
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF8" />
|
9
|
+
|
10
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
11
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
12
|
+
<%= csrf_meta_tags %>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body id="status" class="status">
|
16
|
+
<div class="body">
|
17
|
+
<div class="body-container" style="margin-left: 16px;">
|
18
|
+
<header><h2><%= title %></h2></header>
|
19
|
+
|
20
|
+
<%= yield %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<%
|
2
|
+
status_icons = {
|
3
|
+
configuration_error: '💀',
|
4
|
+
down: '💥',
|
5
|
+
impacted: '⚠️',
|
6
|
+
at_capacity: '🥵',
|
7
|
+
migrating: '💾',
|
8
|
+
scaling_down: '📉',
|
9
|
+
scaling_up: '📈',
|
10
|
+
ok: '✅',
|
11
|
+
shutting_down: '😪',
|
12
|
+
offline: '🔌',
|
13
|
+
sleeping: '💤'
|
14
|
+
}
|
15
|
+
|
16
|
+
backend = @application_name == 'Tutor' ? 'tutor-server' : @application_name.downcase
|
17
|
+
%>
|
18
|
+
|
19
|
+
<h3>Versions</h3>
|
20
|
+
|
21
|
+
<ul>
|
22
|
+
<li>
|
23
|
+
Backend (<%= backend %>): <%= Rails.application.secrets.release_version || 'not deployed' %>
|
24
|
+
</li>
|
25
|
+
<li>
|
26
|
+
Frontend (tutor-js): <%= OpenStax::Utilities::Assets.manifest.version || 'not deployed' %>
|
27
|
+
</li>
|
28
|
+
<li>
|
29
|
+
Deployment (tutor-deployment): <%=
|
30
|
+
Rails.application.secrets.deployment_version || 'not deployed'
|
31
|
+
%>
|
32
|
+
</li>
|
33
|
+
</ul>
|
34
|
+
|
35
|
+
<% status = status_icons.find { |key, _| @statuses.any? { |_, _, _, status| status == key } } %>
|
36
|
+
<h3>Status: <% unless status.nil? %><span title="<%=
|
37
|
+
status.first.to_s.humanize
|
38
|
+
%>"><%= status.second %></span><% end %></h3>
|
39
|
+
|
40
|
+
<ul>
|
41
|
+
<% @statuses.map do |name, num_instances, max_size, status| %>
|
42
|
+
<% title = status.to_s.humanize %>
|
43
|
+
<li>
|
44
|
+
<%= name.to_s.underscore.humanize %>: <%= num_instances %>/<%= max_size %>
|
45
|
+
<% if status_icons.has_key? status %>
|
46
|
+
<span title="<%= title %>"><%= status_icons[status] %></span>
|
47
|
+
<% else %>
|
48
|
+
(<%= title %>)
|
49
|
+
<% end %>
|
50
|
+
</li>
|
51
|
+
<% end %>
|
52
|
+
</ul>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'request_store'
|
2
|
+
require_relative 'assets/manifest'
|
3
|
+
|
4
|
+
module OpenStax::Utilities
|
5
|
+
module Assets
|
6
|
+
def self.url
|
7
|
+
url = Rails.application.secrets.assets_url
|
8
|
+
url.ends_with?('/') ? url : "#{url}/"
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.url_for(asset)
|
12
|
+
"#{url}#{asset}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.manifest
|
16
|
+
RequestStore.store[:assets_manifest] ||= OpenStax::Utilities::Assets::Manifest.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.tags_for(asset)
|
20
|
+
manifest[asset].map do |chunk|
|
21
|
+
"<script type='text/javascript' src='#{chunk}' crossorigin='anonymous' async></script>"
|
22
|
+
end.join("\n").html_safe
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.digest_for(asset)
|
26
|
+
Digest::MD5.hexdigest tags_for(asset)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'faraday-http-cache'
|
3
|
+
|
4
|
+
module OpenStax::Utilities
|
5
|
+
module Assets
|
6
|
+
# Reads and parses the assets manifest
|
7
|
+
class Manifest
|
8
|
+
attr_reader :version
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@assets = HashWithIndifferentAccess.new
|
12
|
+
|
13
|
+
url = OpenStax::Utilities::Assets.url_for('assets.json')
|
14
|
+
|
15
|
+
begin
|
16
|
+
response = self.class.client.get url
|
17
|
+
|
18
|
+
if response.success?
|
19
|
+
contents = JSON.parse response.body
|
20
|
+
|
21
|
+
@version = contents['version']
|
22
|
+
|
23
|
+
if contents['entrypoints'].blank?
|
24
|
+
Rails.logger.error { "failed to parse manifest from #{url}" }
|
25
|
+
else
|
26
|
+
contents['entrypoints'].each do |entry_key, chunks|
|
27
|
+
@assets[entry_key] = chunks['js'].map do |chunk|
|
28
|
+
OpenStax::Utilities::Assets.url_for(chunk)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
else
|
33
|
+
Rails.logger.error { "status #{response.status} when reading remote url: #{url}" }
|
34
|
+
end
|
35
|
+
rescue Faraday::ConnectionFailed, Addressable::URI::InvalidURIError, Errno::ECONNREFUSED
|
36
|
+
end
|
37
|
+
|
38
|
+
Rails.logger.info do
|
39
|
+
"running in development mode with assets served by webpack at #{
|
40
|
+
OpenStax::Utilities::Assets.url
|
41
|
+
}"
|
42
|
+
end if @assets.blank?
|
43
|
+
end
|
44
|
+
|
45
|
+
def [](asset)
|
46
|
+
return [ OpenStax::Utilities::Assets.url_for("#{asset}.js") ] if @assets.blank?
|
47
|
+
|
48
|
+
@assets[asset] || []
|
49
|
+
end
|
50
|
+
|
51
|
+
protected
|
52
|
+
|
53
|
+
# Faraday is probably thread-safe but makes no guarantees
|
54
|
+
# https://github.com/lostisland/faraday/issues/370
|
55
|
+
# We could potentially reuse the client object
|
56
|
+
# However, bugs happen: https://github.com/lostisland/faraday/issues/1068
|
57
|
+
def self.client
|
58
|
+
Faraday.new do |builder|
|
59
|
+
builder.use :http_cache, store: Rails.cache
|
60
|
+
|
61
|
+
builder.adapter Faraday.default_adapter
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -2,6 +2,7 @@ require "openstax/utilities/action_list"
|
|
2
2
|
|
3
3
|
ActiveSupport::Inflector.inflections do |inflect|
|
4
4
|
inflect.acronym 'OpenStax'
|
5
|
+
inflect.acronym 'OSU'
|
5
6
|
end
|
6
7
|
|
7
8
|
module OpenStax
|
@@ -10,14 +11,18 @@ module OpenStax
|
|
10
11
|
isolate_namespace OpenStax::Utilities
|
11
12
|
|
12
13
|
config.after_initialize do
|
13
|
-
|
14
|
+
if Rails::VERSION::MAJOR == 6
|
15
|
+
OSU::SITE_NAME = ::Rails.application.class.module_parent_name.underscore
|
16
|
+
else
|
17
|
+
OSU::SITE_NAME = ::Rails.application.class.parent_name.underscore
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
config.generators do |g|
|
17
|
-
g.test_framework :rspec, :
|
22
|
+
g.test_framework :rspec, fixture: false
|
18
23
|
g.assets false
|
19
24
|
g.helper false
|
20
25
|
end
|
21
26
|
end
|
22
27
|
end
|
23
|
-
end
|
28
|
+
end
|
data/lib/openstax_utilities.rb
CHANGED
@@ -19,6 +19,7 @@ require "openstax/utilities/acts_as_numberable"
|
|
19
19
|
require "openstax/utilities/delegate_access_control"
|
20
20
|
require "openstax/utilities/access_policy"
|
21
21
|
require "openstax/utilities/osu_helper"
|
22
|
+
require "openstax/utilities/assets"
|
22
23
|
|
23
24
|
module OpenStax
|
24
25
|
module Utilities
|
@@ -35,7 +36,7 @@ module OpenStax
|
|
35
36
|
#
|
36
37
|
# Configuration machinery.
|
37
38
|
#
|
38
|
-
# To configure OpenStax Utilities, put the following code in your applications
|
39
|
+
# To configure OpenStax Utilities, put the following code in your applications
|
39
40
|
# initialization logic (eg. in the config/initializers in a Rails app)
|
40
41
|
#
|
41
42
|
# OpenStax::Utilities.configure do |config|
|
@@ -43,7 +44,7 @@ module OpenStax
|
|
43
44
|
# ...
|
44
45
|
# end
|
45
46
|
#
|
46
|
-
|
47
|
+
|
47
48
|
def configure
|
48
49
|
yield configuration
|
49
50
|
end
|
@@ -56,11 +57,13 @@ module OpenStax
|
|
56
57
|
attr_accessor :standard_date_format
|
57
58
|
attr_accessor :standard_datetime_format
|
58
59
|
attr_accessor :standard_time_format
|
59
|
-
|
60
|
-
|
60
|
+
attr_accessor :status_authenticate
|
61
|
+
|
62
|
+
def initialize
|
61
63
|
@standard_date_format = "%b %d, %Y"
|
62
64
|
@standard_datetime_format = "%b %d, %Y %l:%M %p %Z"
|
63
65
|
@standard_time_format = "%l:%M %p %Z"
|
66
|
+
@status_authenticate = -> { head :forbidden }
|
64
67
|
super
|
65
68
|
end
|
66
69
|
end
|
@@ -69,4 +72,3 @@ module OpenStax
|
|
69
72
|
|
70
73
|
end
|
71
74
|
end
|
72
|
-
|
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
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '5.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: lev
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +58,62 @@ dependencies:
|
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: request_store
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: faraday
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: faraday-http-cache
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: aws-sdk-autoscaling
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :runtime
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
55
117
|
- !ruby/object:Gem::Dependency
|
56
118
|
name: sqlite3
|
57
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +143,7 @@ dependencies:
|
|
81
143
|
- !ruby/object:Gem::Version
|
82
144
|
version: '0'
|
83
145
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
146
|
+
name: factory_bot_rails
|
85
147
|
requirement: !ruby/object:Gem::Requirement
|
86
148
|
requirements:
|
87
149
|
- - ">="
|
@@ -109,7 +171,21 @@ dependencies:
|
|
109
171
|
- !ruby/object:Gem::Version
|
110
172
|
version: '0'
|
111
173
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
174
|
+
name: vcr
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: webmock
|
113
189
|
requirement: !ruby/object:Gem::Requirement
|
114
190
|
requirements:
|
115
191
|
- - ">="
|
@@ -132,16 +208,22 @@ files:
|
|
132
208
|
- MIT-LICENSE
|
133
209
|
- README.md
|
134
210
|
- Rakefile
|
211
|
+
- app/controllers/openstax/utilities/status_controller.rb
|
135
212
|
- app/routines/openstax/utilities/limit_and_paginate_relation.rb
|
136
213
|
- app/routines/openstax/utilities/order_relation.rb
|
137
214
|
- app/routines/openstax/utilities/search_and_organize_relation.rb
|
138
215
|
- app/routines/openstax/utilities/search_relation.rb
|
216
|
+
- app/views/layouts/openstax/utilities/status.html.erb
|
217
|
+
- app/views/openstax/utilities/status/index.html.erb
|
139
218
|
- app/views/osu/shared/_action_list.html.erb
|
219
|
+
- config/routes.rb
|
140
220
|
- lib/openstax/utilities/access.rb
|
141
221
|
- lib/openstax/utilities/access_policy.rb
|
142
222
|
- lib/openstax/utilities/action_list.rb
|
143
223
|
- lib/openstax/utilities/active_record_extensions.rb
|
144
224
|
- lib/openstax/utilities/acts_as_numberable.rb
|
225
|
+
- lib/openstax/utilities/assets.rb
|
226
|
+
- lib/openstax/utilities/assets/manifest.rb
|
145
227
|
- lib/openstax/utilities/classy_helper.rb
|
146
228
|
- lib/openstax/utilities/delegate_access_control.rb
|
147
229
|
- lib/openstax/utilities/engine.rb
|
@@ -158,54 +240,6 @@ files:
|
|
158
240
|
- lib/openstax/utilities/text.rb
|
159
241
|
- lib/openstax/utilities/version.rb
|
160
242
|
- lib/openstax_utilities.rb
|
161
|
-
- spec/dummy/README.md
|
162
|
-
- spec/dummy/Rakefile
|
163
|
-
- spec/dummy/app/access_policies/dummier_access_policy.rb
|
164
|
-
- spec/dummy/app/access_policies/dummy_access_policy.rb
|
165
|
-
- spec/dummy/app/assets/javascripts/application.js
|
166
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
167
|
-
- spec/dummy/app/controllers/application_controller.rb
|
168
|
-
- spec/dummy/app/helpers/application_helper.rb
|
169
|
-
- spec/dummy/app/models/user.rb
|
170
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
171
|
-
- spec/dummy/bin/bundle
|
172
|
-
- spec/dummy/bin/rails
|
173
|
-
- spec/dummy/bin/rake
|
174
|
-
- spec/dummy/config.ru
|
175
|
-
- spec/dummy/config/application.rb
|
176
|
-
- spec/dummy/config/boot.rb
|
177
|
-
- spec/dummy/config/database.yml
|
178
|
-
- spec/dummy/config/environment.rb
|
179
|
-
- spec/dummy/config/environments/development.rb
|
180
|
-
- spec/dummy/config/environments/production.rb
|
181
|
-
- spec/dummy/config/environments/test.rb
|
182
|
-
- spec/dummy/config/initializers/access_policies.rb
|
183
|
-
- spec/dummy/config/initializers/assets.rb
|
184
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
185
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
186
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
187
|
-
- spec/dummy/config/initializers/inflections.rb
|
188
|
-
- spec/dummy/config/initializers/mime_types.rb
|
189
|
-
- spec/dummy/config/initializers/search_users.rb
|
190
|
-
- spec/dummy/config/initializers/session_store.rb
|
191
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
192
|
-
- spec/dummy/config/locales/en.yml
|
193
|
-
- spec/dummy/config/routes.rb
|
194
|
-
- spec/dummy/config/secrets.yml
|
195
|
-
- spec/dummy/db/migrate/0_create_users.rb
|
196
|
-
- spec/dummy/db/schema.rb
|
197
|
-
- spec/dummy/public/404.html
|
198
|
-
- spec/dummy/public/422.html
|
199
|
-
- spec/dummy/public/500.html
|
200
|
-
- spec/dummy/public/favicon.ico
|
201
|
-
- spec/factories/user.rb
|
202
|
-
- spec/lib/openstax/utilities/access_policy_spec.rb
|
203
|
-
- spec/rails_helper.rb
|
204
|
-
- spec/routines/openstax/utilities/limit_and_paginate_relation_spec.rb
|
205
|
-
- spec/routines/openstax/utilities/order_relation_spec.rb
|
206
|
-
- spec/routines/openstax/utilities/search_and_organize_relation_spec.rb
|
207
|
-
- spec/routines/openstax/utilities/search_relation_spec.rb
|
208
|
-
- spec/spec_helper.rb
|
209
243
|
homepage: http://github.com/openstax/openstax_utilities
|
210
244
|
licenses:
|
211
245
|
- MIT
|
@@ -225,57 +259,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
259
|
- !ruby/object:Gem::Version
|
226
260
|
version: '0'
|
227
261
|
requirements: []
|
228
|
-
|
229
|
-
rubygems_version: 2.2.2
|
262
|
+
rubygems_version: 3.1.4
|
230
263
|
signing_key:
|
231
264
|
specification_version: 4
|
232
265
|
summary: Utilities for OpenStax web sites
|
233
|
-
test_files:
|
234
|
-
- spec/dummy/app/access_policies/dummier_access_policy.rb
|
235
|
-
- spec/dummy/app/access_policies/dummy_access_policy.rb
|
236
|
-
- spec/dummy/app/assets/javascripts/application.js
|
237
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
238
|
-
- spec/dummy/app/controllers/application_controller.rb
|
239
|
-
- spec/dummy/app/helpers/application_helper.rb
|
240
|
-
- spec/dummy/app/models/user.rb
|
241
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
242
|
-
- spec/dummy/bin/bundle
|
243
|
-
- spec/dummy/bin/rails
|
244
|
-
- spec/dummy/bin/rake
|
245
|
-
- spec/dummy/config/application.rb
|
246
|
-
- spec/dummy/config/boot.rb
|
247
|
-
- spec/dummy/config/database.yml
|
248
|
-
- spec/dummy/config/environment.rb
|
249
|
-
- spec/dummy/config/environments/development.rb
|
250
|
-
- spec/dummy/config/environments/production.rb
|
251
|
-
- spec/dummy/config/environments/test.rb
|
252
|
-
- spec/dummy/config/initializers/access_policies.rb
|
253
|
-
- spec/dummy/config/initializers/assets.rb
|
254
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
255
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
256
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
257
|
-
- spec/dummy/config/initializers/inflections.rb
|
258
|
-
- spec/dummy/config/initializers/mime_types.rb
|
259
|
-
- spec/dummy/config/initializers/search_users.rb
|
260
|
-
- spec/dummy/config/initializers/session_store.rb
|
261
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
262
|
-
- spec/dummy/config/locales/en.yml
|
263
|
-
- spec/dummy/config/routes.rb
|
264
|
-
- spec/dummy/config/secrets.yml
|
265
|
-
- spec/dummy/config.ru
|
266
|
-
- spec/dummy/db/migrate/0_create_users.rb
|
267
|
-
- spec/dummy/db/schema.rb
|
268
|
-
- spec/dummy/public/404.html
|
269
|
-
- spec/dummy/public/422.html
|
270
|
-
- spec/dummy/public/500.html
|
271
|
-
- spec/dummy/public/favicon.ico
|
272
|
-
- spec/dummy/Rakefile
|
273
|
-
- spec/dummy/README.md
|
274
|
-
- spec/factories/user.rb
|
275
|
-
- spec/lib/openstax/utilities/access_policy_spec.rb
|
276
|
-
- spec/rails_helper.rb
|
277
|
-
- spec/routines/openstax/utilities/limit_and_paginate_relation_spec.rb
|
278
|
-
- spec/routines/openstax/utilities/order_relation_spec.rb
|
279
|
-
- spec/routines/openstax/utilities/search_and_organize_relation_spec.rb
|
280
|
-
- spec/routines/openstax/utilities/search_relation_spec.rb
|
281
|
-
- spec/spec_helper.rb
|
266
|
+
test_files: []
|