rails_devtools 0.1.1 → 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 +4 -4
- data/README.md +1 -1
- data/app/views/rails_devtools/application_layout.rb +1 -1
- data/app/views/rails_devtools/components/application_component.rb +1 -0
- data/app/views/rails_devtools/components/page_content.rb +7 -6
- data/app/views/rails_devtools/database_tables/table_card.rb +5 -3
- data/app/views/rails_devtools/routes/route_details/controller_card.rb +8 -4
- data/lib/rails_devtools/version.rb +1 -1
- metadata +8 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24691777678ec164b13725b13a890700dc90d54bdaa2fb0897f290f5238393e6
|
4
|
+
data.tar.gz: 115aba79106047c29f6f1998060d921da5ffe5fae52b7d5df93473ba777e0097
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42a51ef32db7b7763e5ce4bbbc383152b68605c4b8b9b32a17cffd86524b79b4e4e0ae468f6eef1f422b6a684a0fbdd051809ee29f998fab90a1a526a363218
|
7
|
+
data.tar.gz: 4e29f5d94b41b0f42df81a3733830373c68a1e37c58a90cd712063a2113aba6f0e70144c87b9d243fc64ba3d20a3a2ce23a453c2f1142c74707411cbb6fa4976
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ This gem is meant to be only used in development, and cannot work at all in prod
|
|
15
15
|
|
16
16
|
- Add the gem to your Gemfile
|
17
17
|
```ruby
|
18
|
-
gem '
|
18
|
+
gem 'rails_devtools, group: :development'
|
19
19
|
````
|
20
20
|
|
21
21
|
- Mount the engine in your routes
|
@@ -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)) : "
|
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")
|
@@ -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
|
-
|
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
|
-
|
56
|
-
return
|
57
|
+
columns = Array(columns)
|
58
|
+
return columns.first if columns.one?
|
57
59
|
|
58
|
-
"composite of #{
|
60
|
+
"composite of #{columns.join(", ")}"
|
59
61
|
end
|
60
62
|
end
|
61
63
|
end
|
@@ -19,10 +19,7 @@ module RailsDevtools
|
|
19
19
|
def view_template
|
20
20
|
div(class: card_class) do
|
21
21
|
div(class: "card-body") do
|
22
|
-
div(class:
|
23
|
-
"text-base flex justify-between gap-4 items-center",
|
24
|
-
error? && "text-error"
|
25
|
-
]) do
|
22
|
+
div(class: text_class) do
|
26
23
|
div(class: "flex items-center ") do
|
27
24
|
if error?
|
28
25
|
span(class: "mr-1") do
|
@@ -53,6 +50,13 @@ module RailsDevtools
|
|
53
50
|
|
54
51
|
private
|
55
52
|
|
53
|
+
def text_class
|
54
|
+
[
|
55
|
+
"text-base flex justify-between gap-4 items-center",
|
56
|
+
error? && "text-error"
|
57
|
+
].compact.join(" ")
|
58
|
+
end
|
59
|
+
|
56
60
|
def card_class
|
57
61
|
[
|
58
62
|
"card card-compact bg-white text-sm w-full shadow-sm mb-4",
|
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.
|
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-
|
11
|
+
date: 2025-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastimage
|
@@ -30,46 +30,26 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.3.1
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: phlex
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.11'
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 1.11.0
|
43
|
-
type: :runtime
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '1.11'
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 1.11.0
|
53
33
|
- !ruby/object:Gem::Dependency
|
54
34
|
name: phlex-rails
|
55
35
|
requirement: !ruby/object:Gem::Requirement
|
56
36
|
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '1.1'
|
60
37
|
- - ">="
|
61
38
|
- !ruby/object:Gem::Version
|
62
39
|
version: 1.1.2
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '3'
|
63
43
|
type: :runtime
|
64
44
|
prerelease: false
|
65
45
|
version_requirements: !ruby/object:Gem::Requirement
|
66
46
|
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '1.1'
|
70
47
|
- - ">="
|
71
48
|
- !ruby/object:Gem::Version
|
72
49
|
version: 1.1.2
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '3'
|
73
53
|
- !ruby/object:Gem::Dependency
|
74
54
|
name: rails
|
75
55
|
requirement: !ruby/object:Gem::Requirement
|