@@ -54,6 +54,12 @@ class AppGenerator < Rails::Generators::AppGenerator
5454 default : false ,
5555 group : :cybele ,
5656 desc : 'Skip show_for integration. Default: don\'t skip'
57+ class_option :skip_haml ,
58+ type : :boolean ,
59+ aliases : nil ,
60+ default : false ,
61+ group : :cybele ,
62+ desc : 'Skip haml and haml-rails integration. Default: don\'t skip'
5763
5864 def initialize ( *args )
5965 super
@@ -68,6 +74,7 @@ def initialize(*args)
6874 option_with_ask_yes ( :skip_sidekiq )
6975 option_with_ask_yes ( :skip_simple_form )
7076 option_with_ask_yes ( :skip_show_for )
77+ option_with_ask_yes ( :skip_haml )
7178 @options . freeze
7279 end
7380
@@ -76,6 +83,7 @@ def customize_gemfile
7683 build :add_gems
7784 build :add_simple_form_gem unless @options [ :skip_simple_form ]
7885 build :add_show_for_gem unless @options [ :skip_show_for ]
86+ build :add_haml_gems unless @options [ :skip_haml ]
7987 bundle_command 'install --binstubs=bin/stubs'
8088 end
8189
@@ -89,6 +97,11 @@ def setup_ruby_version
8997 build :add_ruby_version
9098 end
9199
100+ def setup_cybele_version
101+ say 'Add .VERSION.txt file' , :green
102+ build :add_cybele_version
103+ end
104+
92105 def remove_files_we_dont_need
93106 say 'Remove files we don\'t need' , :green
94107 build :remove_readme_rdoc
@@ -153,6 +166,12 @@ def setup_simple_form
153166 build :configure_simple_form
154167 end
155168
169+ def setup_haml
170+ return if @options [ :skip_haml ]
171+ say 'Setting up haml and generate haml-rails' , :green
172+ build :configure_haml
173+ end
174+
156175 def add_staging_secret_key
157176 say 'Add staging secret key to secret.yml file' , :green
158177 build :add_staging_secret_key_to_secrets_yml
0 commit comments