hot-glue 0.2.6 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -2
  3. data/Gemfile.lock +3 -23
  4. data/LICENCE +11 -4
  5. data/README.md +0 -642
  6. data/app/helpers/hot_glue/controller_helper.rb +2 -1
  7. data/lib/generators/hot_glue/install_generator.rb +121 -33
  8. data/lib/generators/hot_glue/markup_templates/erb.rb +53 -27
  9. data/lib/generators/hot_glue/markup_templates/haml.rb +5 -3
  10. data/lib/generators/hot_glue/scaffold_generator.rb +224 -58
  11. data/lib/generators/hot_glue/templates/controller.rb.erb +39 -32
  12. data/lib/generators/hot_glue/templates/erb/_form.erb +1 -1
  13. data/lib/generators/hot_glue/templates/erb/_line.erb +3 -2
  14. data/lib/generators/hot_glue/templates/erb/_list.erb +24 -8
  15. data/lib/generators/hot_glue/templates/erb/_show.erb +27 -4
  16. data/lib/generators/hot_glue/templates/erb/create.turbo_stream.erb +4 -4
  17. data/lib/generators/hot_glue/templates/erb/destroy.turbo_stream.erb +2 -2
  18. data/lib/generators/hot_glue/templates/erb/edit.erb +2 -5
  19. data/lib/generators/hot_glue/templates/erb/index.erb +11 -9
  20. data/lib/generators/hot_glue/templates/erb/update.turbo_stream.erb +5 -2
  21. data/lib/generators/hot_glue/templates/haml/_line.haml +1 -1
  22. data/lib/generators/hot_glue/templates/haml/_list.haml +6 -2
  23. data/lib/generators/hot_glue/templates/haml/create.turbo_stream.haml +3 -3
  24. data/lib/generators/hot_glue/templates/haml/destroy.turbo_stream.haml +1 -1
  25. data/lib/generators/hot_glue/templates/haml/edit.haml +0 -2
  26. data/lib/generators/hot_glue/templates/haml/index.haml +2 -3
  27. data/lib/generators/hot_glue/templates/system_spec.rb.erb +19 -8
  28. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_dark_knight.scss +158 -0
  29. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_like_bootstrap.scss +154 -0
  30. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_like_los_gatos.scss +182 -0
  31. data/lib/generators/hot_glue/templates/themes/hotglue_scaffold_like_mountain_view.scss +179 -0
  32. data/lib/hot-glue.rb +1 -2
  33. data/lib/hotglue/version.rb +1 -1
  34. metadata +13 -33
@@ -5,12 +5,43 @@ module HotGlue
5
5
  class InstallGenerator < Rails::Generators::Base
6
6
  hook_for :form_builder, :as => :scaffold
7
7
  class_option :markup, type: :string, default: "erb"
8
+ class_option :theme, type: :string, default: nil
9
+ class_option :layout, type: :string, default: "hotglue"
8
10
 
9
11
  source_root File.expand_path('templates', __dir__)
10
12
 
11
-
12
13
  def initialize(*args) #:nodoc:
13
14
  super
15
+ @layout = options['layout'] || "hotglue"
16
+ @theme = options['theme']
17
+
18
+ if @layout == "hotglue" && options['theme'].nil?
19
+ puts "You have selected to install Hot Glue without a theme. You can either use the --layout=bootstrap to install NO HOT GLUE THEME, or to use a Hot Glue theme please choose: like_boostrap, like_menlo_park, like_cupertino, like_mountain_view, dark_knight"
20
+ exit
21
+ end
22
+
23
+ if @layout == 'boostrap'
24
+ puts "IMPORTANT: You have selected to install Hot Glue with Bootstrap layout (legacy). Be sure to always use ``--layout=bootstrap` when building your scaffold. No Hot Glue theme will be installed at this time.` "
25
+ end
26
+
27
+ ### INTERACTIVE LICENSING
28
+ #
29
+
30
+
31
+ print "(To purchase a license, please see https://heliosdev.shop/hot-glue-license) \n Please enter your license key: "
32
+ license_activation_key = STDIN.gets.strip
33
+
34
+ print "Please enter the EMAIL you used to purchase this license: "
35
+ license_email = STDIN.gets.strip
36
+ app_name = Rails.application.class.module_parent_name
37
+ license_should_be = Digest::SHA1.hexdigest("HOT-GLUE-LICENSE--#{app_name}--#{license_email}")
38
+
39
+
40
+ if (license_should_be != license_activation_key)
41
+ puts "Ooops... it seems that Hot Glue license is not valid. Please check 1) the email address you used for this license, 2) The app name you used to purchase this license, and 3) the activation key itself."
42
+ exit
43
+ end
44
+
14
45
  @markup = options['markup']
