good_job 3.12.5 → 3.12.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/app/controllers/good_job/frontends_controller.rb +45 -0
- data/app/{assets/good_job/modules → frontend/good_job}/application.js +4 -0
- data/app/frontend/good_job/vendor/chartjs/chart.min.js +19 -0
- data/app/frontend/good_job/vendor/rails_ujs.js +7 -0
- data/app/frontend/good_job/vendor/stimulus.js +2408 -0
- data/app/views/layouts/good_job/application.html.erb +8 -8
- data/config/routes.rb +3 -13
- data/lib/good_job/adapter.rb +9 -22
- data/lib/good_job/capsule.rb +83 -0
- data/lib/good_job/cli.rb +4 -10
- data/lib/good_job/version.rb +1 -1
- data/lib/good_job.rb +11 -14
- metadata +18 -16
- data/app/assets/good_job/vendor/chartjs/chart.min.js +0 -13
- data/app/assets/good_job/vendor/rails_ujs.js +0 -747
- data/app/controllers/good_job/assets_controller.rb +0 -47
- /data/app/{assets → frontend}/good_job/modules/charts.js +0 -0
- /data/app/{assets → frontend}/good_job/modules/checkbox_toggle.js +0 -0
- /data/app/{assets → frontend}/good_job/modules/document_ready.js +0 -0
- /data/app/{assets → frontend}/good_job/modules/live_poll.js +0 -0
- /data/app/{assets → frontend}/good_job/modules/popovers.js +0 -0
- /data/app/{assets → frontend}/good_job/modules/toasts.js +0 -0
- /data/app/{assets → frontend}/good_job/style.css +0 -0
- /data/app/{assets → frontend}/good_job/vendor/bootstrap/bootstrap.bundle.min.js +0 -0
- /data/app/{assets → frontend}/good_job/vendor/bootstrap/bootstrap.min.css +0 -0
- /data/app/{assets → frontend}/good_job/vendor/es_module_shims.js +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24b3e7de3de7bb0365a230607a0f1f566d431adcd508ce7ee23406164c6528bc
|
4
|
+
data.tar.gz: cd84291baf21cbaabbc543510851481ee835278bd1e844380be99fff749e0702
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d79680539f1dfabf4076e313207a54b3f38370f31ca855fdc3cf5bfc20799dd2e6b2495274055a45027459f31439dd11677f270ef823ec6c64b8f44359691312
|
7
|
+
data.tar.gz: 1606e6811d188bd18d56d368fe712871193283c93f3f52c5300052884e4ca1fbb3e8ab502499add0b9364780eca13154ca9cb6c2bfdc8674ca3dd6b157f28209
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v3.12.7](https://github.com/bensheldon/good_job/tree/v3.12.7) (2023-03-01)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.6...v3.12.7)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Rename "assets" to "frontends" to avoid Asset Pipeline collisions [\#874](https://github.com/bensheldon/good_job/pull/874) ([bensheldon](https://github.com/bensheldon))
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- GoodJob's JavaScript takes precedence over application's JavaScript in GoodJob 3.12.6, Rails 7 [\#873](https://github.com/bensheldon/good_job/issues/873)
|
14
|
+
|
15
|
+
## [v3.12.6](https://github.com/bensheldon/good_job/tree/v3.12.6) (2023-03-01)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.5...v3.12.6)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- Update and cleanup js and css assets; add Stimulus [\#870](https://github.com/bensheldon/good_job/pull/870) ([bensheldon](https://github.com/bensheldon))
|
22
|
+
- Bump actions/add-to-project from 0.4.0 to 0.4.1 [\#869](https://github.com/bensheldon/good_job/pull/869) ([dependabot[bot]](https://github.com/apps/dependabot))
|
23
|
+
- Bump actions/checkout from 2 to 3 [\#868](https://github.com/bensheldon/good_job/pull/868) ([dependabot[bot]](https://github.com/apps/dependabot))
|
24
|
+
- Bump rubocop-rails from 2.17.4 to 2.18.0 [\#867](https://github.com/bensheldon/good_job/pull/867) ([dependabot[bot]](https://github.com/apps/dependabot))
|
25
|
+
- Bump pg from 1.4.5 to 1.4.6 [\#866](https://github.com/bensheldon/good_job/pull/866) ([dependabot[bot]](https://github.com/apps/dependabot))
|
26
|
+
- Extract GoodJob::Capsule [\#861](https://github.com/bensheldon/good_job/pull/861) ([bensheldon](https://github.com/bensheldon))
|
27
|
+
|
3
28
|
## [v3.12.5](https://github.com/bensheldon/good_job/tree/v3.12.5) (2023-02-24)
|
4
29
|
|
5
30
|
[Full Changelog](https://github.com/bensheldon/good_job/compare/v3.12.4...v3.12.5)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module GoodJob
|
3
|
+
class FrontendsController < ActionController::Base # rubocop:disable Rails/ApplicationController
|
4
|
+
skip_after_action :verify_same_origin_request
|
5
|
+
|
6
|
+
STATIC_ASSETS = {
|
7
|
+
css: {
|
8
|
+
bootstrap: GoodJob::Engine.root.join("app", "frontend", "good_job", "vendor", "bootstrap", "bootstrap.min.css"),
|
9
|
+
style: GoodJob::Engine.root.join("app", "frontend", "good_job", "style.css"),
|
10
|
+
},
|
11
|
+
js: {
|
12
|
+
bootstrap: GoodJob::Engine.root.join("app", "frontend", "good_job", "vendor", "bootstrap", "bootstrap.bundle.min.js"),
|
13
|
+
chartjs: GoodJob::Engine.root.join("app", "frontend", "good_job", "vendor", "chartjs", "chart.min.js"),
|
14
|
+
es_module_shims: GoodJob::Engine.root.join("app", "frontend", "good_job", "vendor", "es_module_shims.js"),
|
15
|
+
rails_ujs: GoodJob::Engine.root.join("app", "frontend", "good_job", "vendor", "rails_ujs.js"),
|
16
|
+
},
|
17
|
+
}.freeze
|
18
|
+
|
19
|
+
MODULE_OVERRIDES = {
|
20
|
+
application: GoodJob::Engine.root.join("app", "frontend", "good_job", "application.js"),
|
21
|
+
stimulus: GoodJob::Engine.root.join("app", "frontend", "good_job", "vendor", "stimulus.js"),
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
def self.js_modules
|
25
|
+
@_js_modules ||= GoodJob::Engine.root.join("app", "frontend", "good_job", "modules").children.select(&:file?).each_with_object({}) do |file, modules|
|
26
|
+
key = File.basename(file.basename.to_s, ".js").to_sym
|
27
|
+
modules[key] = file
|
28
|
+
end.merge(MODULE_OVERRIDES)
|
29
|
+
end
|
30
|
+
|
31
|
+
before_action do
|
32
|
+
expires_in 1.year, public: true
|
33
|
+
end
|
34
|
+
|
35
|
+
def static
|
36
|
+
render file: STATIC_ASSETS.dig(params[:format].to_sym, params[:name].to_sym) || raise(ActionController::RoutingError, 'Not Found')
|
37
|
+
end
|
38
|
+
|
39
|
+
def module
|
40
|
+
raise(ActionController::RoutingError, 'Not Found') if params[:format] != "js"
|
41
|
+
|
42
|
+
render file: self.class.js_modules[params[:name].to_sym] || raise(ActionController::RoutingError, 'Not Found')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -7,6 +7,9 @@ import showToasts from "toasts";
|
|
7
7
|
import setupPopovers from "popovers";
|
8
8
|
import LivePoll from "live_poll";
|
9
9
|
|
10
|
+
import { Application } from "stimulus";
|
11
|
+
window.Stimulus = Application.start();
|
12
|
+
|
10
13
|
documentReady(function() {
|
11
14
|
renderCharts();
|
12
15
|
showToasts();
|
@@ -16,3 +19,4 @@ documentReady(function() {
|
|
16
19
|
const livePoll = new LivePoll
|
17
20
|
livePoll.start();
|
18
21
|
});
|
22
|
+
|