Sha256: 3e486b2ec6ff426edc7219d5d0d48c62227507e37ca1b99999e23a14d887726a

Contents?: true

Size: 366 Bytes

Versions: 24

Compression:

Stored size: 366 Bytes

Contents

module StaticMatic::SetupMixin
  
  def setup
    Dir.mkdir(@base_dir) unless File.exists?(@base_dir)
    
    Dir[File.join(File.dirname(__FILE__), "..", "templates", "project", "*")].each do |template|
      begin
        FileUtils.cp_r(template, @base_dir)
      rescue Errno::EEXIST
        # ignore - template exists
      end
    end

    puts "Done"
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
staticmatic2-2.1.8 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.7 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.6 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.5 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.4 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.3 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.2 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.1 lib/staticmatic/mixins/setup.rb
staticmatic2-2.1.0 lib/staticmatic/mixins/setup.rb
staticmatic2-2.0.2 lib/staticmatic/mixins/setup.rb
staticmatic2-2.0.1 lib/staticmatic/mixins/setup.rb
staticmatic2-2.0.0 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.1 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.10 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.9 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.8 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.7 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.6 lib/staticmatic/mixins/setup.rb
staticmatic-0.11.0.alpha.5 lib/staticmatic/mixins/setup.rb