inertia_rails 3.7.0 → 3.7.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: 0f5f574a84809fccf65c7db0f58d34cb622b2ea4d403d05519736d2c44865f69
4
- data.tar.gz: f62406133f1fa0698a8d2d24418a98f75e01d0400de356e879b86bbb4f657317
3
+ metadata.gz: 23cbc78f6ae041fed8c26c46f5da887291f40d96bb755386ad888fdfe545343c
4
+ data.tar.gz: 26839f99bcdc7bc96cf6a82d5aa4730688c6c019089b82041020b4e0896b7549
5
5
  SHA512:
6
- metadata.gz: 691824db56620d1812c14db827f9dbffb2e6da89ba4c46f688ef8aa177afa8dc8db1e08a329559fc07e395d22adef18e30ead862e422a4a32001999767b3429f
7
- data.tar.gz: e2331144a98cafd06a09e6019477265915638d328ac006868e3ea2922f513330af5241e28702d4aeb0b52a4e4cb077a77788954c924fcdcccde86bd18198f52d
6
+ metadata.gz: 134e4664360f7a72f6d38e47153c49348b38eae52b765f0c9da5b7b62e4f48d1d9ed9986bfac6d729739a3954c5860f4348798ac6caca6256e692a13ce74d798
7
+ data.tar.gz: fafd03acd45c4be9c9cf01159fe2a54e0bdf174a4fb02fbd80d9cfc93b026b1693bbf68a0ad53c15db4894514655dab70408c8551422c16c43305ade43984058
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.7.1] - 2025-04-01
8
+
9
+ * Docs updates
10
+ * Fix for namespaced static routes (@skyrukov)
11
+ * Fix for detecting tailwindcss in templates (@skyrukov)
12
+
7
13
  ## [3.7.0] - 2025-03-17
8
14
 
9
15
  * Docs updates
@@ -18,7 +18,7 @@ export default function InertiaExample({ name }) {
18
18
  <h1 className={cs.h1}>Hello {name}!</h1>
19
19
 
20
20
  <div>
21
- <a href="https://inertia-rails.netlify.app" target="_blank">
21
+ <a href="https://inertia-rails.dev" target="_blank">
22
22
  <img className={cs.logo} src={inertiaSvg} alt="Inertia logo" />
23
23
  </a>
24
24
  <a href="https://vite-ruby.netlify.app" target="_blank">
@@ -4,13 +4,13 @@ import { createRoot } from 'react-dom/client'
4
4
 
5
5
  createInertiaApp({
6
6
  // Set default page title
7
- // see https://inertia-rails.netlify.app/guide/title-and-meta
7
+ // see https://inertia-rails.dev/guide/title-and-meta
8
8
  //
9
9
  // title: title => title ? `${title} - App` : 'App',
10
10
 
11
11
  // Disable progress bar
12
12
  //
13
- // see https://inertia-rails.netlify.app/guide/progress-indicators
13
+ // see https://inertia-rails.dev/guide/progress-indicators
14
14
  // progress: false,
15
15
 
16
16
  resolve: (name) => {
@@ -24,7 +24,7 @@ createInertiaApp({
24
24
 
25
25
  // To use a default layout, import the Layout component
26
26
  // and use the following lines.
27
- // see https://inertia-rails.netlify.app/guide/pages#default-layouts
27
+ // see https://inertia-rails.dev/guide/pages#default-layouts
28
28
  //
29
29
  // page.default.layout ||= (page) => createElement(Layout, null, page)
30
30
 
@@ -3,13 +3,13 @@ import { createApp, h } from 'vue'
3
3
 
4
4
  createInertiaApp({
5
5
  // Set default page title
6
- // see https://inertia-rails.netlify.app/guide/title-and-meta
6
+ // see https://inertia-rails.dev/guide/title-and-meta
7
7
  //
8
8
  // title: title => title ? `${title} - App` : 'App',
9
9
 
10
10
  // Disable progress bar
11
11
  //
12
- // see https://inertia-rails.netlify.app/guide/progress-indicators
12
+ // see https://inertia-rails.dev/guide/progress-indicators
13
13
  // progress: false,
14
14
 
15
15
  resolve: (name) => {
@@ -20,7 +20,7 @@ createInertiaApp({
20
20
 
21
21
  // To use a default layout, import the Layout component
22
22
  // and use the following lines.
23
- // see https://inertia-rails.netlify.app/guide/pages#default-layouts
23
+ // see https://inertia-rails.dev/guide/pages#default-layouts
24
24
  //
25
25
  // const page = pages[`../pages/${name}.vue`]
26
26
  // page.default.layout = page.default.layout || Layout
@@ -4,7 +4,9 @@ module InertiaRails
4
4
  module Generators
5
5
  module Helper
6
6
  class << self
7
- def guess_the_default_framework(package_json_path = Rails.root.join('package.json'))
7
+ DEFAULT_PACKAGE_PATH = Rails.root.join('package.json')
8
+
9
+ def guess_the_default_framework(package_json_path = DEFAULT_PACKAGE_PATH)
8
10
  package_json = JSON.parse(package_json_path.read)
9
11
  dependencies = package_json['dependencies'] || {}
10
12
 
@@ -25,8 +27,8 @@ module InertiaRails
25
27
  Rails.root.join('tsconfig.json').exist?
26
28
  end
27
29
 
28
- def guess_inertia_template
29
- if Rails.root.join('tailwind.config.js').exist? || Rails.root.join('tailwind.config.ts').exist?
30
+ def guess_inertia_template(package_json_path = DEFAULT_PACKAGE_PATH)
31
+ if package_json_path.read.include?('"tailwindcss"')
30
32
  'inertia_tw_templates'
31
33
  else
32
34
  'inertia_templates'
@@ -1,3 +1,3 @@
1
1
  module InertiaRails
2
- VERSION = "3.7.0"
2
+ VERSION = "3.7.1"
3
3
  end
@@ -3,9 +3,7 @@ module InertiaRails
3
3
  def inertia(*args, **options)
4
4
  path = args.any? ? args.first : options
5
5
  route, component = extract_route_and_component(path)
6
- scope module: nil do
7
- get(route, to: 'inertia_rails/static#static', defaults: { component: component }, **options)
8
- end
6
+ get(route, to: StaticController.action(:static), defaults: { component: component }, **options)
9
7
  end
10
8
 
11
9
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Knoles
@@ -9,7 +9,7 @@ authors:
9
9
  - Eugene Granovsky
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-03-18 00:00:00.000000000 Z
12
+ date: 2025-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties