pin_flags 0.1.3 β†’ 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: 3977d70021338a38c29de38454b616f8a0070109e3d38f224a34833e94439dcf
4
- data.tar.gz: 139be232c37a1da71d77d411460376cdf9d09484b04c7d428a883b746ce356ba
3
+ metadata.gz: 95baaab6b0a7eadd7d94d9793d3d7dcbcc1d303965f313c061d804c098ebed38
4
+ data.tar.gz: 3c732f70e1e3dfaf527c7a50c8553f736ce61011a0a708874ce7f130576821d6
5
5
  SHA512:
6
- metadata.gz: a59e5b3091e653de9d6eb48d9f944427ae736385223bda09ef39d001b2efe7063bff536ef23d9559b8854d083235d561e6f256117ab8e2bde0c561a85001c7e7
7
- data.tar.gz: a28677639c6d0d11ff04fb6de0adeac27471779029da8a1118d333b45c9fd62ffa461d5f7de05c75e5650198989f4b366b26f8b8cc5ccf33535db1b14996c97c
6
+ metadata.gz: 8fb993172bcc03ecc51c87c3374fd50de347631aead752e710c00ca3ce1a262c71fef7e93fff7437cc70951423a0bf72ba8f46f8def3dd58910faa7bb0738ed1
7
+ data.tar.gz: e248584bcb4ffc6096df6b536946ef2b1f084237a0d135a0a3f5713be17f305e70abae45a574c09c791233e2370cd23d2e1b8bd7e81d985a9317af8e145424a5
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
- # β›³ Pin Flags
1
+ <div align="center">
2
+ <img src="docs/pin_flags_logo.svg" alt="Pin Flags" height="140">
2
3
 
3
- A lightweight Rails engine for managing entity based features with built-in caching support. "Pin features" to any ActiveRecord model with ease, providing a slightly different take on traditional feature flags.
4
+ <strong>"Pin features" to any ActiveRecord model with ease; entity scoped feature flags.</strong>
5
+
6
+ [![Gem Version](https://badge.fury.io/rb/pin_flags.svg)](https://badge.fury.io/rb/pin_flags)
7
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
8
+ [![Gem Downloads](https://img.shields.io/gem/dt/pin_flags)](https://rubygems.org/gems/pin_flags)
9
+ </div>
4
10
 
5
11
  <div style="display: flex; justify-content: center;">
6
12
  <img src="docs/pin_flags_feature_tags_ui.png" alt="Feature Tags UI" style="width: 100%; min-width: 300px;">
@@ -10,7 +16,7 @@ A lightweight Rails engine for managing entity based features with built-in cach
10
16
 
11
17
  - πŸš€ Polymorphic "feature tags" which can be tied to any ActiveRecord Model
12
18
  - ⚑ Built-in caching with configurable expiry
13
- - 🎨 An admn UI that stays out of your way with minified [BulmaCSS](https://github.com/jgthms/bulma) and [AlpineJS](https://github.com/alpinejs/alpine)
19
+ - 🎨 An admin UI that stays out of your way with minified [BulmaCSS](https://github.com/jgthms/bulma) and [AlpineJS](https://github.com/alpinejs/alpine)
14
20
  - πŸ”’ Isolated namespace to avoid conflicts
15
21
  - πŸ’‰ No dependency on Stimulus
16
22
 
@@ -23,3 +23,8 @@
23
23
  opacity: 0;
24
24
  transition: opacity 0.3s ease-in-out;
25
25
  }
26
+
27
+ .navbar-brand .navbar-item svg {
28
+ max-height: none;
29
+ height: auto;
30
+ }
@@ -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
@@ -1,5 +1,13 @@
1
1
  module PinFlags
2
2
  module FeatureTagsHelper
3
+ def pin_flags_logo(width: 260, height: 85)
4
+ file_path = PinFlags::Engine.root.join("docs", "pin_flags_logo.svg")
5
+ svg = File.read(file_path)
6
+ svg = svg.sub(/width="[^"]*"/, %(width="#{width}"))
7
+ svg = svg.sub(/height="[^"]*"/, %(height="#{height}"))
8
+ svg.html_safe
9
+ end
10
+
3
11
  def display_feature_tag_table_turbo_frame_row_id(feature_tag)
4
12
  "feature_tags_table_row_#{dom_id(feature_tag)}"
5
13
  end
@@ -4,9 +4,7 @@
4
4
  x-data="{ mobileMenuOpen: false }">
5
5
  <div class="navbar-brand">
6
6
  <%= link_to pin_flags.root_path, class: "navbar-item" do %>
7
- <span class="is-size-2 is-size-4-mobile has-text-weight-bold has-text-white">
8
- β›³ Pin Flags
9
- </span>
7
+ <%= pin_flags_logo %>
10
8
  <% end %>
11
9
 
12
10
  <a role="button" class="navbar-burger" aria-label="menu"
@@ -3,9 +3,7 @@
3
3
  <nav class="navbar" role="navigation" aria-label="main navigation">
4
4
  <div class="navbar-brand">
5
5
  <%= link_to pin_flags.root_path, class: "navbar-item" do %>
6
- <span class="is-size-2 is-size-4-mobile has-text-weight-bold has-text-white">
7
- β›³ Pin Flags
8
- </span>
6
+ <%= pin_flags_logo %>
9
7
  <% end %>
10
8
  </div>
11
9
  </nav>
@@ -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.3"
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.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demetrious Wilson
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
- rubygems_version: 3.6.9
190
+ rubygems_version: 4.0.1
191
191
  specification_version: 4
192
192
  summary: "β›³PinFlags is a granular, polymorphic feature access system"
193
193
  test_files: []