pin_flags 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5871f564a8eb4b411184956659089b08d73c1e32e01fa9bbcf3e7a938680970e
4
- data.tar.gz: c24537bdb1c937a1e141df64e9e0c50f62ce197fcff4eec9e0486ef72b5ce8ec
3
+ metadata.gz: 95baaab6b0a7eadd7d94d9793d3d7dcbcc1d303965f313c061d804c098ebed38
4
+ data.tar.gz: 3c732f70e1e3dfaf527c7a50c8553f736ce61011a0a708874ce7f130576821d6
5
5
  SHA512:
6
- metadata.gz: e002aa9cacf50ccef62efc38e858210ee065a71959dd676f51d355d7b84837517c6579bf53b56c1ce785ae5e663860bc1b31a1ca5793a16f9f7892cdbda1b05c
7
- data.tar.gz: c84e28d570a5fde3ef381c353644e57d2be8e50921527f55525c5409b958b42e5605318ff9fa95dde019b7c1ec67defb50a63bd50b9d907836e7ae19f8ed7b08
6
+ metadata.gz: 8fb993172bcc03ecc51c87c3374fd50de347631aead752e710c00ca3ce1a262c71fef7e93fff7437cc70951423a0bf72ba8f46f8def3dd58910faa7bb0738ed1
7
+ data.tar.gz: e248584bcb4ffc6096df6b536946ef2b1f084237a0d135a0a3f5713be17f305e70abae45a574c09c791233e2370cd23d2e1b8bd7e81d985a9317af8e145424a5
@@ -4,5 +4,15 @@ module PinFlags
4
4
 
5
5
  layout "pin_flags/application"
6
6
  protect_from_forgery with: :exception
7
+
8
+ before_action :verify_turbo_rails!
9
+
10
+ private
11
+
12
+ def verify_turbo_rails!
13
+ return if defined?(Turbo)
14
+
15
+ render plain: "PinFlags requires turbo-rails. Add `gem 'turbo-rails'` to your Gemfile.", status: :service_unavailable
16
+ end
7
17
  end
8
18
  end
@@ -3,11 +3,13 @@ module PinFlags
3
3
  isolate_namespace PinFlags
4
4
 
5
5
  initializer "pin_flags.assets.precompile" do |app|
6
- app.config.assets.precompile += %w[
7
- pin_flags/alpine.min.js
8
- pin_flags/bulma.min.css
9
- pin_flags/application.css
10
- ]
6
+ if app.config.respond_to?(:assets) && app.config.assets.respond_to?(:precompile)
7
+ app.config.assets.precompile += %w[
8
+ pin_flags/alpine.min.js
9
+ pin_flags/bulma.min.css
10
+ pin_flags/application.css
11
+ ]
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -1,3 +1,3 @@
1
1
  module PinFlags
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pin_flags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demetrious Wilson