Class: W3CValidatorToRally::Rally
- Inherits:
-
Object
- Object
- W3CValidatorToRally::Rally
- Defined in:
- lib/w3c-validator-to-rally.rb
Instance Method Summary collapse
Instance Method Details
#connect(login, pass) ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/w3c-validator-to-rally.rb', line 80 def connect(login,pass) begin print "Conecting with Rally...\n" rally_logger = Logger.new STDOUT rally_logger.level = Logger::INFO @rally = RallyRestAPI.new(:username => login, :password => pass, :api_version => "1.29", :logger => rally_logger) rescue print "Error on connect. Try again...\n" else print "Logged with success!\n" end end |
#createDefects(project, errors) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/w3c-validator-to-rally.rb', line 94 def createDefects(project,errors) if errors.length > 0 begin puts "Checking defects" totals = errors.length - 1 uri = W3CValidatorToRally::W3CValidator.new for index in (0..totals) name = errors[index].first description = errors[index].last + "<br /><br />URL: " + uri.getURI findDefect(nil,project,name,description,index) end end else puts "No errors to create" end end |