openstax_utilities 4.2.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -1
  3. data/app/controllers/openstax/utilities/status_controller.rb +66 -0
  4. data/app/routines/openstax/utilities/search_relation.rb +7 -2
  5. data/app/views/layouts/openstax/utilities/status.html.erb +26 -0
  6. data/app/views/openstax/utilities/status/index.html.erb +45 -0
  7. data/config/routes.rb +3 -0
  8. data/lib/openstax/utilities/access_policy.rb +4 -3
  9. data/lib/openstax/utilities/assets.rb +29 -0
  10. data/lib/openstax/utilities/assets/manifest.rb +66 -0
  11. data/lib/openstax/utilities/engine.rb +3 -2
  12. data/lib/openstax/utilities/version.rb +1 -1
  13. data/lib/openstax_utilities.rb +5 -5
  14. metadata +86 -105
  15. data/spec/dummy/README.md +0 -1
  16. data/spec/dummy/Rakefile +0 -6
  17. data/spec/dummy/app/access_policies/dummy_access_policy.rb +0 -10
  18. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  19. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  20. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  21. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  22. data/spec/dummy/app/models/user.rb +0 -2
  23. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  24. data/spec/dummy/bin/bundle +0 -3
  25. data/spec/dummy/bin/rails +0 -4
  26. data/spec/dummy/bin/rake +0 -4
  27. data/spec/dummy/config.ru +0 -4
  28. data/spec/dummy/config/application.rb +0 -23
  29. data/spec/dummy/config/boot.rb +0 -5
  30. data/spec/dummy/config/database.yml +0 -25
  31. data/spec/dummy/config/environment.rb +0 -5
  32. data/spec/dummy/config/environments/development.rb +0 -37
  33. data/spec/dummy/config/environments/production.rb +0 -78
  34. data/spec/dummy/config/environments/test.rb +0 -39
  35. data/spec/dummy/config/initializers/access_policies.rb +0 -1
  36. data/spec/dummy/config/initializers/assets.rb +0 -8
  37. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  38. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
  39. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  40. data/spec/dummy/config/initializers/inflections.rb +0 -16
  41. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  42. data/spec/dummy/config/initializers/search_users.rb +0 -26
  43. data/spec/dummy/config/initializers/session_store.rb +0 -3
  44. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  45. data/spec/dummy/config/locales/en.yml +0 -23
  46. data/spec/dummy/config/routes.rb +0 -2
  47. data/spec/dummy/config/secrets.yml +0 -22
  48. data/spec/dummy/db/migrate/0_create_users.rb +0 -16
  49. data/spec/dummy/db/schema.rb +0 -29
  50. data/spec/dummy/public/404.html +0 -67
  51. data/spec/dummy/public/422.html +0 -67
  52. data/spec/dummy/public/500.html +0 -66
  53. data/spec/dummy/public/favicon.ico +0 -0
  54. data/spec/factories/user.rb +0 -8
  55. data/spec/lib/openstax/utilities/access_policy_spec.rb +0 -67
  56. data/spec/rails_helper.rb +0 -54
  57. data/spec/routines/openstax/utilities/limit_and_paginate_relation_spec.rb +0 -72
  58. data/spec/routines/openstax/utilities/order_relation_spec.rb +0 -57
  59. data/spec/routines/openstax/utilities/search_and_organize_relation_spec.rb +0 -139
  60. data/spec/routines/openstax/utilities/search_relation_spec.rb +0 -81
  61. data/spec/spec_helper.rb +0 -85
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7336e5f9c9952756f9a981da7b79d5dece466022
4
- data.tar.gz: e6a8621a11547eae03d63fc0d94e05053cc86664
2
+ SHA256:
3
+ metadata.gz: 23bd083b2474dd40ea6848f919c4adbc50cc1cbaa927b8de0f968888100a3f8d
4
+ data.tar.gz: 0a35031fbb7df47f6675307130187e24e9bf4bec4699c8a129c0697832877653
5
5
  SHA512:
