Sha256: e9b05a6e095abab982ed0fa094cc8d92c77f966d499018e5fd6776719c43e5cd

Contents?: true

Size: 622 Bytes

Versions: 12

Compression:

Stored size: 622 Bytes

Contents

module Pah
  module Templates
    class RubyEnv < Pah::Template
      def call
        current_ruby = ::Pah::RUBY_VERSION
        current_gemset = Pah.configuration.app_name

        copy_static_file '.ruby-version'
        gsub_file '.ruby-version', /RUBY_VERSION/, current_ruby

        copy_static_file '.ruby-gemset'
        gsub_file '.ruby-gemset', /GEMSET/, current_gemset

        git add: '.ruby-version'
        git add: '.ruby-gemset'
        git_commit 'Add .ruby-version and .ruby-gemset'

        copy_static_file '.env'
        git add: '.env'
        git_commit 'Add .env file'
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pah-0.0.28 lib/pah/templates/ruby_env.rb
pah-0.0.27 lib/pah/templates/ruby_env.rb
pah-0.0.26 lib/pah/templates/ruby_env.rb
pah-0.0.25 lib/pah/templates/ruby_env.rb
pah-0.0.24 lib/pah/templates/ruby_env.rb
pah-0.0.23 lib/pah/templates/ruby_env.rb
pah-0.0.22 lib/pah/templates/ruby_env.rb
pah-0.0.21 lib/pah/templates/ruby_env.rb
pah-0.0.20 lib/pah/templates/ruby_env.rb
pah-0.0.19 lib/pah/templates/ruby_env.rb
pah-0.0.17 lib/pah/templates/ruby_env.rb
pah-0.0.16 lib/pah/templates/ruby_env.rb