hot-glue 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  def login_as(user)
2
2
  visit '/users/sign_in'
3
- within("#new_account") do
3
+ within("#new_user") do
4
4
  fill_in 'Email', with: user.email
5
5
  fill_in 'Password', with: 'password'
6
6
  end
@@ -2,7 +2,7 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
2
2
  helper :hot_glue
3
3
  include HotGlue::ControllerHelper
4
4
 
5
- <% unless @auth_identifier == '' || @god %>before_action :authenticate_<%= @auth_identifier %>!<% end %>
5
+ <% unless @auth_identifier == '' || @god %>before_action :<%= auth_root %><% end %>
6
6
  <% if any_nested? %><% nest_chain = [] %> <% @nested_set.each { |arg|
7
7
 
8
8
  if auth_identifier == arg[:singular]
@@ -19,7 +19,7 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
19
19
  <% } %><% end %>
20
20
  before_action :load_<%= singular_name %>, only: [:show, :edit, :update, :destroy]
21
21
  after_action -> { flash.discard }, if: -> { request.format.symbol == :turbo_stream }
22
- <% if @nested_args.any? %>
22
+ <% if @nested_set.any? %>
23
23
  def <%= @nested_set[0][:singular] %><% if @god
24
24
  next_object = nil
25
25
  collect_objects = @nested_set.reverse.collect {|x|
@@ -36,9 +36,9 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
36
36
  root_object = @auth + "." + @nested_set[0][:plural]
37
37
  end
38
38
  end
39
- %><% if !@god && @nested_set[0][:singular] == @auth_identifier %>
40
- @<%= @nested_set[0][:singular] %> ||= <%= root_object %> <% else %>
41
- @<%= @nested_set[0][:singular] %> ||= <%= root_object %>.find(params[:<%= @nested_set[0][:singular] %>_id])<%= " if params.include?(:#{@nested_set[0][:singular]}_id)" if @nested_set[0][:optional] %> <% end %>
39
+ %>
40
+ <% if !@god && @nested_set[0][:singular] == @auth_identifier %>@<%= @nested_set[0][:singular] %> ||= <%= root_object %>
41
+ <% else %> @<%= @nested_set[0][:singular] %> ||= <%= root_object %>.find(params[:<%= @nested_set[0][:singular] %>_id])<%= " if params.include?(:#{@nested_set[0][:singular]}_id)" if @nested_set[0][:optional] %> <% end %>
42
42
  end
43
43
  <% end %><% if any_nested? %><% nest_chain = [@nested_set[0][:singular]]; this_scope = @nested_set[0][:plural]; %>
44
44
  <% for index in 0..(@nested_set.count - 1) do
@@ -47,11 +47,12 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
47
47
 
48
48
  this_scope = "#{nest_chain.last}.#{arg[:plural]}"
49
49
  nest_chain << arg %>
50
+ <% unless @nested_set[0][:singular] == arg[:singular] %>
50
51
  def <%= arg[:singular] %>
51
52
  @<%= arg[:singular] %> ||= (<%= this_scope %>.find(params[:<%= arg[:singular] %>_id])<%= " if params.include?(:#{last_arg[:singular]}_id)" if last_arg && @god && last_arg[:optional] %>)
52
- <% if @god && (last_arg[:optional] ) %>@<%= arg[:singular] %> ||= (<%= collect_objects[index-1] %>.find(params[:<%= arg[:singular] %>_id]) if params.include?(:<%= arg[:singular] %>_id) ) <% end %>
53
- end<% end %> <% end %> <% if !@self_auth %>
54
-
53
+ <% if @god && last_arg && (last_arg[:optional] ) %>@<%= arg[:singular] %> ||= (<%= collect_objects[index-1] %>.find(params[:<%= arg[:singular] %>_id]) if params.include?(:<%= arg[:singular] %>_id) ) <% end %>
54
+ end<% end %>
55
+ <% end %><% end %> <% if !@self_auth %>
55
56
  def load_<%= singular_name %>
56
57
  @<%= singular_name %> = (<%= object_scope.gsub("@",'') %>.find(params[:id])<%= " if params.include?(:#{@nested_set.last[:singular]}_id)" if @nested_set[0] && @nested_set[0][:optional] %>)<% if @nested_set[0] && @nested_set[0][:optional] %> || <%= class_name %>.find(params[:id])<% end %>
57
58
  end
@@ -73,8 +74,9 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
73
74
  end
74
75
 
75
76
  <% if create_action %> def new
76
- <% if ! @god %>
77
- @<%= singular_name %> = <%= class_name %>.new(<%= @object_owner_sym %>: <%= @object_owner_eval %>)
77
+ <% if @object_owner_sym %>
78
+ @<%= singular_name %> = <%= class_name %>.new(<% if eval("#{class_name}.reflect_on_association(:#{@object_owner_sym})").class == ActiveRecord::Reflection::BelongsToReflection %><%= @object_owner_sym %>: <%= @object_owner_eval %><% end %>)
79
+
78
80
  <% elsif @object_owner_optional && any_nested? %>
79
81
  @<%= singular_name %> = <%= class_name %>.new({}.merge(<%= @nested_set.last[:singular] %> ? {<%= @object_owner_sym %>: <%= @object_owner_eval %>} : {})) <% else %>
80
82
  @<%= singular_name %> = <%= class_name %>.new(<% if any_nested? %><%= @object_owner_sym %>: <%= @object_owner_eval %><% end %>)
@@ -85,8 +87,8 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
85
87
  end
86
88
 
87
89
  def create
88
- modified_params = modify_date_inputs_on_params(<%= singular_name %>_params.dup<% if ! @object_owner_sym.empty? %>.merge!(<% if @object_owner_optional && any_nested? %><%= @object_owner_name %> ? {<%= @object_owner_sym %>: <%= @object_owner_eval %>} : {} <% else %> <%= @object_owner_sym %>: <%= @object_owner_eval %><% end %>) <% end %>)
89
-
90
+ modified_params = modify_date_inputs_on_params(<%= singular_name %>_params.dup<% if @object_owner_sym && eval("#{class_name}.reflect_on_association(:#{@object_owner_sym})").class == ActiveRecord::Reflection::BelongsToReflection %>.merge!(<% if @object_owner_optional && any_nested? %><%= @object_owner_name %> ? {<%= @object_owner_sym %>: <%= @object_owner_eval %>} : {} <% else %> <%= @object_owner_sym %>: <%= @object_owner_eval %><% end %>) <% end %>)
91
+ <% if @hawk_keys.any? %> modified_params = hawk_params( {<%= hawk_to_ruby %>}, modified_params)<% end %>
90
92
 
91
93
  @<%=singular_name %> = <%= class_name %>.create(modified_params)
92
94
 
@@ -98,7 +100,7 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
98
100
  format.html { redirect_to <%= path_helper_plural %> }
99
101
  end
100
102
  else
101
- flash[:alert] = "Oops, your <%= singular_name %> could not be created."
103
+ flash[:alert] = "Oops, your <%= singular_name %> could not be created. #{@hawk_alarm}"
102
104
  respond_to do |format|
103
105
  format.turbo_stream
104
106
  format.html
@@ -120,10 +122,13 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
120
122
  end
121
123
 
122
124
  <% end %><% if @build_update_action %> def update
123
- <%= controller_magic_button_update_actions %> if @<%= singular_name %>.update(modify_date_inputs_on_params(<%= singular %>_params<%= @auth ? ', ' + @auth : '' %>)<%= controller_update_params_tap_away_magic_buttons %>)
125
+ modified_params = modify_date_inputs_on_params(<%= singular %>_params<%= @auth ? ', ' + @auth : '' %>)<%= controller_update_params_tap_away_magic_buttons %><% if @hawk_keys.any? %>
126
+ modified_params = hawk_params( {<%= hawk_to_ruby %>}, modified_params)<% end %>
127
+ <%= controller_magic_button_update_actions %> if @<%= singular_name %>.update(modified_params)
124
128
  flash[:notice] = (flash[:notice] || "") << "Saved #{@<%= singular %>.<%= display_class %>}"
129
+ flash[:alert] = @hawk_alarm if @hawk_alarm
125
130
  else
126
- flash[:alert] = (flash[:alert] || "") << "<%= singular_name.titlecase %> could not be saved."
131
+ flash[:alert] = (flash[:alert] || "") << "<%= singular_name.titlecase %> could not be saved. #{@hawk_alarm}"
127
132
 
128
133
  end
129
134
  <% if @display_list_after_update %> load_all_<%= plural %><% end %>
@@ -137,7 +142,7 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
137
142
  begin
138
143
  @<%=singular_name%>.destroy
139
144
  rescue StandardError => e
140
- flash[:alert] = "<%= singular_name.titlecase %> could not be deleted"
145
+ flash[:alert] = "<%= singular_name.titlecase %> could not be deleted."
141
146
  end
142
147
  load_all_<%= plural %>
143
148
  respond_to do |format|
@@ -147,11 +152,7 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
147
152
  end<% end %>
148
153
 
149
154
  def <%=singular_name%>_params
150
- params.require(:<%=singular_name%>).permit( <%= @columns + @magic_buttons.collect(&:to_sym) %> )
151
- end
152
-
153
- def default_colspan
154
- <%= @default_colspan %>
155
+ params.require(:<%= testing_name %>).permit( <%= (@columns - @show_only) + @magic_buttons.collect(&:to_sym) %> )
155
156
  end
156
157
 
157
158
  def namespace
@@ -1,5 +1,5 @@
1
1
  <\%= turbo_frame_tag "<%= singular %>-new" do %>
2
2
  <div>
3
- <\%= link_to "New <%= thing_label %>", <%= new_path_name %>, disable_with: "Loading...", class: "new-<%= singular %>-button btn btn-primary pull-right <%= 'btn-sm' if @nested_args.any? %> " %>
3
+ <\%= link_to "New <%= thing_label %>", <%= new_path_name %>, disable_with: "Loading...", class: "new-<%= singular %>-button btn btn-primary pull-right <%= 'btn-sm' if @nested_set.any? %> " %>
4
4
  </div>
5
5
  <\% end %>
@@ -15,7 +15,7 @@
15
15
  <%= @singular %>: <%= @singular %>,
16
16
  <%= downnest_object_name %>: <%= @singular %>.<%= downnest %>
17
17
  }
