class Restspec::Install::InstallRunner

Public Class Methods

source_root() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 10
def self.source_root
  File.dirname(__FILE__)
end

Public Instance Methods

copy_gemfile() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 18
def copy_gemfile
  copy_file 'templates/Gemfile', "#{project}/Gemfile"
end
create_api_dsl_files() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 36
def create_api_dsl_files
  create_file "#{project}/spec/api/restspec/api_endpoints.rb"
  create_file "#{project}/spec/api/restspec/api_schemas.rb"
  create_file "#{project}/spec/api/restspec/api_requirements.rb"
end
create_project_dir() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 14
def create_project_dir
  empty_directory project
end
create_rspec_config() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 32
def create_rspec_config
  template 'templates/restspec_config.rb', "#{project}/spec/api/restspec/restspec_config.rb"
end
create_spec_folders() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 22
def create_spec_folders
  empty_directory "#{project}/spec"
  empty_directory "#{project}/spec/api"
  empty_directory "#{project}/spec/support"
end
create_spec_helper() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 28
def create_spec_helper
  template 'templates/spec_helper.rb', "#{project}/spec/spec_helper.rb"
end
create_support_files() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 42
def create_support_files
  create_file "#{project}/spec/support/custom_matchers.rb"
  copy_file "templates/custom_macros.rb", "#{project}/spec/support/custom_macros.rb"
end
install_gems() click to toggle source
# File lib/restspec/runners/install/install_runner.rb, line 47
def install_gems
  inside(project) { run 'bundle install' }
end