Class: Modulorails::ModuloprojectGenerator

Inherits:
Generators::Base
  • Object
show all
Defined in:
lib/generators/modulorails/moduloproject/moduloproject_generator.rb

Constant Summary collapse

VERSION =
2

Instance Method Summary collapse

Instance Method Details

#create_configObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/generators/modulorails/moduloproject/moduloproject_generator.rb', line 11

def create_config
  Modulorails.deprecator.warn("    Modulorails::ModuloprojectGenerator is deprecated and will be removed in version 2.0.\n    This generator will be moved to Moduloproject 3.0 (available later).\n  MESSAGE\n\n  remove_old_keepfile(\".modulorails-\#{generator_name}\")\n  template 'config/environments/production.rb', force: true\n  copy_file('config/environments/production.rb', 'config/environments/staging.rb')\n  update_application_rb\n  create_file('config/locales/fr.yml', \"fr: {}\\n\")\nrescue StandardError => e\n  warn(\"[Modulorails] Error: cannot generate Moduloproject configuration: \#{e.message}\")\nend\n")