18
- .merge({nested_for: "<% if @nested_args.any? %>#{nested_for + "__" if defined?(nested_for)}<% end %><%= @singular %>-#{<%= @singular %>.id}"})
18
+ .merge({nested_for: "<% if @nested_set.any? %>#{nested_for + "__" if defined?(nested_for)}<% end %><%= @singular %>-#{<%= @singular %>.id}"})
19
19
  <%= @nested_set.collect{|arg| ".merge(defined?(#{arg[:singular]}) ? {#{arg[:singular]}: #{arg[:singular]}} : {} )"}.join("\n") %>
20
20
  \%>
21
21
  </div>
@@ -4,13 +4,13 @@ describe "interaction for <%= controller_class_name %>", type: :feature do
4
4
  include HotGlue::ControllerHelper
5
5
  <%= @existing_content %>
6
6
  <% unless @god %>let(:<%= @auth %>) {create(:<%= @auth.gsub('current_', '') %>)}<%end%>
7
- <%= (@columns - @show_only).map { |col|
7
+ <%= (@columns - @show_only).map { |col|
8
8
  type = eval("#{singular_class}.columns_hash['#{col}']").type
9
9
  case type
10
10
  when :integer
11
11
  if col.to_s.ends_with?("_id")
12
12
  assoc = "#{col.to_s.gsub('_id','')}"
13
- "let!(:#{assoc}1) {create(:#{assoc})}"
13
+ " let!(:#{assoc}1) {create(:#{assoc}" + (@hawk_keys["#{assoc}_id".to_sym] ? ", #{@auth.gsub('current_', '')}: #{@auth}": "") + ")}"
14
14
  end
15
15
  else
16
16
  end
@@ -46,10 +46,10 @@ describe "interaction for <%= controller_class_name %>", type: :feature do
46
46
  "#{col}: rand(100)"
47
47
  end
48
48
  end
49
- }.compact.join(", \n ")
49
+ }.compact.join(", ")
50
50
  %>let!(:<%= singular %>1) {create(:<%= singular %><%= object_parent_mapping_as_argument_for_specs %> <%= item1_addOns %> )}
51
51
  <%= objest_nest_factory_setup %> <% unless @god %>
52
- before(:each) do
52
+ before do
53
53
  login_as(<%= @auth %>)
54
54
  end <% end %>
55
55
 
@@ -78,61 +78,9 @@ describe "interaction for <%= controller_class_name %>", type: :feature do
78
78
  <% unless @no_create %> describe "new & create" do
79
79
  it "should create a new <%= singular.titlecase %>" do
80
80
  visit <%= path_helper_plural %>
81
- click_link "New <%= singular.titlecase %>"
82
- expect(page).to have_selector(:xpath, './/h3[contains(., "New <%= singular.titlecase %>")]')
83
-
84
- <%=
85
- (@columns - @show_only).map { |col|
86
- type = eval("#{singular_class}.columns_hash['#{col}']").type
87
- case type
88
- when :date
89
- " " + "new_#{col} = Date.current + (rand(100).days) \n" +
90
- ' ' + "find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
91
- when :time
92
- # " " + "new_#{col} = DateTime.current + (rand(100).days) \n" +
93
- # ' ' + "find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
94
-
95
- when :datetime
96
- " " + "new_#{col} = DateTime.current + (rand(100).days) \n" +
97
- ' ' + "find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
98
-
99
- when :integer
100
-
101
- if col.to_s.ends_with?("_id")
102
- assoc = col.to_s.gsub('_id','')
103
- " #{col}_selector = find(\"[name='#{singular}[#{col}]']\").click \n" +
104
- " #{col}_selector.first('option', text: #{assoc}1.name).select_option"
105
- else
106
- " new_#{col} = rand(10) \n" +
107
- " find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
108
-
109
- end
110
-
111
- when :enum
112
- " list_of_#{col.to_s} = #{singular_class}.defined_enums['#{col.to_s}'].keys \n" +
113
- " " + "new_#{col.to_s} = list_of_#{col.to_s}[rand(list_of_#{col.to_s}.length)].to_s \n" +
114
- ' find("select[name=\'' + singular + '[' + col.to_s + ']\'] option[value=\'#{new_' + col.to_s + '}\']").select_option'
115
-
116
- when :boolean
117
- " new_#{col} = rand(2).floor \n" +
118
- " find(\"[name='#{singular}[#{col}]'][value='\#{new_" + col.to_s + "}']\").choose"
119
- when :string
120
- if col.to_s.include?("email")
121
- " " + "new_#{col} = 'new_test-email@nowhere.com' \n" +
122
- " find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
123
-
124
- else
125
- " " + "new_#{col} = 'new_test-email@nowhere.com' \n" +
126
- " find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
127
- end
128
- when :text
129
- " " + "new_#{col} = FFaker::Lorem.paragraphs(1).join("") \n" +
130
- " find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
131
- end
132
-
133
- }.join("\n")
134
-
135
- %>
81
+ click_link "New <%= thing_label %>"
82
+ expect(page).to have_selector(:xpath, './/h3[contains(., "New <%= thing_label %>")]')
83
+ <%= test_capybara_block %>
136
84
  click_button "Save"
