class T1k::Commands::Validate
Public Class Methods
credentials?()
click to toggle source
# File lib/t1k/commands/validate.rb, line 28 def self.credentials? if self.password_from_bitbucket_is_avaliable? @@messages << "Password is not avaliable" end exist = File.exist?(T1k::tthousand_path) exist ? @@messages << "T1000 file was found" : @@errors << "T1000 file not found" exist end
default_repository()
click to toggle source
# File lib/t1k/commands/validate.rb, line 45 def self.default_repository Repository.default_repository end
password_from_bitbucket_is_avaliable?()
click to toggle source
# File lib/t1k/commands/validate.rb, line 49 def self.password_from_bitbucket_is_avaliable? self.default_repository == T1k::Repositories::Bitbucket and "#{ENV['BITBUCKET_PWD']}".nil? end
run()
click to toggle source
# File lib/t1k/commands/validate.rb, line 12 def self.run T1k.setup_credentials c = Validate.credentials? t = Validate.trello? g = Validate.valid_keys_on_repository? @@messages = @@messages + Trackers::Trello.messages + self.default_repository.messages @@errors = @@errors + Trackers::Trello.errors + self.default_repository.errors @@messages.each do |m| puts m.green end puts "The are some errors listed below:\n".red unless c && t && g @@errors.each do |e| puts e.red end end
trello?()
click to toggle source
# File lib/t1k/commands/validate.rb, line 37 def self.trello? Trackers::Trello.valid_keys? end
valid_keys_on_repository?()
click to toggle source
# File lib/t1k/commands/validate.rb, line 41 def self.valid_keys_on_repository? self.default_repository.valid_keys? end