Class: Ufo::Upgrade::Upgrade33to34
- Inherits:
-
Object
- Object
- Ufo::Upgrade::Upgrade33to34
- Defined in:
- lib/ufo/upgrade/upgrade33to34.rb
Instance Method Summary collapse
- #create_params_yaml ⇒ Object
-
#initialize(options) ⇒ Upgrade33to34
constructor
A new instance of Upgrade33to34.
- #run ⇒ Object
- #warn_about_removing_new_service_from_settings ⇒ Object
Constructor Details
#initialize(options) ⇒ Upgrade33to34
Returns a new instance of Upgrade33to34.
6 7 8 |
# File 'lib/ufo/upgrade/upgrade33to34.rb', line 6 def initialize() @options = end |
Instance Method Details
#create_params_yaml ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/ufo/upgrade/upgrade33to34.rb', line 20 def create_params_yaml src = File.("./upgrade/params.yml", File.dirname(__FILE__)) dest = "#{Ufo.root}/.ufo/params.yml" FileUtils.cp(src, dest) puts "File .ufo/params.yml created.".color(:green) puts "Please check it out and adjust it to your needs." end |
#run ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/ufo/upgrade/upgrade33to34.rb', line 10 def run if File.exist?("#{Ufo.root}/.ufo/params.yml") puts "It looks like you already have a .ufo/params.yml project. This is the new project structure so exiting without updating anything." return end create_params_yaml warn_about_removing_new_service_from_settings end |
#warn_about_removing_new_service_from_settings ⇒ Object
28 29 30 |
# File 'lib/ufo/upgrade/upgrade33to34.rb', line 28 def warn_about_removing_new_service_from_settings puts "WARN: The new_service option is not longer a part of the .ufo/settings.yml. Please remove it. It is now a part of the .ufo/params.yml file." end |