Class: Integrity::Build
- Includes:
- DataMapper::Resource
- Defined in:
- lib/integrity/build.rb
Class Method Summary collapse
Instance Method Summary collapse
- #commit_author ⇒ Object
- #commit_identifier ⇒ Object
- #commit_message ⇒ Object
- #commit_metadata ⇒ Object
- #commited_at ⇒ Object
- #complete!(time = Time.now) ⇒ Object
- #failed? ⇒ Boolean
- #pending? ⇒ Boolean
- #project_id ⇒ Object
-
#short_commit_identifier ⇒ Object
Deprecated methods.
- #start!(time = Time.now) ⇒ Object
- #status ⇒ Object
Class Method Details
.pending ⇒ Object
16 17 18 |
# File 'lib/integrity/build.rb', line 16 def self.pending all(:started_at => nil) end |
Instance Method Details
#commit_author ⇒ Object
57 58 59 60 |
# File 'lib/integrity/build.rb', line 57 def warn "Build#commit_author is deprecated, use Commit#author" commit. end |
#commit_identifier ⇒ Object
52 53 54 55 |
# File 'lib/integrity/build.rb', line 52 def commit_identifier warn "Build#commit_identifier is deprecated, use Commit#identifier" commit.identifier end |
#commit_message ⇒ Object
62 63 64 65 |
# File 'lib/integrity/build.rb', line 62 def warn "Build#commit_message is deprecated, use Commit#message" commit. end |
#commit_metadata ⇒ Object
77 78 79 80 81 82 |
# File 'lib/integrity/build.rb', line 77 def warn "Build#commit_metadata is deprecated, use the different methods in Commit instead" { :message => commit., :author => commit., :date => commit.committed_at } end |
#commited_at ⇒ Object
67 68 69 70 |
# File 'lib/integrity/build.rb', line 67 def commited_at warn "Build#commited_at is deprecated, use Commit#committed_at" commit.committed_at end |
#complete!(time = Time.now) ⇒ Object
40 41 42 |
# File 'lib/integrity/build.rb', line 40 def complete!(time=Time.now) self.completed_at = time end |
#failed? ⇒ Boolean
24 25 26 |
# File 'lib/integrity/build.rb', line 24 def failed? !successful? end |
#pending? ⇒ Boolean
20 21 22 |
# File 'lib/integrity/build.rb', line 20 def pending? started_at.nil? end |
#project_id ⇒ Object
72 73 74 75 |
# File 'lib/integrity/build.rb', line 72 def project_id warn "Build#project_id is deprecated, use Commit#project_id" commit.project_id end |
#short_commit_identifier ⇒ Object
Deprecated methods
47 48 49 50 |
# File 'lib/integrity/build.rb', line 47 def short_commit_identifier warn "Build#short_commit_identifier is deprecated, use Commit#short_identifier" commit.short_identifier end |
#start!(time = Time.now) ⇒ Object
36 37 38 |
# File 'lib/integrity/build.rb', line 36 def start!(time=Time.now) self.started_at = time end |
#status ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/integrity/build.rb', line 28 def status case when pending? then :pending when successful? then :success when failed? then :failed end end |