Class: TestRail::Generators::Project
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- TestRail::Generators::Project
- Includes:
- Thor::Actions
- Defined in:
- lib/test_rail_integration/generator/project.rb
Class Method Summary collapse
-
.copy_file(file_name, root = nil) ⇒ Object
Copying templates for using for accessing to testrail.
-
.source_root ⇒ Object
Obtaining path of project folder.
-
.test_rail_data_file_exist? ⇒ Boolean
Checking existence of tes trail data file.
Class Method Details
.copy_file(file_name, root = nil) ⇒ Object
Copying templates for using for accessing to testrail
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/test_rail_integration/generator/project.rb', line 28 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 ⇒ Object
Obtaining path of project folder
14 15 16 |
# File 'lib/test_rail_integration/generator/project.rb', line 14 def self.source_root File.dirname(__FILE__) end |
.test_rail_data_file_exist? ⇒ Boolean
Checking existence of tes trail data file
21 22 23 |
# File 'lib/test_rail_integration/generator/project.rb', line 21 def self.test_rail_data_file_exist? File.exists?("config/data/test_rail_data.yml") end |