hot-glue 0.7.4 → 0.7.5
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/Gemfile.lock +10 -8
- data/README.md +6 -0
- data/lib/generators/hot_glue/scaffold_generator.rb +10 -8
- data/lib/generators/hot_glue/templates/controller.rb.erb +0 -1
- data/lib/hotglue/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ac74e056098b9847487adc764e7bb03b0024c94bdbdf151eb24eb688cc53309
|
|
4
|
+
data.tar.gz: a23e9e6c569539b30542b97446bea589317cd1118bd87bf7c4330fff3a08603d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eae357a387a886f4f24156f78f666a56f81a829d1aab3dd3e128698cbf59ede7136bf9d6c0c8e286b9840205860133ea6d17085ff7e340aea4a3b9be8bcacae1
|
|
7
|
+
data.tar.gz: d5d23aaac0178a602cbc0f1893819aba6b12d57270f218389742a54bdfdea5a59c6bd800b1a5e7b05cedb75d452bd6a8da170a6cc3a57fd6c2caf9edcca4c2e1
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
hot-glue (0.7.
|
|
4
|
+
hot-glue (0.7.5)
|
|
5
5
|
ffaker (~> 2.16)
|
|
6
6
|
rails (> 5.1)
|
|
7
7
|
|
|
@@ -75,7 +75,7 @@ GEM
|
|
|
75
75
|
tzinfo (~> 2.0)
|
|
76
76
|
addressable (2.8.1)
|
|
77
77
|
public_suffix (>= 2.0.2, < 6.0)
|
|
78
|
-
base64 (0.
|
|
78
|
+
base64 (0.3.0)
|
|
79
79
|
bcrypt (3.1.18)
|
|
80
80
|
builder (3.2.4)
|
|
81
81
|
byebug (11.1.3)
|
|
@@ -90,7 +90,7 @@ GEM
|
|
|
90
90
|
xpath (~> 3.2)
|
|
91
91
|
concurrent-ruby (1.1.10)
|
|
92
92
|
crass (1.0.6)
|
|
93
|
-
date (3.
|
|
93
|
+
date (3.5.1)
|
|
94
94
|
devise (4.8.1)
|
|
95
95
|
bcrypt (~> 3.0)
|
|
96
96
|
orm_adapter (~> 0.1)
|
|
@@ -113,21 +113,23 @@ GEM
|
|
|
113
113
|
importmap-rails (1.1.5)
|
|
114
114
|
actionpack (>= 6.0.0)
|
|
115
115
|
railties (>= 6.0.0)
|
|
116
|
+
logger (1.7.0)
|
|
116
117
|
loofah (2.19.0)
|
|
117
118
|
crass (~> 1.0.2)
|
|
118
119
|
nokogiri (>= 1.5.9)
|
|
119
|
-
mail (2.
|
|
120
|
+
mail (2.9.0)
|
|
121
|
+
logger
|
|
120
122
|
mini_mime (>= 0.1.1)
|
|
121
123
|
net-imap
|
|
122
124
|
net-pop
|
|
123
125
|
net-smtp
|
|
124
|
-
marcel (1.0
|
|
126
|
+
marcel (1.1.0)
|
|
125
127
|
matrix (0.4.2)
|
|
126
128
|
method_source (1.0.0)
|
|
127
129
|
mini_mime (1.1.2)
|
|
128
130
|
mini_portile2 (2.8.4)
|
|
129
131
|
minitest (5.16.3)
|
|
130
|
-
net-imap (0.
|
|
132
|
+
net-imap (0.6.2)
|
|
131
133
|
date
|
|
132
134
|
net-protocol
|
|
133
135
|
net-pop (0.1.2)
|
|
@@ -223,7 +225,7 @@ GEM
|
|
|
223
225
|
stimulus-rails (1.1.1)
|
|
224
226
|
railties (>= 6.0.0)
|
|
225
227
|
thor (1.2.1)
|
|
226
|
-
timeout (0.
|
|
228
|
+
timeout (0.6.0)
|
|
227
229
|
turbo-rails (1.3.2)
|
|
228
230
|
actionpack (>= 6.0.0)
|
|
229
231
|
activejob (>= 6.0.0)
|
|
@@ -233,7 +235,7 @@ GEM
|
|
|
233
235
|
warden (1.2.9)
|
|
234
236
|
rack (>= 2.0.9)
|
|
235
237
|
websocket (1.2.9)
|
|
236
|
-
websocket-driver (0.
|
|
238
|
+
websocket-driver (0.8.0)
|
|
237
239
|
base64
|
|
238
240
|
websocket-extensions (>= 0.1.0)
|
|
239
241
|
websocket-extensions (0.1.5)
|
data/README.md
CHANGED
|
@@ -2478,6 +2478,12 @@ These automatic pickups for partials are detected at build time. This means that
|
|
|
2478
2478
|
|
|
2479
2479
|
# VERSION HISTORY
|
|
2480
2480
|
|
|
2481
|
+
#### 2026-01-11 - v0.7.5
|
|
2482
|
+
This is mostly a maintenance release to address these two issues related to the hawk:
|
|
2483
|
+
- removes the hawk in the create action because we are alrady doing it in the creation_syntax
|
|
2484
|
+
- fixes variable mutation problem affecting when the singular hawk contains the name of the object itself, was duplicitiously adding @ to local variables, now fixed for to produce correct instance var for the controller code
|
|
2485
|
+
- when using the hawk, don't add @ in your syntax; a local variable the same name of the thing being built will automatically get @ appended to the front in controller code
|
|
2486
|
+
|
|
2481
2487
|
|
|
2482
2488
|
#### 2025-12-28 - v0.7.4
|
|
2483
2489
|
• `--list-back-link-to-parent` has been renamed `--back-link-to-parent`
|
|
@@ -1162,7 +1162,7 @@ class HotGlue::ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
|
|
|
1162
1162
|
|
|
1163
1163
|
def creation_syntax
|
|
1164
1164
|
if @factory_creation.nil? && ! @alt_lookups.any?
|
|
1165
|
-
(
|
|
1165
|
+
(@hawk_keys.any? ? "modified_params = hawk_params({#{ hawk_to_ruby(in_controller: true) }}, modified_params)\n " : "") + "@#{singular } = #{ class_name }.new(modified_params)"
|
|
1166
1166
|
elsif @factory_creation.nil? && @alt_lookups.any?
|
|
1167
1167
|
|
|
1168
1168
|
prelookup_syntax = @alt_lookups.collect{|lookup, data|
|
|
@@ -2004,19 +2004,21 @@ class HotGlue::ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
|
|
|
2004
2004
|
[name, file_format].compact.join(".")
|
|
2005
2005
|
end
|
|
2006
2006
|
|
|
2007
|
-
def hawk_to_ruby(in_controller: false)
|
|
2008
|
-
|
|
2007
|
+
def hawk_to_ruby(in_controller: false)
|
|
2008
|
+
# false for views; true for controller
|
|
2009
2009
|
|
|
2010
2010
|
res = @hawk_keys.collect { |k, v|
|
|
2011
|
-
bind_to_array = v[:bind_to]
|
|
2012
|
-
|
|
2011
|
+
bind_to_array = v[:bind_to].dup
|
|
2013
2012
|
bind_to = bind_to_array.collect{|bt|
|
|
2014
|
-
|
|
2015
|
-
|
|
2013
|
+
if in_controller
|
|
2014
|
+
bt.gsub(singular, "@#{singular}")
|
|
2015
|
+
else
|
|
2016
|
+
bt
|
|
2017
|
+
end
|
|
2016
2018
|
}
|
|
2017
2019
|
|
|
2018
2020
|
"#{k.to_s}: [#{bind_to.join(".")}]"
|
|
2019
|
-
}.join(", ")
|
|
2021
|
+
}.compact.join(", ")
|
|
2020
2022
|
res
|
|
2021
2023
|
end
|
|
2022
2024
|
|
|
@@ -123,7 +123,6 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
|
|
|
123
123
|
<%= controller_attachment_orig_filename_pickup_syntax %>
|
|
124
124
|
<%= creation_syntax %>
|
|
125
125
|
<%= @code_after_new ? @code_after_new.gsub(";","\n") + "\n" : "" %>
|
|
126
|
-
<% if @hawk_keys.any? %> modified_params = hawk_params({<%= hawk_to_ruby(in_controller: true) %>}, modified_params)<% end %>
|
|
127
126
|
|
|
128
127
|
<% if @pundit %><% @related_sets.each do |key, related_set| %>
|
|
129
128
|
check_<%= related_set[:association_ids_method].to_s %>_permissions(modified_params, :create)<% end %><% end %>
|
data/lib/hotglue/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hot-glue
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Fleetwood-Boldt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|