class WatirInstall::Generators::New
Public Class Methods
source_root()
click to toggle source
# File lib/watir_install/generators/new.rb, line 14 def self.source_root "#{File.dirname(__FILE__)}/new" end
Public Instance Methods
bundle()
click to toggle source
# File lib/watir_install/generators/new.rb, line 64 def bundle Dir.chdir(name) system 'bundle install' end
data_files()
click to toggle source
# File lib/watir_install/generators/new.rb, line 51 def data_files template "spec/support/data/base.rb.tt", "#{name}/spec/support/data/base.rb" end
initial_commit()
click to toggle source
# File lib/watir_install/generators/new.rb, line 69 def initial_commit if no_git == 'false' @git.lib.add('.', all: true) @git.commit("initial commit", {all: true}) end end
page_files()
click to toggle source
# File lib/watir_install/generators/new.rb, line 55 def page_files template "spec/support/pages/base.rb.tt", "#{name}/spec/support/pages/base.rb" end
root_files()
click to toggle source
# File lib/watir_install/generators/new.rb, line 37 def root_files template "gemfile.rb.tt", "#{name}/Gemfile" template "gitignore.rb.tt", "#{name}/.gitignore" template "rakefile.rb.tt", "#{name}/Rakefile" template "readme.rb.tt", "#{name}/README.md" template "ruby-version.rb.tt", "#{name}/.ruby-version" template "travis.rb.tt", "#{name}/.travis.yml" template "rspec.rb.tt", "#{name}/.rspec" end
support_files()
click to toggle source
# File lib/watir_install/generators/new.rb, line 59 def support_files template "spec/support/sauce_helpers.rb.tt", "#{name}/spec/support/sauce_helpers.rb" template "spec/support/site.rb.tt", "#{name}/spec/support/site.rb" end
test_files()
click to toggle source
# File lib/watir_install/generators/new.rb, line 47 def test_files template "spec/spec_helper.rb.tt", "#{name}/spec/spec_helper.rb" end
user_email()
click to toggle source
# File lib/watir_install/generators/new.rb, line 28 def user_email if no_git == 'false' @user_email ||= @git.config["user.email"] @user_email ||= ask "Enter your Email: " @git.config('user.email', @user_email) @user_email end end
user_name()
click to toggle source
# File lib/watir_install/generators/new.rb, line 18 def user_name if no_git == 'false' @git = Git.init(name) @user_name ||= @git.config["user.name"] @user_name ||= ask "Enter your Name: " @git.config('user.name', @user_name) @user_name end end