class TestRailIntegration::TestTail::Generators::Project
Public Class Methods
copy_file(file_name, root = nil)
click to toggle source
Copying templates for using for accessing to testrail
# File lib/test_rail_integration/generator/project.rb, line 29 def self.copy_file(file_name, root = nil) if file_name == "test_rail_data.yml" FileUtils.mkdir_p("config/data") end if root FileUtils.cp("#{source_root}/project/#{file_name}", "#{root}/#{file_name}") else FileUtils.cp("#{source_root}/project/#{file_name}", "#{file_name}") end end
source_root()
click to toggle source
Obtaining path of project folder
# File lib/test_rail_integration/generator/project.rb, line 15 def self.source_root File.dirname(__FILE__) end
test_rail_data_file_exist?()
click to toggle source
Checking existence of tes trail data file
# File lib/test_rail_integration/generator/project.rb, line 22 def self.test_rail_data_file_exist? File.exists?("config/data/test_rail_data.yml") end