Class: RoxClient::Tasks

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/rox-client-ruby/tasks.rb

Instance Method Summary collapse

Constructor Details

#initializeTasks

Returns a new instance of Tasks.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rox-client-ruby/tasks.rb', line 9

def initialize

  namespace :spec do

    namespace :rox do

      desc "Generate a test run UID to group test results in ROX Center (stored in an environment variable)"
      task :uid do
        trace do
          uid = uid_manager.generate_uid_to_env
          puts Paint["ROX - Generated UID for test run: #{uid}", :cyan]
        end
      end

      namespace :uid do

        desc "Generate a test run UID to group test results in ROX Center (stored in a file)"
        task :file do
          trace do
            uid = uid_manager.generate_uid_to_file
            puts Paint["ROX - Generated UID for test run: #{uid}", :cyan]
          end
        end

        desc "Clean the test run UID (file and environment variable)"
        task :clean do
          trace do
            uid_manager.clean_uid
            puts Paint["ROX - Cleaned test run UID", :cyan]
          end
        end
      end
    end
  end
end