Sha256: 8cbd0dc0c6d6b1e18338bfa55796fc22eeefd270c6b127ba6e2264f20a6b2ae9

Contents?: true

Size: 908 Bytes

Versions: 5

Compression:

Stored size: 908 Bytes

Contents

module Playmo
  module Recipes
    class GitRecipe < Playmo::Recipe
      def setup
        silently do
          Event.events.listen(:before_exit) do |event_data|
            remove_file '.gitignore'

            create_file '.gitignore', <<-CONTENT.gsub(/^ {14}/, '')
              .DS_Store
              log/*.log
              tmp/**/*
              db/*.sqlite3
              .idea/
              public/uploads/*
              .sass-cache/
            CONTENT

            git :init
            git :add       => '.'
            git :commit    => "-am 'Initial commit for #{application_name}'"
          end
        end
      end
    end
  end
end

# Write down this recipe to our Cookbook if it's available
require File.dirname(__FILE__) + '/setup_database_recipe'
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::SetupDatabaseRecipe, Playmo::Recipes::GitRecipe) if defined?(Playmo::Cookbook)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
playmo-0.0.14 lib/playmo/recipes/git_recipe.rb
playmo-0.0.13 lib/playmo/recipes/git_recipe.rb
playmo-0.0.12 lib/playmo/recipes/git_recipe.rb
playmo-0.0.11 lib/playmo/recipes/git_recipe.rb
playmo-0.0.10 lib/playmo/recipes/git_recipe.rb