6
- metadata.gz: 7b17cb61f65fe32b021ce90b736ff163fedc34ffcb3173f9ba0af024d165a4b53ea586547df15cda7b3d787bcf2afc3cf5a2c39a69ce1bc546ddce1056c6a6cf
7
- data.tar.gz: a5a03f359924bc9de55fd70e3b433fd3ef84dbed7c94d1c7ff40e802b1c5cc65d452a6bf09d77198872d94f82f3e3da6ca65a773f1becd7d6b003a122605c16c
6
+ metadata.gz: b3bee8a0ca7d846e020da56ff82a50bde40317e772e7287d8853c8847009fa1ec857bc79865c8850f9f69a7e50817c1e3e2a85188ab35de21607fa0038b32397
7
+ data.tar.gz: 3a11784b8209459777082d0939c5d2ad6e2ee5373476f518056586b5ceb0d2371ecf2362ee8ffee1755e1321bf6e30d09be32e5ef791958782a801f19131b2f5
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  OpenStax Utilities
2
2
  ==================
3
3
 
4
- [![Build Status](https://travis-ci.org/openstax/openstax_utilities.svg?branch=master)](https://travis-ci.org/openstax/openstax_utilities)
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,66 @@
1
+ require 'aws-sdk-autoscaling'
2
+
3
+ class OpenStax::Utilities::StatusController < ActionController::Base
4
+ layout 'openstax/utilities/status'
5
+
6
+ def index
7
+ @application_name = Rails.application.class.parent_name
8
+ @environment_name = Rails.application.secrets.environment_name
9
+
10
+ @statuses = if @environment_name == 'development'
11
+ [ [ 'local', 1, 1, :ok ] ]
12
+ else
13
+ queues = Delayed::Worker.queue_attributes.keys.map(&:to_s) - [ 'migration' ]
14
+ asgs = [ 'migration', 'web', 'cron', 'background' ] + queues.map do |queue|
15
+ "background-#{queue}"
16
+ end
17
+
18
+ Aws::AutoScaling::Client.new.describe_auto_scaling_groups(
19
+ auto_scaling_group_names: asgs.map do |asg|
20
+ "#{@environment_name}-#{@application_name.downcase}-#{asg}-asg"
21
+ end
22
+ ).auto_scaling_groups.map do |asg|
23
+ name = asg.auto_scaling_group_name.sub(
24
+ "#{@environment_name}-#{@application_name.downcase}-", ''
25
+ ).chomp('-asg')
26
+
27
+ status = if asg.desired_capacity == 0
28
+ if asg.instances.size > 0
29
+ :shutting_down
30
+ elsif [ 'web', 'background', 'cron' ].include?(name)
31
+ :configuration_error
32
+ else
33
+ :sleeping
34
+ end
35
+ elsif asg.instances.all? do |instance|
36
+ instance.health_status != 'Healthy' || instance.lifecycle_state != 'InService'
37
+ end
38
+ :down
39
+ elsif name == 'migration'
40
+ :migrating
41
+ elsif asg.max_size > 1 && asg.desired_capacity == asg.max_size
42
+ :at_capacity
43
+ elsif asg.instances.size < asg.desired_capacity
44
+ :scaling_up
45
+ elsif asg.instances.size > asg.desired_capacity
46
+ :scaling_down
47
+ else
48
+ :ok
49
+ end
50
+
51
+ [ name, asg.instances.size, asg.max_size, status ]
52
+ end.sort_by do |name, _, _, _|
53
+ case name
54
+ when 'migration'
55
+ '0'
56
+ when 'web'
57
+ '1'
58
+ when 'cron'
59
+ '2'
60
+ else
61
+ "3#{name}"
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -53,8 +53,13 @@ module OpenStax
53
53
 
54
54
  # Scoping
55
55
 
56
- ::KeywordSearch.search(query.to_s) do |with|
57
- instance_exec(with, &search_proc)
56
+ begin
57
+ ::KeywordSearch.search(query.to_s) do |with|
58
+ instance_exec(with, &search_proc)
59
+ end
60
+ rescue KeywordSearch::ParseError
61
+ fatal_error(code: :invalid_query,
62
+ message: 'The search query string provided is invalid')
58
63
  end
59
64
 
60
65
  outputs[:items] = @items
@@ -0,0 +1,26 @@
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
+ <header>
17
+ <h2 style="margin-left: 16px;"><%= title %></h2>
18
+ </header>
19
+
20
+ <div class="body" style="margin-left: 16px;">
21
+ <div class="body-container">
22
+ <%= yield %>
23
+ </div>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,45 @@
1
+ <%
2
+ status_icons = {
3
+ down: '💀',
4
+ configuration_error: '⚠️',
5
+ shutting_down: '😪',
6
+ at_capacity: '🥵',
7
+ scaling_down: '📉',
8
+ scaling_up: '📈',
9
+ migrating: '💾',
10
+ ok: '✅',
11
+ sleeping: '💤'
12
+ }
13
+
14
+ backend = @application_name == 'Tutor' ? 'tutor-server' : @application_name.downcase
15
+ %>
16
+
17
+ <h3>Versions</h3>
18
+
19
+ <ul>
20
+ <li>
21
+ Backend (<%= backend %>): <%= Rails.application.secrets.release_version || 'not deployed' %>
22
+ </li>
23
+ <li>
24
+ Frontend (tutor-js): <%= OpenStax::Utilities::Assets.manifest.version || 'not deployed' %>
25
+ </li>
26
+ </ul>
27
+
28
+ <% status = status_icons.find { |key, _| @statuses.any? { |_, _, _, status| status == key } } %>
29
+ <h3>Status: <% unless status.nil? %><span title="<%=
30
+ status.first.to_s.humanize
31
+ %>"><%= status.second %></span><% end %></h3>
32
+
33
+ <ul>
34
+ <% @statuses.map do |name, num_instances, max_size, status| %>
35
+ <% title = status.to_s.humanize %>
36
+ <li>
37
+ <%= name.to_s.underscore.humanize %>: <%= num_instances %>/<%= max_size %>
38
+ <% if status_icons.has_key? status %>
39
+ <span title="<%= title %>"><%= status_icons[status] %></span>
40
+ <% else %>
41
+ (<%= title %>)
42
+ <% end %>
43
+ </li>
44
+ <% end %>
45
+ </ul>
@@ -0,0 +1,3 @@
1
+ OpenStax::Utilities::Engine.routes.draw do
2
+ root to: 'status#index'
3
+ end
@@ -24,7 +24,8 @@ module OpenStax
24
24
  end
25
25
 
26
26
  def self.require_action_allowed!(action, requestor, resource)
27
- raise SecurityTransgression unless action_allowed?(action, requestor, resource)
27
+ msg = "\"#{requestor.inspect}\" is not allowed to perform \"#{action}\" on \"#{resource.inspect}\""
28
+ raise(SecurityTransgression, msg) unless action_allowed?(action, requestor, resource)
28
29
  end
29
30
 
30
31
  def self.action_allowed?(action, requestor, resource)
@@ -38,7 +39,7 @@ module OpenStax
38
39
  end
39
40
 
40
41
  resource_class = resource.is_a?(Class) ? resource : resource.class
41
- policy_class = instance.resource_policy_map[resource_class.to_s]
42
+ policy_class = instance.resource_policy_map[resource_class.to_s].try(:constantize)
42
43
 
43
44
  # If there is no policy registered, we by default deny access
44
45
  return false if policy_class.nil?
@@ -47,7 +48,7 @@ module OpenStax
47
48
  end
48
49
 
49
50
  def self.register(resource_class, policy_class)
50
- self.instance.resource_policy_map[resource_class.to_s] = policy_class
51
+ self.instance.resource_policy_map[resource_class.to_s] = policy_class.to_s
51
52
  end
52
53
 
53
54
  end
@@ -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
@@ -14,10 +15,10 @@ module OpenStax
14
15
  end
15
16
 
16
17
  config.generators do |g|
17
- g.test_framework :rspec, :fixture => false
18
+ g.test_framework :rspec, fixture: false
18
19
  g.assets false
19
20
  g.helper false
20
21
  end
21
22
  end
22
23
  end
23
- end
24
+ end
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Utilities
3
- VERSION = "4.2.0"
3
+ VERSION = '4.4.0'
4
4
  end
5
5
  end
@@ -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,8 +57,8 @@ 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
- def initialize
60
+
61
+ def initialize
61
62
  @standard_date_format = "%b %d, %Y"
62
63
  @standard_datetime_format = "%b %d, %Y %l:%M %p %Z"
63
64
  @standard_time_format = "%l:%M %p %Z"
@@ -69,4 +70,3 @@ module OpenStax
69
70
 
70
71
  end
71
72
  end
72
-
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_utilities
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.4.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: 2014-12-16 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '5.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.1'
26
+ version: '5.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: lev
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,62 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: request_store
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: faraday
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: faraday-http-cache
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: aws-sdk-autoscaling
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
55
111
  - !ruby/object:Gem::Dependency
56
112
  name: sqlite3
57
113
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +137,7 @@ dependencies:
81
137
  - !ruby/object:Gem::Version
82
138
  version: '0'
83
139
  - !ruby/object:Gem::Dependency
84
- name: factory_girl_rails
140
+ name: factory_bot_rails
85
141
  requirement: !ruby/object:Gem::Requirement
86
142
  requirements:
87
143
  - - ">="
@@ -109,7 +165,21 @@ dependencies:
109
165
  - !ruby/object:Gem::Version
110
166
  version: '0'
111
167
  - !ruby/object:Gem::Dependency
112
- name: squeel
168
+ name: vcr
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: webmock
113
183
  requirement: !ruby/object:Gem::Requirement
114
184
  requirements:
115
185
  - - ">="
@@ -132,16 +202,22 @@ files:
132
202
  - MIT-LICENSE
133
203
  - README.md
134
204
  - Rakefile
205
+ - app/controllers/openstax/utilities/status_controller.rb
135
206
  - app/routines/openstax/utilities/limit_and_paginate_relation.rb
136
207
  - app/routines/openstax/utilities/order_relation.rb
137
208
  - app/routines/openstax/utilities/search_and_organize_relation.rb
138
209
  - app/routines/openstax/utilities/search_relation.rb
210
+ - app/views/layouts/openstax/utilities/status.html.erb
211
+ - app/views/openstax/utilities/status/index.html.erb
139
212
  - app/views/osu/shared/_action_list.html.erb
213
+ - config/routes.rb
140
214
  - lib/openstax/utilities/access.rb
141
215
  - lib/openstax/utilities/access_policy.rb
142
216
  - lib/openstax/utilities/action_list.rb
143
217
  - lib/openstax/utilities/active_record_extensions.rb
144
218
  - lib/openstax/utilities/acts_as_numberable.rb
219
+ - lib/openstax/utilities/assets.rb
220
+ - lib/openstax/utilities/assets/manifest.rb
145
221
  - lib/openstax/utilities/classy_helper.rb
146
222
  - lib/openstax/utilities/delegate_access_control.rb
147
223
  - lib/openstax/utilities/engine.rb
@@ -158,53 +234,6 @@ files:
158
234
  - lib/openstax/utilities/text.rb
159
235
  - lib/openstax/utilities/version.rb
160
236
  - lib/openstax_utilities.rb
161
- - spec/dummy/README.md
162
- - spec/dummy/Rakefile
163
- - spec/dummy/app/access_policies/dummy_access_policy.rb
164
- - spec/dummy/app/assets/javascripts/application.js
165
- - spec/dummy/app/assets/stylesheets/application.css
166
- - spec/dummy/app/controllers/application_controller.rb
167
- - spec/dummy/app/helpers/application_helper.rb
168
- - spec/dummy/app/models/user.rb
169
- - spec/dummy/app/views/layouts/application.html.erb
170
- - spec/dummy/bin/bundle
171
- - spec/dummy/bin/rails
172
- - spec/dummy/bin/rake
173
- - spec/dummy/config.ru
174
- - spec/dummy/config/application.rb
175
- - spec/dummy/config/boot.rb
176
- - spec/dummy/config/database.yml
177
- - spec/dummy/config/environment.rb
178
- - spec/dummy/config/environments/development.rb
179
- - spec/dummy/config/environments/production.rb
180
- - spec/dummy/config/environments/test.rb
181
- - spec/dummy/config/initializers/access_policies.rb
182
- - spec/dummy/config/initializers/assets.rb
183
- - spec/dummy/config/initializers/backtrace_silencers.rb
184
- - spec/dummy/config/initializers/cookies_serializer.rb
185
- - spec/dummy/config/initializers/filter_parameter_logging.rb
186
- - spec/dummy/config/initializers/inflections.rb
187
- - spec/dummy/config/initializers/mime_types.rb
188
- - spec/dummy/config/initializers/search_users.rb
189
- - spec/dummy/config/initializers/session_store.rb
190
- - spec/dummy/config/initializers/wrap_parameters.rb
191
- - spec/dummy/config/locales/en.yml
192
- - spec/dummy/config/routes.rb
193
- - spec/dummy/config/secrets.yml
194
- - spec/dummy/db/migrate/0_create_users.rb
195
- - spec/dummy/db/schema.rb
196
- - spec/dummy/public/404.html
197
- - spec/dummy/public/422.html
198
- - spec/dummy/public/500.html
199
- - spec/dummy/public/favicon.ico
200
- - spec/factories/user.rb
201
- - spec/lib/openstax/utilities/access_policy_spec.rb
202
- - spec/rails_helper.rb
203
- - spec/routines/openstax/utilities/limit_and_paginate_relation_spec.rb
204
- - spec/routines/openstax/utilities/order_relation_spec.rb
205
- - spec/routines/openstax/utilities/search_and_organize_relation_spec.rb
206
- - spec/routines/openstax/utilities/search_relation_spec.rb
207
- - spec/spec_helper.rb
208
237
  homepage: http://github.com/openstax/openstax_utilities
209
238
  licenses:
210
239
  - MIT
@@ -224,56 +253,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
253
  - !ruby/object:Gem::Version
225
254
  version: '0'
226
255
  requirements: []
227
- rubyforge_project:
228
- rubygems_version: 2.2.2
256
+ rubygems_version: 3.1.4
229
257
  signing_key:
230
258
  specification_version: 4
231
259
  summary: Utilities for OpenStax web sites
232
- test_files:
233
- - spec/dummy/app/access_policies/dummy_access_policy.rb
234
- - spec/dummy/app/assets/javascripts/application.js
235
- - spec/dummy/app/assets/stylesheets/application.css
236
- - spec/dummy/app/controllers/application_controller.rb
237
- - spec/dummy/app/helpers/application_helper.rb
238
- - spec/dummy/app/models/user.rb
239
- - spec/dummy/app/views/layouts/application.html.erb
240
- - spec/dummy/bin/bundle
241
- - spec/dummy/bin/rails
242
- - spec/dummy/bin/rake
243
- - spec/dummy/config/application.rb
244
- - spec/dummy/config/boot.rb
245
- - spec/dummy/config/database.yml
246
- - spec/dummy/config/environment.rb
247
- - spec/dummy/config/environments/development.rb
248
- - spec/dummy/config/environments/production.rb
249
- - spec/dummy/config/environments/test.rb
250
- - spec/dummy/config/initializers/access_policies.rb
251
- - spec/dummy/config/initializers/assets.rb
252
- - spec/dummy/config/initializers/backtrace_silencers.rb
253
- - spec/dummy/config/initializers/cookies_serializer.rb
254
- - spec/dummy/config/initializers/filter_parameter_logging.rb
255
- - spec/dummy/config/initializers/inflections.rb
256
- - spec/dummy/config/initializers/mime_types.rb
257
- - spec/dummy/config/initializers/search_users.rb
258
- - spec/dummy/config/initializers/session_store.rb
259
- - spec/dummy/config/initializers/wrap_parameters.rb
260
- - spec/dummy/config/locales/en.yml
261
- - spec/dummy/config/routes.rb
262
- - spec/dummy/config/secrets.yml
263
- - spec/dummy/config.ru
264
- - spec/dummy/db/migrate/0_create_users.rb
265
- - spec/dummy/db/schema.rb
266
- - spec/dummy/public/404.html
267
- - spec/dummy/public/422.html
268
- - spec/dummy/public/500.html
269
- - spec/dummy/public/favicon.ico
270
- - spec/dummy/Rakefile
271
- - spec/dummy/README.md
272
- - spec/factories/user.rb
273
- - spec/lib/openstax/utilities/access_policy_spec.rb
274
- - spec/rails_helper.rb
275
- - spec/routines/openstax/utilities/limit_and_paginate_relation_spec.rb
276
- - spec/routines/openstax/utilities/order_relation_spec.rb
277
- - spec/routines/openstax/utilities/search_and_organize_relation_spec.rb
278
- - spec/routines/openstax/utilities/search_relation_spec.rb
279
- - spec/spec_helper.rb
260
+ test_files: []