diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index 118eb68..e149638 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -63,5 +63,12 @@ def git_and_git_flow_commands git add: '.' git commit: '-m "Project initialized"' end + + def add_pronto_to_gemfile + # Add gems + append_file('Gemfile', template_content('pronto/pronto_Gemfile.erb')) + bundle_command 'update' + bundle_command 'install' + end end end diff --git a/lib/cybele/generators/app_generator.rb b/lib/cybele/generators/app_generator.rb index 2230de5..b031a2d 100644 --- a/lib/cybele/generators/app_generator.rb +++ b/lib/cybele/generators/app_generator.rb @@ -257,6 +257,11 @@ def docker_development_env build :setup_docker_development_env end + def setup_pronto + say 'Pronto is setup', :green + build :add_pronto_to_gemfile + end + def setup_git_and_git_flow say 'Initialize git and git flow' build :git_and_git_flow_commands diff --git a/templates/Gemfile.erb b/templates/Gemfile.erb index 7ecddc4..76f70e2 100644 --- a/templates/Gemfile.erb +++ b/templates/Gemfile.erb @@ -36,18 +36,6 @@ group :development, :test do gem 'colorize', '~> 0.8.1' end -# Pronto runners -group :development do - gem 'pronto', '~> 0.9.5' - gem 'pronto-erb_lint', require: false - gem 'pronto-brakeman', require: false - gem 'pronto-fasterer', require: false - gem 'pronto-flay', require: false - gem 'pronto-haml', require: false - gem 'pronto-poper', require: false - gem 'pronto-rubocop', require: false -end - # A set of common locale data and translations to internationalize and/or localize your Rails applications. gem 'rails-i18n', '~> 5.1' diff --git a/templates/pronto/pronto_Gemfile.erb b/templates/pronto/pronto_Gemfile.erb new file mode 100644 index 0000000..52599c5 --- /dev/null +++ b/templates/pronto/pronto_Gemfile.erb @@ -0,0 +1,12 @@ + +# Pronto runners +group :development do + gem 'pronto', '~> 0.9.5' + gem 'pronto-erb_lint', require: false + gem 'pronto-brakeman', require: false + gem 'pronto-fasterer', require: false + gem 'pronto-flay', require: false + gem 'pronto-haml', require: false + gem 'pronto-poper', require: false + gem 'pronto-rubocop', require: false +end