Class: MakeItSo::RailsAppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- MakeItSo::RailsAppGenerator
- Defined in:
- lib/generators/rails_app_generator.rb
Instance Method Summary collapse
- #finish_template ⇒ Object
-
#initialize(*args) ⇒ RailsAppGenerator
constructor
A new instance of RailsAppGenerator.
Constructor Details
#initialize(*args) ⇒ RailsAppGenerator
Returns a new instance of RailsAppGenerator.
67 68 69 70 71 72 73 74 |
# File 'lib/generators/rails_app_generator.rb', line 67 def initialize(*args) super if [:rspec] # don't generate Test::Unit - we have to dup to unfreeze = .dup [:skip_test] = true end end |
Instance Method Details
#finish_template ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/generators/rails_app_generator.rb', line 76 def finish_template super build 'pry_rails_dependency' build 'base_stylesheets' build 'eliminate_byebug' unless [:skip_javascript] build 'base_javascripts' end build 'application_controller' build 'application_record' build 'dotenv' if [:rspec] build 'rspec_dependency' #build 'fix_generators' build 'factory_bot_rspec' build 'database_cleaner_rspec' build 'valid_attribute_rspec' build 'shoulda_rspec' end if [:devise] build 'devise_dependency' end if [:foundation] build 'foundation_dependency' end if [:react] build 'react' end if [:js_test_lib] == "jest" build 'jest' elsif [:js_test_lib] == "karma" build 'karma' end if [:react] || [:js_test_lib] build 'yarn_install' end end |