Class: Build

Inherits:
Object
  • Object
show all
Defined in:
lib/tasks/cia.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



17
18
19
# File 'lib/tasks/cia.rb', line 17

def output
  @output
end

#statusObject (readonly)

Returns the value of attribute status.



17
18
19
# File 'lib/tasks/cia.rb', line 17

def status
  @status
end

#successObject (readonly)

Returns the value of attribute success.



17
18
19
# File 'lib/tasks/cia.rb', line 17

def success
  @success
end

Class Method Details

.runObject



19
20
21
# File 'lib/tasks/cia.rb', line 19

def self.run
  Build.new.run
end

Instance Method Details

#authorObject



40
41
42
# File 'lib/tasks/cia.rb', line 40

def author
  info['Last Changed Author']
end

#commit_messageObject



36
37
38
# File 'lib/tasks/cia.rb', line 36

def commit_message
  `svn log #{ROOT} -rHEAD`
end

#has_changes?Boolean

Returns:

  • (Boolean)


49
50
51
52
# File 'lib/tasks/cia.rb', line 49

def has_changes?
  update if @status.nil?    
  @status =~ /[A-Z]\s+[\w\/]+/
end

#revisionObject



28
29
30
# File 'lib/tasks/cia.rb', line 28

def revision
  info['Revision'].to_i
end

#runObject



23
24
25
26
# File 'lib/tasks/cia.rb', line 23

def run 
  update if @status.nil?    
  make if @success.nil?
end

#tests_ok?Boolean

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/tasks/cia.rb', line 44

def tests_ok?
  run if @success.nil?
  @success == true
end

#urlObject



32
33
34
# File 'lib/tasks/cia.rb', line 32

def url
  info['URL']
end