Class: Baldwin::Installer

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/baldwin/installer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



34
35
36
# File 'lib/baldwin/installer.rb', line 34

def self.source_root
  File.dirname __FILE__
end

Instance Method Details

#add_baldwin_setup_to_spec_helperObject



23
24
25
26
27
28
# File 'lib/baldwin/installer.rb', line 23

def add_baldwin_setup_to_spec_helper
  create_file 'spec/spec_helper.rb', <<-EOS
require 'baldwin/setup'
require 'rspec/rails'
EOS
end

#copy_example_rails_templateObject



30
31
32
# File 'lib/baldwin/installer.rb', line 30

def copy_example_rails_template
  copy_file 'rails_template.rb', 'spec/rails/rails_template.rb'
end

#create_appraisals_fileObject



13
14
15
16
17
18
19
20
21
# File 'lib/baldwin/installer.rb', line 13

def create_appraisals_file
  create_file 'Appraisals', <<-EOS
# add your rails configurations to test against here, like:
appraise 'rails-3.1.0' do
  gem 'rails', '3.1.0'
end
# see https://github.com/thoughtbot/appraisal for more info
EOS
end

#ignore_dummy_rails_appsObject



7
8
9
10
11
# File 'lib/baldwin/installer.rb', line 7

def ignore_dummy_rails_apps
  append_to_file '.gitignore', <<-EOS
spec/rails/rails-*
EOS
end