migflow 0.2.0 → 0.2.1

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: 5d55af79f429534cba3daaff17a931b4ab66da0d78e0d183c96beb1101a70c91
4
- data.tar.gz: cf93ff82fddc5c3e14d969fc0b25a8aea21415ec601d841f8406661dadb677b6
3
+ metadata.gz: ef140c671300acdb5cdb1d2bfccf3e1aded63e454809b04213926baa9c64696f
4
+ data.tar.gz: 2f9ddfa00d4082293559c0d461f09d98eded02b328792c89e1928da8c64994f1
5
5
  SHA512:
6
- metadata.gz: ac99ca3d89000e918cadeb4964abf7398ec5b80f4776b6ffac93e53f35eb4407d3964a3ca057028d3bafa14f7e6ab07406a36c09222c1ac996ada95f56c460c3
7
- data.tar.gz: ba27f668b0d91263c48a4050bb42a2e2bd796f4e099c76beb59160edb62a039b8f75bf32e4d11ab7756664c5eefa80e3c06d3df582f19a7b72e0b7107d5b6235
6
+ metadata.gz: d47dea0707204cadc4ab7025622dec0d54a7dcf3621432988c367202f2a010d41fb0ed0d64f3b38a41d93a26c8bb252d31d6edef2aad53a3636c733062b2bec9
7
+ data.tar.gz: f1e7cdea8d76f3a65a03de462fcd4188fa888ab8d00ef5590b0b48d4bca8c9bbc045a8914c6df31739bdeeb1c1fa387d5668989c85b80fe63d61cde32f5f51a8
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2026-04-29
11
+
12
+ ### Fixed
13
+ - Dashboard assets (JS/CSS) failed to load in API-only Rails apps (`config.api_only = true`) because `stylesheet_link_tag` and `javascript_include_tag` fall back to dead paths when there is no asset pipeline. Assets are now served by a dedicated `StaticController` via engine-relative routes, so the dashboard loads correctly in both API-only and full-stack apps.
14
+
10
15
  ## [0.2.0] - 2026-04-22
11
16
 
12
17
  ### Fixed
data/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  Migflow is a Rails engine that mounts at `/migflow` and gives your team a visual timeline, schema diffs, and audit warnings — so you can understand migration impact before it reaches production.
6
6
 
7
+ [![Gem Version](https://img.shields.io/gem/v/migflow)](https://rubygems.org/gems/migflow)
7
8
  [![CI](https://img.shields.io/github/actions/workflow/status/jv4lentim/migflow/ci.yml?branch=main&label=CI&style=flat)](https://github.com/jv4lentim/migflow/actions/workflows/ci.yml)
8
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE.txt)
9
10
  [![Ruby](https://img.shields.io/badge/Ruby-%3E%3D%203.2-red)](https://www.ruby-lang.org/)
@@ -41,10 +42,10 @@ Tested in CI against every combination below:
41
42
 
42
43
  ## Installation
43
44
 
44
- Add Migflow to your `Gemfile` (Git source until the first RubyGems release):
45
+ Add Migflow to your `Gemfile`:
45
46
 
46
47
  ```ruby
47
- gem "migflow", git: "https://github.com/jv4lentim/migflow"
48
+ gem "migflow"
48
49
  ```
49
50
 
50
51
  ```bash
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Migflow
4
+ class StaticController < ActionController::Base
5
+ layout false
6
+
7
+ def app_js
8
+ send_file Migflow::Engine.root.join("app/assets/migflow/app.js"),
9
+ type: "application/javascript",
10
+ disposition: "inline"
11
+ end
12
+
13
+ def app_css
14
+ send_file Migflow::Engine.root.join("app/assets/migflow/app.css"),
15
+ type: "text/css",
16
+ disposition: "inline"
17
+ end
18
+ end
19
+ end
@@ -4,13 +4,13 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Migflow</title>
7
- <%= stylesheet_link_tag "migflow/app" %>
7
+ <link rel="stylesheet" href="<%= migflow.root_path %>assets/migflow/app.css" />
8
8
  </head>
9
9
  <body>
10
10
  <div
11
11
  id="schema-trail-root"
12
12
  data-api-base="<%= migflow.root_path %>api"
13
13
  ></div>
14
- <%= javascript_include_tag "migflow/app", defer: true %>
14
+ <script src="<%= migflow.root_path %>assets/migflow/app.js" defer></script>
15
15
  </body>
16
16
  </html>
data/config/routes.rb CHANGED
@@ -3,6 +3,9 @@
3
3
  Migflow::Engine.routes.draw do
4
4
  root to: "application#index"
5
5
 
6
+ get "assets/migflow/app.js", to: "static#app_js"
7
+ get "assets/migflow/app.css", to: "static#app_css"
8
+
6
9
  namespace :api do
7
10
  resources :migrations, only: %i[index show]
8
11
  get "diff", to: "diff#show"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Migflow
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joao Victor Valentim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-23 00:00:00.000000000 Z
11
+ date: 2026-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -55,6 +55,7 @@ files:
55
55
  - app/controllers/migflow/api/diff_controller.rb
56
56
  - app/controllers/migflow/api/migrations_controller.rb
57
57
  - app/controllers/migflow/application_controller.rb
58
+ - app/controllers/migflow/static_controller.rb
58
59
  - app/views/migflow/application/index.html.erb
59
60
  - config/routes.rb
60
61
  - docs/architecture.md