Sha256: cb0312883655cccdd8d17c1e111972107c3d981cb29ce88df3e4c94525173786

Contents?: true

Size: 993 Bytes

Versions: 64

Compression:

Stored size: 993 Bytes

Contents

require 'fileutils'
require 'yaml'

class Ufo::Upgrade
  class Upgrade33to34
    def initialize(options)
      @options = options
    end

    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

    def create_params_yaml
      src = File.expand_path("./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

    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
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
ufo-6.3.13 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.12 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.11 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.10 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.9 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.8 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.7 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.6 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.5 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.4 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.3 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.2 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.1 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.3.0 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.2.5 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.2.4 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.2.3 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.2.2 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.2.1 lib/ufo/upgrade/upgrade33to34.rb
ufo-6.2.0 lib/ufo/upgrade/upgrade33to34.rb