15
46
  if @markup == "haml"
16
47
  copy_file "haml/_flash_notices.haml", "#{'spec/dummy/' if Rails.env.test?}app/views/layouts/_flash_notices.haml"
@@ -23,55 +54,112 @@ module HotGlue
23
54
  copy_file "confirmable.js", "#{'spec/dummy/' if Rails.env.test?}app/javascript/controllers/confirmable.js"
24
55
  end
25
56
 
26
- if Rails.version.split(".")[0].to_i == 6
27
- app_js_contents = File.read("app/javascript/packs/application.js")
28
- if app_js_contents.include?("import Turbolinks from \"turbolinks\"")
29
- app_js_contents.gsub!("import Turbolinks from \"turbolinks\"", "import { Turbo } from \"@hotwired/turbo-rails\"")
30
- puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax [ import { Turbo } from \"@hotwired/turbo-rails\" ] "
57
+
58
+ begin
59
+ if Rails.version.split(".")[0].to_i == 6
60
+ app_js_contents = File.read("app/javascript/packs/application.js")
61
+ if app_js_contents.include?("import Turbolinks from \"turbolinks\"")
62
+ app_js_contents.gsub!("import Turbolinks from \"turbolinks\"", "import { Turbo } from \"@hotwired/turbo-rails\"")
63
+ puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax [ import { Turbo } from \"@hotwired/turbo-rails\" ] "
64
+ end
65
+
66
+ if app_js_contents.include?("Turbolinks.start()")
67
+ app_js_contents.gsub!("Turbolinks.start()", "Turbo.start()")
68
+ puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax[ Turbolinks.start() ] "
69
+ end
70
+ File.write("app/javascript/packs/application.js", app_js_contents)
71
+ end
72
+ rescue StandardError => e
73
+ puts "WARNING: error writing to app/javascript/packs/application.js --- #{e.message}"
74
+ end
75
+
76
+
77
+
78
+ begin
79
+ rails_helper_contents = File.read("spec/rails_helper.rb")
80
+ if !rails_helper_contents.include?("Capybara.default_driver =")
81
+ rails_helper_contents << "\nCapybara.default_driver = :selenium_chrome_headless "
82
+ puts " HOTGLUE --> added to spec/rails_helper.rb: `Capybara.default_driver = :selenium_chrome_headless` "
83
+ end
84
+
85
+ if !rails_helper_contents.include?("include FactoryBot::Syntax::Methods")
86
+ rails_helper_contents.gsub!("RSpec.configure do |config|", "RSpec.configure do |config| \n
87
+ config.include FactoryBot::Syntax::Methods
88
+ ")
89
+ puts " HOTGLUE --> added to spec/rails_helper.rb: `config.include FactoryBot::Syntax::Methods` "
31
90
  end
32
91
 
33
- if app_js_contents.include?("Turbolinks.start()")
34
- app_js_contents.gsub!("Turbolinks.start()", "Turbo.start()")
35
- puts " HOTGLUE --> fixed packs/application.js: swapping old Turbolinks syntas for new Turbo-Rails syntax[ Turbolinks.start() ] "
92
+ if ! rails_helper_contents.include?("require 'support/capybara_login.rb'")
93
+ rails_helper_contents.gsub!("require 'rspec/rails'","require 'rspec/rails' \nrequire 'support/capybara_login.rb'")
94
+ puts " HOTGLUE --> added to spec/rails_helper.rb: `require 'support/capybara_login.rb'` "
36
95
  end
37
- File.write("app/javascript/packs/application.js", app_js_contents)
96
+ File.write("spec/rails_helper.rb", rails_helper_contents)
38
97
 
98
+ rescue StandardError => e
99
+ puts "WARNING: error writing to spec/rails_helper --- #{e.message}"
39
100
  end
40
101
 
41
102
 
42
- rails_helper_contents = File.read("spec/rails_helper.rb")
43
- if !rails_helper_contents.include?("Capybara.default_driver =")
44
- rails_helper_contents << "\nCapybara.default_driver = :selenium_chrome_headless "
45
- puts " HOTGLUE --> added to spec/rails_helper.rb: `Capybara.default_driver = :selenium_chrome_headless` "
46
- end
103
+ begin
104
+ application_layout_contents = File.read("app/views/layouts/application.html.erb")
47
105
 
48
- if !rails_helper_contents.include?("include FactoryBot::Syntax::Methods")
49
- rails_helper_contents.gsub!("RSpec.configure do |config|", "RSpec.configure do |config| \n
50
- config.include FactoryBot::Syntax::Methods
51
- ")
52
- puts " HOTGLUE --> added to spec/rails_helper.rb: `config.include FactoryBot::Syntax::Methods` "
106
+ if !application_layout_contents.include?("render partial: 'layouts/flash_notices'")
107
+ application_layout_contents.gsub!("<body>", "<body>\n
108
+ <%= render partial: 'layouts/flash_notices' %>
109
+ ")
110
+ File.write("app/views/layouts/application.html.erb", application_layout_contents)
111
+ puts " HOTGLUE --> added to app/views/layouts/application.html.erb: `<%= render partial: 'layouts/flash_notices' %>` "
112
+ end
113
+ rescue StandardError => e
114
+ puts "WARNING: error writing to app/views/layouts/application.html.erb --- #{e.message}"
53
115
  end
54
116
 
55
- if ! rails_helper_contents.include?("require 'support/capybara_login.rb'")
56
- rails_helper_contents.gsub!("require 'rspec/rails'","require 'rspec/rails' \nrequire 'support/capybara_login.rb'")
57
- puts " HOTGLUE --> added to spec/rails_helper.rb: `require 'support/capybara_login.rb'` "
117
+
118
+ begin
119
+ if @layout == "hotglue"
120
+ theme_location = "themes/hotglue_scaffold_#{@theme}.scss"
121
+ theme_file = "hotglue_scaffold_#{@theme}.scss"
122
+
123
+ copy_file theme_location, "#{'spec/dummy/' if Rails.env.test?}app/assets/stylesheets/#{theme_file}"
124
+
125
+ application_scss = File.read("app/assets/stylesheets/application.scss")
126
+
127
+ if !application_scss.include?("@import '#{theme_file}';")
128
+ application_scss << ( "\n @import '#{theme_file}'; ")
129
+ File.write("app/assets/stylesheets/application.scss", application_scss)
130
+ puts " HOTGLUE --> added to app/assets/stylesheets/application.scss: @import '#{theme_file}' "
131
+ else
132
+ puts " HOTGLUE --> already found theme in app/assets/stylesheets/application.scss: @import '#{theme_file}' "
133
+ end
134
+ end
135
+ rescue StandardError => e
136
+ puts "WARNING: error writing to app/assets/stylesheets/application.scss --- #{e.message}"
58
137
  end
59
- File.write("spec/rails_helper.rb", rails_helper_contents)
60
138
 
61
139
 
62
- application_layout_contents = File.read("app/views/layouts/application.html.erb")
63
140
 
64
- if !application_layout_contents.include?("render partial: 'layouts/flash_notices'")
65
- application_layout_contents.gsub!("<body>", "<body>\n
66
- <%= render partial: 'layouts/flash_notices' %>
67
- ")
68
- File.write("app/views/layouts/application.html.erb", application_layout_contents)
69
- puts " HOTGLUE --> added to app/views/layouts/application.html.erb: `<%= render partial: 'layouts/flash_notices' %>` "
141
+ begin
142
+
143
+ if !File.exists?("config/hot_glue.yml")
144
+
145
+ yaml = {layout: @layout,
146
+ markup: @markup,
147
+ license_activation_key: license_activation_key,
148
+ license_email: license_email}.to_yaml
149
+ File.write("#{'spec/dummy/' if Rails.env.test?}config/hot_glue.yml", yaml)
150
+
151
+ end
152
+ rescue StandardError => e
153
+ puts "WARNING: error writing to config/hot_glue.yml --- #{e.message}"
70
154
  end
71
155
 
72
156
 
73
- if !File.exists?("spec/support/capybara_login.rb")
74
- copy_file "capybara_login.rb", "#{'spec/dummy/' if Rails.env.test?}spec/support/capybara_login.rb"
157
+ begin
158
+ if !File.exists?("spec/support/capybara_login.rb")
159
+ copy_file "capybara_login.rb", "#{'spec/dummy/' if Rails.env.test?}spec/support/capybara_login.rb"
160
+ end
161
+ rescue StandardError => e
162
+ puts "WARNING: error writing to spec/support/capybara_login.rb --- #{e.message}"
75
163
  end
76
164
  end
77
165
  end
@@ -5,13 +5,27 @@ module HotGlue
5
5
  attr_accessor :singular
6
6
 
7
7
  def field_output(col, type = nil, width, col_identifier )
8
- "<div class='col form-group <%='alert-danger' if @#{singular}.errors.details.keys.include?(:#{col.to_s})%>' > \n" +
9
- " <%= f.text_field :#{col.to_s}, value: @#{@singular}.#{col.to_s}, size: #{width}, class: 'form-control', type: '#{type}' %>\n "+
8
+ "<div class='#{col_identifier} form-group <%='alert-danger' if @#{singular}.errors.details.keys.include?(:#{col.to_s})%>' > \n" +
9
+ " <%= f.text_field :#{col.to_s}, value: @#{@singular}.#{col.to_s}, autocomplete: 'off', size: #{width}, class: 'form-control', type: '#{type}' %>\n "+
10
10
  " <label class='form-text' >#{col.to_s.humanize}</label>\n" +
11
11
  "</div>"
12
12
  end
13
13
 
14
14
 
15
+ def magic_button_output(*args)
16
+ path_helper_singular = args[0][:path_helper_singular]
17
+ path_helper_args = args[0][:path_helper_args]
18
+ singular = args[0][:singular]
19
+ magic_buttons = args[0][:magic_buttons]
20
+
21
+ magic_buttons.collect{ |button_name|
22
+ "<%= form_with model: #{singular}, url: #{path_helper_singular}(#{path_helper_args}) do |f| %>
23
+ <%= f.hidden_field :#{button_name}, value: \"#{button_name}\" %>
24
+ <%= f.submit '#{button_name.titleize}'.html_safe, data: {confirm: 'Are you sure you want to #{button_name} this #{singular}?'}, class: '#{singular}-button btn btn-primary ' %>
25
+ <% end %>"
26
+ }.join("\n")
27
+ end
28
+
15
29
  def text_area_output(col, field_length, col_identifier )
16
30
  lines = field_length % 40
17
31
  if lines > 5
@@ -19,7 +33,7 @@ module HotGlue
19
33
  end
20
34
 
21
35
  "<div class=\"#{col_identifier} form-group \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\">" +
22
- "<%= f.text_area :#{col.to_s}, class: 'form-control', cols: 40, rows: '#{lines}' %>" +
36
+ "<%= f.text_area :#{col.to_s}, class: 'form-control', autocomplete: 'off', cols: 40, rows: '#{lines}' %>" +
23
37
  "<label class='form-text'>#{col.to_s.humanize}</label>"+
24
38
  "</div>"
25
39
 
@@ -27,8 +41,10 @@ module HotGlue
27
41
 
28
42
  def list_column_headings(*args)
29
43
  columns = args[0][:columns]
44
+ column_width = args[0][:column_width]
45
+ col_identifier = args[0][:col_identifier]
30
46
 
31
- columns.map(&:to_s).map{|col_name| "<div class='col'>#{col_name.humanize}</div>"}.join("\n")
47
+ columns.map(&:to_s).map{|col_name| "<div class='#{col_identifier}' style='flex-basis: #{column_width}%'>#{col_name.humanize}</div>"}.join("\n")
32
48
  end
33
49
 
34
50
 
@@ -36,13 +52,15 @@ module HotGlue
36
52
  columns = args[0][:columns]
37
53
  show_only = args[0][:show_only]
38
54
  singular_class = args[0][:singular_class]
55
+ col_identifier = args[0][:col_identifier]
56
+
39
57
 
40
58
  # TODO: CLEAN ME
41
59
  @singular = args[0][:singular]
42
60
  singular = @singular
43
61
 
44
62
 
45
- col_identifier = "col"
63
+
46
64
  col_spaces_prepend = " "
47
65
 
48
66
  res = columns.map { |col|
@@ -97,10 +115,7 @@ module HotGlue
97
115
  text_area_output(col, 65536, col_identifier)
98
116
  end
99
117
  when :float
100
- limit ||= 256
101
- field_output(col, nil, limit, col_identifier)
102
-
103
-
118
+ field_output(col, nil, 5, col_identifier)
104
119
  when :datetime
105
120
 
106
121
 
@@ -125,9 +140,11 @@ module HotGlue
125
140
  " <%= f.label(:#{col.to_s}, value: 'Yes', for: '#{singular}_#{col.to_s}_1') %>\n" +
126
141
  "</div>"
127
142
  when :enum
128
- enum_name ="enum_name"
143
+ enum_name = "enum_name"
144
+ # byebug
145
+ enum_type = eval("#{singular_class}.columns.select{|x| x.name == '#{col.to_s}'}[0].sql_type")
129
146
  "<div class='#{col_identifier} form-group <%= 'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s}) %>' >
130
- <%= f.collection_select(:#{col.to_s}, enum_to_collection_select( #{singular_class}.defined_enums['#{col.to_s}']), :key, :value, {prompt: true, selected: @#{singular}.#{col.to_s} }, class: 'form-control') %>
147
+ <%= f.collection_select(:#{col.to_s}, enum_to_collection_select( #{singular_class}.defined_enums['#{enum_type}']), :key, :value, {prompt: true, selected: @#{singular}.#{col.to_s} }, class: 'form-control') %>
131
148
  <label class='small form-text text-muted'>#{col.to_s.humanize}</label></div>"
132
149
 
133
150
  end
@@ -150,11 +167,21 @@ module HotGlue
150
167
  show_only = args[0][:show_only]
151
168
  singular_class = args[0][:singular_class]
152
169
  singular = args[0][:singular]
170
+ perc_width = args[0][:perc_width]
171
+ layout = args[0][:layout]
153
172
 
154
173
  columns_count = columns.count + 1
155
- perc_width = (100/columns_count).floor
174
+ perc_width = (perc_width).floor
175
+
176
+ if layout == "bootstrap"
177
+ col_identifer = "col"
178
+ style_with_flex_basis = ""
179
+ else
180
+ style_with_flex_basis = " style='flex-basis: #{perc_width}%'"
181
+ col_identifer = "scaffold-cell"
182
+ end
183
+
156
184
 
157
- col_identifer = "col"
158
185
  columns.map { |col|
159
186
  type = eval("#{singular_class}.columns_hash['#{col}']").type
160
187
  limit = eval("#{singular_class}.columns_hash['#{col}']").limit
@@ -172,35 +199,37 @@ module HotGlue
172
199
 
173
200
  if assoc.nil?
174
201
  exit_message = "*** Oops. on the #{singular_class} object, there doesn't seem to be an association called '#{assoc_name}'"
175
- raise(HotGlue::Error,exit_message)
202
+ puts exit_message
203
+ exit
204
+ # raise(HotGlue::Error,exit_message)
176
205
  end
177
206
 
178
207
  display_column = HotGlue.derrive_reference_name(assoc.class_name)
179
208
 
180
- "<div class='#{col_identifer}'>
209
+ "<div class='#{col_identifer}'#{style_with_flex_basis}>
181
210
  <%= #{singular}.#{assoc.name.to_s}.try(:#{display_column}) || '<span class=\"content alert-danger\">MISSING</span>'.html_safe %>
182
211
  </div>"
183
212
 
184
213
  else
185
- "<div class='#{col_identifer}'>
214
+ "<div class='#{col_identifer}'#{style_with_flex_basis}>
186
215
  <%= #{singular}.#{col}%></div>"
187
216
  end
188
217
  when :float
189
218
  width = (limit && limit < 40) ? limit : (40)
190
- "<div class='#{col_identifer}'>
219
+ "<div class='#{col_identifer}'#{style_with_flex_basis}>
191
220
  <%= #{singular}.#{col}%></div>"
192
221
  when :string
193
222
  width = (limit && limit < 40) ? limit : (40)
194
- "<div class='#{col_identifer}'>
223
+ "<div class='#{col_identifer}'#{style_with_flex_basis} >
195
224
  <%= #{singular}.#{col} %>
196
225
  </div>"
197
226
  when :text
198
- "<div class='#{col_identifer}'>
227
+ "<div class='#{col_identifer}'#{style_with_flex_basis}>
199
228
  <%= #{singular}.#{col} %>
200
229
  </div>"
201
230
  when :datetime
202
231
 
203
- "<div class='#{col_identifer}'>
232
+ "<div class='#{col_identifer}' #{style_with_flex_basis} >
204
233
  <% unless #{singular}.#{col}.nil? %>
205
234
  <%= #{singular}.#{col}.in_time_zone(current_timezone).strftime('%m/%d/%Y @ %l:%M %p ') + timezonize(current_timezone) %>
206
235
  <% else %>
@@ -208,7 +237,7 @@ module HotGlue
208
237
  <% end %>
209
238
  </div>"
210
239
  when :date
211
- "<div class='#{col_identifer}'>
240
+ "<div class='#{col_identifer}' #{style_with_flex_basis} >
212
241
  <% unless #{singular}.#{col}.nil? %>
213
242
  <%= #{singular}.#{col} %>
214
243
  <% else %>
@@ -216,7 +245,7 @@ module HotGlue
216
245
  <% end %>
217
246
  </div>"
218
247
  when :time
219
- "<div class='#{col_identifer}'>
248
+ "<div class='#{col_identifer}' #{style_with_flex_basis} >
220
249
  <% unless #{singular}.#{col}.nil? %>
221
250
  <%= #{singular}.#{col}.in_time_zone(current_timezone).strftime('%l:%M %p ') + timezonize(current_timezone) %>
222
251
  <% else %>
@@ -225,7 +254,7 @@ module HotGlue
225
254
  </div>
226
255
  "
227
256
  when :boolean
228
- "<div class='#{col_identifer}'>
257
+ "<div class='#{col_identifer}' #{style_with_flex_basis} >
229
258
  <% if #{singular}.#{col}.nil? %>
230
259
  <span class='alert-danger'>MISSING</span>
231
260
  <% elsif #{singular}.#{col} %>
@@ -235,7 +264,7 @@ module HotGlue
235
264
  <% end %>
236
265
  </div>
237
266
  " when :enum
238
- "<div class='#{col_identifer}'>
267
+ "<div class='#{col_identifer}' #{style_with_flex_basis} >
239
268
  <% if #{singular}.#{col}.nil? %>
240
269
  <span class='alert-danger'>MISSING</span>
241
270
  <% else %>
@@ -247,7 +276,4 @@ module HotGlue
247
276
  }.join("\n")
248
277
  end
249
278
  end
250
-
251
-
252
-
253
279
  end
@@ -64,7 +64,7 @@ module HotGlue
64
64
  exit_message= "*** Oops. on the #{singular_class} object, there doesn't seem to be an association called '#{assoc_name}'"
65
65
  exit
66
66
  end
67
- display_column = derrive_reference_name(assoc.class_name)
67
+ display_column = HotGlue.derrive_reference_name(assoc.class_name)
68
68
 
69
69
 
70
70
  "#{col_identifier}{class: \"form-group \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{assoc_name.to_s})}\"}
@@ -159,10 +159,12 @@ module HotGlue
159
159
 
160
160
  if assoc.nil?
161
161
  exit_message = "*** Oops. on the #{singular_class} object, there doesn't seem to be an association called '#{assoc_name}'"
162
- raise(HotGlue::Error,exit_message)
162
+ puts exit_message
163
+ exit
164
+ # raise(HotGlue::Error,exit_message)
163
165
  end
164
166
 
165
- display_column = derrive_reference_name(assoc.class_name)
167
+ display_column = HotGlue.derrive_reference_name(assoc.class_name)
166
168
 
167
169
 
168
170
  "#{col_identifer}