137
85
  expect(page).to have_content("Successfully created")
138
86
  <%=" " +
@@ -168,70 +116,7 @@ describe "interaction for <%= controller_class_name %>", type: :feature do
168
116
  find("a.edit-<%= singular %>-button[href='/<%= namespace_with_slash %><%= plural %>/#{<%= singular %>1.id}/edit']").click
169
117
 
170
118
  expect(page).to have_content("Editing #{<%= singular %>1.<%= @display_class %>.squish || "(no name)"}")
171
- <%=
172
- (@columns - @show_only).map { |col|
173
- type = eval("#{singular_class}.columns_hash['#{col}']").type
174
- limit = eval("#{singular_class}.columns_hash['#{col}']").limit
175
- sql_type = eval("#{singular_class}.columns_hash['#{col}']").sql_type
176
- case type
177
- when :datetime
178
- " new_#{col} = DateTime.current + 1.day \n" +
179
- " find(\"[name='#{singular}[#{col}]']\").fill_in(with: new_#{col.to_s})"
180
- when :integer
181
- if !col.to_s.ends_with?("_id")
182
- " new_#{col} = rand(10000).floor \n" +
183
- " find(\"[name='#{singular}[#{col}]']\").fill_in(with: new_#{col.to_s})"
184
- end
185
- when :text
186
- if sql_type == "text"
187
- " " + "new_#{col.to_s} = FFaker::Lorem.paragraphs(3).join \n" +
188
- ' find("textarea[name=\'' + singular + '[' + col.to_s + ']\']").fill_in(with: new_' + col.to_s + ')'
189
-
190
- else # unreachable?
191
- " " + "new_#{col.to_s} = FFaker::Name.name \n" +
192
- ' find("input[name=\'' + singular + '[' + col.to_s + ']\']").fill_in(with: new_' + col.to_s + ')'
193
- end
194
- when :string
195
-
196
- if col.to_s.include?("email")
197
- " " + "new_#{col} = 'new_test-email@nowhere.com' \n" +
198
- " find(\"[name='#{singular}[#{ col.to_s }]']\").fill_in(with: new_#{col.to_s})"
199
-
200
- elsif sql_type == "varchar"
201
- " " + "new_#{col.to_s} = FFaker::Name.name \n" +
202
- ' find("input[name=\'' + singular + '[' + col.to_s + ']\']").fill_in(with: new_' + col.to_s + ')'
203
- else
204
- " " + "new_#{col.to_s} = FFaker::Lorem.paragraphs(1).join \n" +
205
- ' find("input[name=\'' + singular + '[' + col.to_s + ']\']").fill_in(with: new_' + col.to_s + ')'
206
- end
207
- when :boolean
208
- " new_#{col} = rand(2).floor \n" +
209
- " find(\"[name='#{singular}[#{col}]'][value='\#{new_#{col}}']\").choose"
210
- when :float
211
- " new_#{col} = rand(1)*5000 \n" +
212
- " find(\"[name='#{singular}[#{col}]']\").fill_in(with: new_#{col.to_s })"
213
- when :date
214
- " new_#{col} = Date.current + rand(100).days \n" +
215
- " find(\"[name='#{singular}[#{col}]']\").fill_in(with: new_#{col.to_s })"
216
- when :time
217
- " new_#{col} = Time.current + rand(144).hours \n" +
218
- " find(\"[name='#{singular}[#{col}]']\").fill_in(with: new_#{col.to_s })"
219
- when :datetime
220
- " new_#{col} = DateTime.current + rand(1000).minutes \n" +
221
- " find(\"[name='#{singular}[#{col}]']\").fill_in(with: new_#{col.to_s })"
222
-
223
- when :enum
224
- " list_of_#{col.to_s} = #{singular_class}.defined_enums['#{col.to_s}'].keys \n" +
225
- " " + "new_#{col.to_s} = list_of_#{col.to_s}[rand(list_of_#{col.to_s}.length)].to_s \n" +
226
- ' find("select[name=\'' + singular + '[' + col.to_s + ']\'] option[value=\'#{new_' + col.to_s + '}\']").select_option'
227
-
228
- else
229
- " " + "new_#{col.to_s} = FFaker::Name.name \n" +
230
- ' find("input[name=\'' + singular + '[' + col.to_s + ']\']").fill_in(with: new_' + col.to_s + ')'
231
-
232
- end
233
- }.join("\n")
234
- %>
119
+ <%= test_capybara_block %>
235
120
  click_button "Save"
