rails_devtools 0.1.2 → 0.1.3

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: 5499068668ada69804d781ceb5da859034771872e1ce81180d3c7d0b2bf9456b
4
- data.tar.gz: 9523ff697e41ab1126d3df79c2801c3316708e52e3bf3d47292c94fd5019d451
3
+ metadata.gz: 24691777678ec164b13725b13a890700dc90d54bdaa2fb0897f290f5238393e6
4
+ data.tar.gz: 115aba79106047c29f6f1998060d921da5ffe5fae52b7d5df93473ba777e0097
5
5
  SHA512:
6
- metadata.gz: 1c729823e7136e34089123fc94933feb7b8f5ce2ea4d08cfa73650bb05f13c5b92746a94d0a4ef86710495e2df1f94bd896b050b553bafdd5516c7f667d36878
7
- data.tar.gz: 3f24b5558e62ff5baf5c90b8d1e86aa52e683637846368b15f8e07c4547788ba455414d4945fdd7e01a224379ddf3d934b0c00bc5ad969da241424ac5893f639
6
+ metadata.gz: d42a51ef32db7b7763e5ce4bbbc383152b68605c4b8b9b32a17cffd86524b79b4e4e0ae468f6eef1f422b6a684a0fbdd051809ee29f998fab90a1a526a363218
7
+ data.tar.gz: 4e29f5d94b41b0f42df81a3733830373c68a1e37c58a90cd712063a2113aba6f0e70144c87b9d243fc64ba3d20a3a2ce23a453c2f1142c74707411cbb6fa4976
@@ -13,7 +13,7 @@ module RailsDevtools
13
13
  html(data_theme: "nord") do
14
14
  head do
15
15
  title do
16
- content_for?(:title) ? strip_tags(yield(:title)) : "Maxime Souillat"
16
+ content_for?(:title) ? strip_tags(yield(:title)) : "Rails Devtools"
17
17
  end
18
18
 
19
19
  meta(name: "apple-mobile-web-app-title", content: "Maxime Souillat")
@@ -12,6 +12,7 @@ module RailsDevtools
12
12
  include Phlex::Rails::Helpers::ButtonTo
13
13
  include Phlex::Rails::Helpers::ImageTag
14
14
  include Phlex::Rails::Helpers::DOMID
15
+ include Phlex::Rails::Helpers::ContentFor
15
16
 
16
17
  if Rails.env.development?
17
18
  def before_template
@@ -3,12 +3,13 @@
3
3
  module RailsDevtools
4
4
  module Components
5
5
  class PageContent < Components::ApplicationComponent
6
- def view_template(&)
7
- turbo_frame_tag("page_content", &)
6
+ def view_template(&block)
7
+ turbo_frame_tag("page_content", &block)
8
8
  end
9
9
 
10
- def page_title(&)
11
- h1(class: "text-2xl font-bold", &)
10
+ def page_title(&block)
11
+ content_for(:title) { "Rails Devtools - #{block.call}" }
12
+ h1(class: "text-2xl font-bold", &block)
12
13
  end
13
14
 
14
15
  def search_form(form:, path:, method: :get)
@@ -19,8 +20,8 @@ module RailsDevtools
19
20
  )
20
21
  end
21
22
 
22
- def results(&)
23
- div(class: "mt-4", &)
23
+ def results(&block)
24
+ div(class: "mt-4", &block)
24
25
  end
25
26
  end
26
27
  end
@@ -34,6 +34,8 @@ module RailsDevtools
34
34
  end
35
35
 
36
36
  def indexes_list
37
+ return if @table.indexes.none?
38
+
37
39
  div(class: "mt-8") do
38
40
  h3(class: "text-lg font-bold") { "#{@table.table_name.capitalize} indexes" }
39
41
  div(class: "mt-2 flex flex-col gap-2 divide-y divide-base-200") do
@@ -52,10 +54,10 @@ module RailsDevtools
52
54
  end
53
55
 
54
56
  def index_columns_text(columns)
55
- columns_list = columns.join(", ")
56
- return columns_list if columns.size == 1
57
+ columns = Array(columns)
58
+ return columns.first if columns.one?
57
59
 
58
- "composite of #{columns_list}"
60
+ "composite of #{columns.join(", ")}"
59
61
  end
60
62
  end
61
63
  end
@@ -1,3 +1,3 @@
1
1
  module RailsDevtools
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_devtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Souillat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage