hot-glue 0.3.5 → 0.3.7
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 +1 -1
- data/lib/generators/hot_glue/install_generator.rb +79 -52
- data/lib/generators/hot_glue/markup_templates/erb.rb +1 -1
- data/lib/generators/hot_glue/scaffold_generator.rb +1 -1
- data/lib/generators/hot_glue/templates/erb/_show.erb +2 -1
- data/lib/hotglue/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aab4adde73436f151d09f4e21517d108adcfb47df5f6a0fd69153848fa695aeb
|
|
4
|
+
data.tar.gz: 8230d3d19dc1f0a4d731b0492f8ecf5d4a1dd17fb2a2ab9934c8c2884a67e000
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5649e791538ab4401ff362bcab08809742b3000b2c6d59254d597737153ccbd9832137366af053936fcfcbfdaf6c5fa51904f81a86b762657ba14f7c8b67f35a
|
|
7
|
+
data.tar.gz: 8670d81ec27f0173d472d1507009b981493a997e9c7eeb8afaeb9a7fb701110ef8f90b90e6f462156675032446b4d1f443410c8195a923536a8ceee84e31d524
|
data/Gemfile.lock
CHANGED
|
@@ -52,85 +52,112 @@ module HotGlue
|
|
|
52
52
|
copy_file "confirmable.js", "#{'spec/dummy/' if Rails.env.test?}app/javascript/controllers/confirmable.js"
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
-
if Rails.version.split(".")[0].to_i == 6
|
|
56
|
-
app_js_contents = File.read("app/javascript/packs/application.js")
|
|
57
|
-
if app_js_contents.include?("import Turbolinks from \"turbolinks\"")
|
|
58
|
-
app_js_contents.gsub!("import Turbolinks from \"turbolinks\"", "import { Turbo } from \"@hotwired/turbo-rails\"")
|
|
59
|
-
puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax [ import { Turbo } from \"@hotwired/turbo-rails\" ] "
|
|
60
|
-
end
|
|
61
55
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
begin
|
|
57
|
+
if Rails.version.split(".")[0].to_i == 6
|
|
58
|
+
app_js_contents = File.read("app/javascript/packs/application.js")
|
|
59
|
+
if app_js_contents.include?("import Turbolinks from \"turbolinks\"")
|
|
60
|
+
app_js_contents.gsub!("import Turbolinks from \"turbolinks\"", "import { Turbo } from \"@hotwired/turbo-rails\"")
|
|
61
|
+
puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax [ import { Turbo } from \"@hotwired/turbo-rails\" ] "
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
if app_js_contents.include?("Turbolinks.start()")
|
|
65
|
+
app_js_contents.gsub!("Turbolinks.start()", "Turbo.start()")
|
|
66
|
+
puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax[ Turbolinks.start() ] "
|
|
67
|
+
end
|
|
68
|
+
File.write("app/javascript/packs/application.js", app_js_contents)
|
|
65
69
|
end
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
rescue StandardError => e
|
|
71
|
+
puts "WARNING: error writing to app/javascript/packs/application.js --- #{e.message}"
|
|
68
72
|
end
|
|
69
73
|
|
|
70
74
|
|
|
71
|
-
rails_helper_contents = File.read("spec/rails_helper.rb")
|
|
72
|
-
if !rails_helper_contents.include?("Capybara.default_driver =")
|
|
73
|
-
rails_helper_contents << "\nCapybara.default_driver = :selenium_chrome_headless "
|
|
74
|
-
puts " HOTGLUE --> added to spec/rails_helper.rb: `Capybara.default_driver = :selenium_chrome_headless` "
|
|
75
|
-
end
|
|
76
75
|
|
|
77
|
-
|
|
78
|
-
rails_helper_contents.
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
begin
|
|
77
|
+
rails_helper_contents = File.read("spec/rails_helper.rb")
|
|
78
|
+
if !rails_helper_contents.include?("Capybara.default_driver =")
|
|
79
|
+
rails_helper_contents << "\nCapybara.default_driver = :selenium_chrome_headless "
|
|
80
|
+
puts " HOTGLUE --> added to spec/rails_helper.rb: `Capybara.default_driver = :selenium_chrome_headless` "
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if !rails_helper_contents.include?("include FactoryBot::Syntax::Methods")
|
|
84
|
+
rails_helper_contents.gsub!("RSpec.configure do |config|", "RSpec.configure do |config| \n
|
|
85
|
+
config.include FactoryBot::Syntax::Methods
|
|
86
|
+
")
|
|
87
|
+
puts " HOTGLUE --> added to spec/rails_helper.rb: `config.include FactoryBot::Syntax::Methods` "
|
|
88
|
+
end
|
|
83
89
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
if ! rails_helper_contents.include?("require 'support/capybara_login.rb'")
|
|
91
|
+
rails_helper_contents.gsub!("require 'rspec/rails'","require 'rspec/rails' \nrequire 'support/capybara_login.rb'")
|
|
92
|
+
puts " HOTGLUE --> added to spec/rails_helper.rb: `require 'support/capybara_login.rb'` "
|
|
93
|
+
end
|
|
94
|
+
File.write("spec/rails_helper.rb", rails_helper_contents)
|
|
95
|
+
|
|
96
|
+
rescue StandardError => e
|
|
97
|
+
puts "WARNING: error writing to spec/rails_helper --- #{e.message}"
|
|
87
98
|
end
|
|
88
|
-
File.write("spec/rails_helper.rb", rails_helper_contents)
|
|
89
99
|
|
|
90
100
|
|
|
91
|
-
|
|
101
|
+
begin
|
|
102
|
+
application_layout_contents = File.read("app/views/layouts/application.html.erb")
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<%= render partial: 'layouts/flash_notices' %>
|
|
96
|
-
")
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
if !application_layout_contents.include?("render partial: 'layouts/flash_notices'")
|
|
105
|
+
application_layout_contents.gsub!("<body>", "<body>\n
|
|
106
|
+
<%= render partial: 'layouts/flash_notices' %>
|
|
107
|
+
")
|
|
108
|
+
File.write("app/views/layouts/application.html.erb", application_layout_contents)
|
|
109
|
+
puts " HOTGLUE --> added to app/views/layouts/application.html.erb: `<%= render partial: 'layouts/flash_notices' %>` "
|
|
110
|
+
end
|
|
111
|
+
rescue StandardError => e
|
|
112
|
+
puts "WARNING: error writing to app/views/layouts/application.html.erb --- #{e.message}"
|
|
99
113
|
end
|
|
100
114
|
|
|
101
115
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
begin
|
|
117
|
+
if @layout == "hotglue"
|
|
118
|
+
theme_location = "themes/hotglue_scaffold_#{@theme}.scss"
|
|
119
|
+
theme_file = "hotglue_scaffold_#{@theme}.scss"
|
|
105
120
|
|
|
106
|
-
|
|
121
|
+
copy_file theme_location, "#{'spec/dummy/' if Rails.env.test?}app/assets/stylesheets/#{theme_file}"
|
|
107
122
|
|
|
108
|
-
|
|
123
|
+
application_scss = File.read("app/assets/stylesheets/application.scss")
|
|
109
124
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
if !application_scss.include?("@import '#{theme_file}';")
|
|
126
|
+
application_scss << ( "\n @import '#{theme_file}'; ")
|
|
127
|
+
File.write("app/assets/stylesheets/application.scss", application_scss)
|
|
128
|
+
puts " HOTGLUE --> added to app/assets/stylesheets/application.scss: @import '#{theme_file}' "
|
|
129
|
+
else
|
|
130
|
+
puts " HOTGLUE --> already found theme in app/assets/stylesheets/application.scss: @import '#{theme_file}' "
|
|
131
|
+
end
|
|
116
132
|
end
|
|
133
|
+
rescue StandardError => e
|
|
134
|
+
puts "WARNING: error writing to app/assets/stylesheets/application.scss --- #{e.message}"
|
|
117
135
|
end
|
|
118
136
|
|
|
119
137
|
|
|
120
138
|
|
|
121
|
-
|
|
139
|
+
begin
|
|
122
140
|
|
|
123
|
-
|
|
124
|
-
markup: @markup,
|
|
125
|
-
license_activation_key: license_activation_key,
|
|
126
|
-
license_email: license_email}.to_yaml
|
|
127
|
-
File.write("#{'spec/dummy/' if Rails.env.test?}config/hot_glue.yml", yaml)
|
|
141
|
+
if !File.exists?("config/hot_glue.yml")
|
|
128
142
|
|
|
143
|
+
yaml = {layout: @layout,
|
|
144
|
+
markup: @markup,
|
|
145
|
+
license_activation_key: license_activation_key,
|
|
146
|
+
license_email: license_email}.to_yaml
|
|
147
|
+
File.write("#{'spec/dummy/' if Rails.env.test?}config/hot_glue.yml", yaml)
|
|
148
|
+
|
|
149
|
+
end
|
|
150
|
+
rescue StandardError => e
|
|
151
|
+
puts "WARNING: error writing to config/hot_glue.yml --- #{e.message}"
|
|
129
152
|
end
|
|
130
153
|
|
|
131
154
|
|
|
132
|
-
|
|
133
|
-
|
|
155
|
+
begin
|
|
156
|
+
if !File.exists?("spec/support/capybara_login.rb")
|
|
157
|
+
copy_file "capybara_login.rb", "#{'spec/dummy/' if Rails.env.test?}spec/support/capybara_login.rb"
|
|
158
|
+
end
|
|
159
|
+
rescue StandardError => e
|
|
160
|
+
puts "WARNING: error writing to spec/support/capybara_login.rb --- #{e.message}"
|
|
134
161
|
end
|
|
135
162
|
end
|
|
136
163
|
end
|
|
@@ -261,7 +261,7 @@ module HotGlue
|
|
|
261
261
|
<% end %>
|
|
262
262
|
</div>
|
|
263
263
|
" when :enum
|
|
264
|
-
|
|
264
|
+
"<div class='#{col_identifer}' style='flex-basis: #{perc_width}%'>
|
|
265
265
|
<% if #{singular}.#{col}.nil? %>
|
|
266
266
|
<span class='alert-danger'>MISSING</span>
|
|
267
267
|
<% else %>
|
|
@@ -796,7 +796,7 @@ module HotGlue
|
|
|
796
796
|
def controller_magic_button_update_actions
|
|
797
797
|
@magic_buttons.collect{ |magic_button|
|
|
798
798
|
" @#{singular}.#{magic_button}! if #{singular}_params[:#{magic_button}]"
|
|
799
|
-
}.join("\n")
|
|
799
|
+
}.join("\n") + "\n"
|
|
800
800
|
end
|
|
801
801
|
|
|
802
802
|
def controller_update_params_tap_away_magic_buttons
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<% if @downnest_children.any? %>
|
|
4
4
|
<% each_downnest_width = @downnest_children.count == 1 ? 33 : (53/@downnest_children.count).floor %>
|
|
5
|
+
|
|
5
6
|
<% @downnest_children.each do |downnest| %>
|
|
6
7
|
<div class="<%= @col_identifier %> scaffold-downnest" style="flex-basis: <%= each_downnest_width %>%" >
|
|
7
8
|
<\%= render partial: "<%= namespace_with_trailing_dash %><%= downnest %>/list", locals: {
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
<% end %>
|
|
13
14
|
<% end %>
|
|
14
15
|
|
|
15
|
-
<div class="<%= @col_identifier %> scaffold-line-buttons" style="flex-basis:
|
|
16
|
+
<div class="<%= @col_identifier %> scaffold-line-buttons" style="flex-basis: <%= (100 - (column_width * @columns.count)).floor %>%;">
|
|
16
17
|
<% if destroy_action %>
|
|
17
18
|
<\%= form_with url: <%= path_helper_singular %>(<%= path_helper_args %>), html: {style: "display: inline-block;"}, method: :delete do |f| %>
|
|
18
19
|
<\%= f.submit "Delete".html_safe, data: <%= delete_confirmation_syntax %>, class: "delete-<%= singular %>-button btn btn-primary btn-sm" %>
|
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.3.
|
|
4
|
+
version: 0.3.7
|
|
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: 2021-12-
|
|
11
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -174,7 +174,7 @@ post_install_message: |
|
|
|
174
174
|
---------------------------------------------
|
|
175
175
|
Welcome to Hot Glue - A Scaffold Building Companion for Hotwire + Turbo-Rails
|
|
176
176
|
|
|
177
|
-
To purchase a license, please visit https://heliosdev.shop/hot-glue-
|
|
177
|
+
To purchase a license, please visit https://heliosdev.shop/hot-glue-license
|
|
178
178
|
---------------------------------------------
|
|
179
179
|
rdoc_options: []
|
|
180
180
|
require_paths:
|