Sha256: 19c0d8542d1ff590d1a54b25b7b1a5a93a443349fca1bb43b75739180e1a9e0d

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

module Soaring
  class Initializer
    def initialize(options)
      @options = options
    end

    def initialize_project(project_folder)
      @project_folder = project_folder
      git_refspec = 'STABLE' #default to STABLE if not specified
      git_refspec = @options[:soar_sc_refspec] if @options[:soar_sc_refspec]

      Dir.mktmpdir { |dir|
        temporary_folder = dir
        temporary_soar_sc_folder = "#{temporary_folder}/soar_sc"
        `git --git-dir=/dev/null clone --quiet --progress --branch #{git_refspec} --depth=1 git@gitlab.host-h.net:hetznerZA/soar_sc.git #{temporary_soar_sc_folder}`

        `yes | cp -rf #{temporary_soar_sc_folder}/config #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/docker #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/lib #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/smaak #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/config.ru #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/Gemfile #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/.ruby-gemset #{@project_folder}`
        `yes | cp -rf #{temporary_soar_sc_folder}/.ruby-version #{@project_folder}`
      }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
soaring-0.1.7 lib/soaring/initializer.rb
soaring-0.1.6 lib/soaring/initializer.rb
soaring-0.1.5 lib/soaring/initializer.rb
soaring-0.1.4 lib/soaring/initializer.rb
soaring-0.1.3 lib/soaring/initializer.rb
soaring-0.1.2 lib/soaring/initializer.rb
soaring-0.1.1 lib/soaring/initializer.rb