pin_flags 0.1.4 → 0.1.6

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: d0eb969ad24f960bbb344689250470be9ee8fbac7fc1ebe48153a642e8d165b7
4
+ data.tar.gz: b008a4d7ba86a8c86cae958502382e497dd9cc8d6aaea738c27ff7d771410fac
5
5
  SHA512:
6
- metadata.gz: e002aa9cacf50ccef62efc38e858210ee065a71959dd676f51d355d7b84837517c6579bf53b56c1ce785ae5e663860bc1b31a1ca5793a16f9f7892cdbda1b05c
7
- data.tar.gz: c84e28d570a5fde3ef381c353644e57d2be8e50921527f55525c5409b958b42e5605318ff9fa95dde019b7c1ec67defb50a63bd50b9d907836e7ae19f8ed7b08
6
+ metadata.gz: 7e49716f239259c2b6fdaa7bce65fc42e19b9eeeb1c65ef293f89359808e2474e4e4a637039dd70edf41068688f6fd81c74d7b095a94224a3de11b706d0bbef0
7
+ data.tar.gz: 71174abd758b75bdcdaa64c993b17ae3b638bfb21d1034589d31c5192d281e599a8a9298dfb4bb6ff6d427e4c1c7e31d51399c962b99c170f93c4ca1a9540dca
@@ -0,0 +1,20 @@
1
+ <svg width="520" height="170" viewBox="0 0 520 170" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Icon (scaled down to fit horizontal layout) -->
3
+ <g transform="translate(0, 0) scale(0.85)">
4
+ <!-- Binary/Code Bracket Meta -->
5
+ <path d="M50 40 L30 40 L30 160 L50 160" fill="none" stroke="#334155" stroke-width="12" stroke-linecap="round"/>
6
+ <path d="M150 40 L170 40 L170 160 L150 160" fill="none" stroke="#334155" stroke-width="12" stroke-linecap="round"/>
7
+ <!-- Flag formed by Code Lines -->
8
+ <g transform="translate(65, 60)">
9
+ <rect x="0" y="0" width="10" height="80" fill="#C01E2E"/>
10
+ <path d="M10 5 C10 5 30 -5 50 5 C70 15 85 5 85 5 V45 C85 45 70 55 50 45 C30 35 10 45 10 45 Z" fill="#C01E2E"/>
11
+ <!-- Map Pin dot in the flag -->
12
+ <circle cx="45" cy="25" r="8" fill="white"/>
13
+ </g>
14
+ </g>
15
+ <!-- Wordmark to the right of the icon -->
16
+ <text x="200" y="100" text-anchor="start" font-family="'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif" font-size="52" font-weight="800" letter-spacing="2">
17
+ <tspan fill="white" stroke="#C01E2E" stroke-width="2">Pin</tspan>
18
+ <tspan dx="2" fill="#C01E2E">Flags</tspan>
19
+ </text>
20
+ </svg>
@@ -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,7 +1,7 @@
1
1
  module PinFlags
2
2
  module FeatureTagsHelper
3
3
  def pin_flags_logo(width: 260, height: 85)
4
- file_path = PinFlags::Engine.root.join("docs", "pin_flags_logo.svg")
4
+ file_path = PinFlags::Engine.root.join("app", "assets", "images", "pin_flags", "pin_flags_logo.svg")
5
5
  svg = File.read(file_path)
6
6
  svg = svg.sub(/width="[^"]*"/, %(width="#{width}"))
7
7
  svg = svg.sub(/height="[^"]*"/, %(height="#{height}"))
@@ -6,8 +6,8 @@ module PinFlags
6
6
  source_root File.expand_path("../templates", __FILE__)
7
7
 
8
8
  def copy_migrations
9
- migration_template "create_feature_tag.rb", "db/migrate/create_feature_tag.rb"
10
- migration_template "create_feature_subscriptions.rb", "db/migrate/create_feature_subscriptions.rb"
9
+ migration_template "create_feature_tag.rb", "db/migrate/create_pin_flags_feature_tags.rb"
10
+ migration_template "create_feature_subscriptions.rb", "db/migrate/create_pin_flags_feature_subscriptions.rb"
11
11
  end
12
12
 
13
13
  def self.next_migration_number(dirname)
@@ -1,4 +1,4 @@
1
- class CreateFeatureSubscriptions < ActiveRecord::Migration[8.0]
1
+ class CreatePinFlagsFeatureSubscriptions < ActiveRecord::Migration[8.0]
2
2
  def up
3
3
  create_table :pin_flags_feature_subscriptions do |t|
4
4
  t.references :feature_tag, null: false, foreign_key: { to_table: :pin_flags_feature_tags }
@@ -1,4 +1,4 @@
1
- class CreateFeatureTag < ActiveRecord::Migration[8.0]
1
+ class CreatePinFlagsFeatureTags < ActiveRecord::Migration[8.0]
2
2
  def up
3
3
  create_table :pin_flags_feature_tags do |t|
4
4
  t.string :name, null: false
@@ -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.6"
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.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demetrious Wilson
@@ -112,6 +112,7 @@ files:
112
112
  - MIT-LICENSE
113
113
  - README.md
114
114
  - Rakefile
115
+ - app/assets/images/pin_flags/pin_flags_logo.svg
115
116
  - app/assets/javascripts/pin_flags/alpine.min.js
116
117
  - app/assets/stylesheets/pin_flags/application.css
117
118
  - app/assets/stylesheets/pin_flags/bulma.min.css