Class: Pah::Templates::RubyEnv
- Inherits:
-
Pah::Template
- Object
- Rails::Generators::Base
- Pah::Template
- Pah::Templates::RubyEnv
- Defined in:
- lib/pah/templates/ruby_env.rb
Instance Method Summary collapse
Methods inherited from Pah::Template
#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pah/templates/ruby_env.rb', line 4 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 |