236
121
  within("turbo-frame#<%= singular %>__#{<%= singular %>1.id} ") do
237
122
  <%=
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.5.1'
3
+ CURRENT = '0.5.3'
4
4
  end
5
5
  end
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+ rm dummy/app/controllers/ghis_controller.rb
3
+ rm dummy/app/controllers/abcs_controller.rb
4
+ rm dummy/app/controllers/dfgs_controller.rb
5
+ rm dummy/app/controllers/cantelopes_controller.rb
6
+ rm dummy/app/controllers/jkls_controller.rb
7
+ rm dummy/app/controllers/users_controller.rb
8
+
9
+ rm -rf dummy/app/views/cantelopes/*
10
+ rm -rf dummy/app/views/jkls/*
11
+ rm -rf dummy/app/views/ghis/*
12
+ rm -rf dummy/app/views/abcs/*
13
+ rm -rf dummy/app/views/dfgs/*
14
+ rm -rf dummy/app/views/users/*
15
+
16
+ /bin/rm -rf dummy/spec/system/
17
+
18
+
19
+ # !("application_controller.rb"|"welcome_controller.rb")
20
+ #find dummy/app/views/ -type f ! -name "application.html.erb" ! -name "welcome/index.erb" -delete
data/script/test ADDED
@@ -0,0 +1,47 @@
1
+ #!/bin/bash
2
+
3
+ clean_generated_code() {
4
+ ./clean_generated_code
5
+ }
6
+
7
+ echo "Internal test suite for Hot Glue (install, basic commands)..."
8
+ # the internal specs test only Hot Glue's command line usage
9
+ rspec spec
10
+
11
+ script/clean_generated_code
12
+
13
+ echo "Integration test suite for Hot Glue..."
14
+ # note that the dummy/ is in the root of the repository
15
+ # these specs generate several controllers & specs and then run the generated
16
+ # specs to test the generated code
17
+
18
+ cd dummy
19
+
20
+ echo "Setting up database..."
21
+
22
+ bundle install
23
+ rake db:create db:reset db:test:prepare
24
+
25
+ echo "Generating all code for testing..."
26
+ rails generate hot_glue:scaffold Abc --gd
27
+
28
+ rails generate hot_glue:scaffold Ghi --gd
29
+
30
+ rails generate hot_glue:scaffold Dfg --auth=current_user
31
+
32
+ rails generate hot_glue:scaffold Fruits::Cantelope --gd
33
+
34
+ #rails generate hot_glue:scaffold User --no-create --self-auth
35
+ #rails generate hot_glue:scaffold Jkl --gd
36
+ #rails generate hot_glue:scaffold Pet --gd
37
+ #rails generate hot_glue:scaffold Appointment --hawk=pets --gd
38
+ #rails generate hot_glue:scaffold Humen --gd
39
+ #rails generate hot_glue:scaffold Family --gd
40
+
41
+
42
+ rspec spec || exit
43
+
44
+ cd ../
45
+
46
+ script/clean_generated_code
47
+
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.5.1
4
+ version: 0.5.3
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: 2022-03-12 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -59,21 +59,19 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - ".circleci/config.yml"
63
62
  - ".github/FUNDING.yml"
63
+ - ".github/workflows/test.yml"
64
64
  - ".gitignore"
65
+ - ".ruby-version"
65
66
  - ".travis.yml"
66
67
  - Gemfile
67
- - Gemfile.lock
68
68
  - LICENSE
69
69
  - README.md
70
70
  - README2.md
71
- - Rakefile
72
71
  - app/assets/config/manifest.js
73
72
  - app/helpers/hot_glue/controller_helper.rb
74
73
  - app/helpers/hot_glue_helper.rb
75
74
  - app/views/layouts/_flash_notices.erb
76
- - bin/rails
77
75
  - config/database.yml
78
76
  - config/hot_glue.yml
79
77
  - db/schema.rb
@@ -124,11 +122,15 @@ files:
124
122
  - lib/hot-glue.rb
125
123
  - lib/hotglue/engine.rb
126
124
  - lib/hotglue/version.rb
125
+ - script/clean_generated_code
126
+ - script/test
127
127
  homepage: https://heliosdev.shop/p/hot-glue?utm_source=rubygems.org&utm_campaign=rubygems_link
128
128
  licenses:
129
- - Commercial with free option
129
+ - Nonstandard
130
130
  metadata:
131
131
  source_code_uri: https://github.com/jasonfb/hot-glue
132
+ homepage: https://heliosdev.shop/hot-glue
133
+ funding: https://tekduds.com
132
134
  post_install_message: |
133
135
  ---------------------------------------------
134
136
  Welcome to Hot Glue - A Scaffold Building Companion for Hotwire + Turbo-Rails
@@ -148,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
150
  - !ruby/object:Gem::Version
149
151
  version: '0'
150
152
  requirements: []
151
- rubygems_version: 3.1.6
153
+ rubygems_version: 3.3.7
152
154
  signing_key:
153
155
  specification_version: 4
154
156
  summary: A gem to build Tubro Rails scaffolding.
data/.circleci/config.yml DELETED
@@ -1,71 +0,0 @@
1
- # Use the latest 2.1 version of CircleCI pipeline process engine.
2
- # See: https://circleci.com/docs/2.0/configuration-reference
3
- version: 2.1
4
-
5
- # Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
6
- # See: https://circleci.com/docs/2.0/orb-intro/
7
- orbs:
8
- ruby: circleci/ruby@1.4.0
9
-
10
- # Define a job to be invoked later in a workflow.
11
- # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
12
- jobs:
13
- build:
14
- docker:
15
- - image: cimg/ruby:2.7.5-browsers
16
- executor: ruby/default
17
- steps:
18
- - checkout
19
- - ruby/install-deps # use the ruby orb to install dependencies
20
-
21
- - run:
22
- name: Which bundler?
23
- command: bundle -v
24
- test: # our next job, called "test"
25
- parallelism: 1
26
- # here we set TWO docker images.
27
- docker:
28
-
29
- - image: cimg/ruby:2.7.5-browsers # this is our primary docker image, where step commands run.
30
- auth:
31
- username: mydockerhub-user
32
- password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
33
- - image: redis:6.2.6
34
- - image: circleci/postgres:9.5-alpine
35
- auth:
36
- username: mydockerhub-user
37
- password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
38
- environment: # add POSTGRES environment variables.
39
- POSTGRES_USER: circleci-demo-ruby
40
- POSTGRES_DB: hot-glue-test
41
- POSTGRES_PASSWORD: ""
42
- # environment variables specific to Ruby/Rails, applied to the primary container.
43
- environment:
44
- BUNDLE_JOBS: "3"
45
- BUNDLE_RETRY: "3"
46
- PGHOST: 127.0.0.1
47
- PGUSER: circleci-demo-ruby
48
- PGPASSWORD: ""
49
- RAILS_ENV: test
50
- # A series of steps to run, some are similar to those in "build".
51
- steps:
52
- - checkout
53
- - ruby/install-deps
54
- # Here we make sure that the secondary container boots
55
- # up before we run operations on the database.
56
- - run:
57
- name: Wait for DB
58
- command: dockerize -wait tcp://localhost:5432 -timeout 1m
59
- # Run rspec in parallel
60
- - run: bundle exec rspec --profile 10 --format RspecJunitFormatter --out /tmp/test-results/rspec/results.xml --format progress
61
-
62
- # We use workflows to orchestrate the jobs that we declared above.
63
- workflows:
64
- version: 2
65
- build_and_test: # The name of our workflow is "build_and_test"
66
- jobs: # The list of jobs we run as part of this workflow.
67
- - build # Run build first.
68
- - test: # Then run test,
69
- requires: # Test requires that build passes for it to run.
70
- - build # Finally, run the build job.
71
-