Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add annotator

  • Loading branch information...
commit bef9de4662836f9b5fae3beb24e733bdcb9888e0 1 parent ea217b9
@comboy comboy authored
View
3  Gemfile
@@ -2,6 +2,9 @@ source 'http://rubygems.org'
gem 'rails', '3.0.11'
+# models annotations
+gem 'annotator'
+
# live web notifications in rails
gem 'juggernaut'
View
3  Gemfile.lock
@@ -29,6 +29,8 @@ GEM
activemodel (= 3.0.11)
activesupport (= 3.0.11)
activesupport (3.0.11)
+ annotator (0.0.2)
+ rails (~> 3.0)
arel (2.0.10)
builder (2.1.2)
crack (0.1.8)
@@ -93,6 +95,7 @@ PLATFORMS
DEPENDENCIES
ZenTest
+ annotator
factory_girl_rails
git
gravtastic
View
6 app/models/author.rb
@@ -1,3 +1,9 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * created_at [datetime] - creation time
+# * email [string]:w
+# * name [string]
+# * updated_at [datetime] - last update time
class Author < ActiveRecord::Base
has_many :commits
View
13 app/models/commit.rb
@@ -1,3 +1,16 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * author_id [integer] - belongs_to Author
+# * committed_at [datetime] - when commit was created in repo
+# * created_at [datetime] - creation time (in our database)
+# * description [text] - description provided inside commit
+# * dev_structure [text] - keeps database structure FIXME: reorganize, make it some data_yaml or whatever
+# * number [string] - commit number as in VCS (e.g. sha hash in git)
+# * parent_id [integer] - belongs_to parent Commit
+# * preparation_log [text] - FIXME: remove me, it's present in ProjectInstanceCommit
+# * project_id [integer] - belongs_to Project
+# * skipped [boolean] - commit can be marked as skipped if we don't want moci to run it
+# * updated_at [datetime] - last update time
class Commit < ActiveRecord::Base
#TODO? maybe: commiter? multiple parents?
#
View
7 app/models/notification.rb
@@ -1,3 +1,10 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * created_at [datetime] - creation time
+# * name [string]
+# * notification_options [text] - serialized options specific to given handler
+# * notification_type [string] - class name of the handler (Moci::Notificator::..)
+# * updated_at [datetime] - last update time
class Notification < ActiveRecord::Base
has_and_belongs_to_many :projects
View
7 app/models/project.rb
@@ -1,3 +1,10 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * created_at [datetime] - creation time
+# * name [string]
+# * project_type [string, default=Base] - same as class name that will be used as project handler (Moci::ProjectHandler::..)
+# * updated_at [datetime] - last update time
+# * vcs_branch_name [string]
class Project < ActiveRecord::Base
validates_presence_of :name
View
8 app/models/project_instance.rb
@@ -1,3 +1,11 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * created_at [datetime] - creation time
+# * locked_by [string] - string handle of whoever locked the instance #TODO: add locked_at and timeouts
+# * project_id [integer] - belongs_to Project
+# * state [string, default=new] - TODO: document me
+# * updated_at [datetime] - last update time
+# * working_directory [string] - directory of the project we run tests on
class ProjectInstance < ActiveRecord::Base
belongs_to :project
View
9 app/models/project_instance_commit.rb
@@ -1,3 +1,12 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * commit_id [integer] - belongs_to Commit
+# * created_at [datetime] - creation time
+# * data_yaml [text] - serialized data associated with commit
+# * preparation_log [text] - commaound output of first time commit preparation (use data maybe?)
+# * project_instance_id [integer] - belongs_to ProjectInstance
+# * state [string, default=new] - current state, 'new' -> ( 'prepared' | 'preparation_failed' )
+# * updated_at [datetime] - last update time
class ProjectInstanceCommit < ActiveRecord::Base
belongs_to :commit
View
8 app/models/test_suite.rb
@@ -1,3 +1,11 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * created_at [datetime] - creation time
+# * name [string]
+# * project_id [integer] - belongs_to Project
+# * suite_options [text] - test suite specific options to be passed to test runner (e.g' which files to include/exclude)
+# * suite_type [string] - test suite type, name same as test runner class name (inside Moci::TestRunner)
+# * updated_at [datetime] - last update time
require 'moci/test_runner/spec' #FIXME this should not be necessary here
class TestSuite < ActiveRecord::Base
View
14 app/models/test_suite_run.rb
@@ -1,3 +1,17 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * assertions_count [integer] - number of assertions made
+# * commit_id [integer] - belongs_to Commit (TODO: shouldn't that be project_instance_commit?)
+# * created_at [datetime] - creation time
+# * errors_count [integer] - number of errors that occurred during test suite run
+# * failures_count [integer] - number of failures that occured during test suite run
+# * project_instance_id [integer] - belongs_to ProjectInstance
+# * run_log [text] - command output of test suite run
+# * run_time [float] - total test suite execution time
+# * state [string] - currently only 2 states: running -> finished
+# * test_suite_id [integer] - belongs_to TestSuite
+# * tests_count [integer] - number of tests in the test suite
+# * updated_at [datetime] - last update time
class TestSuiteRun < ActiveRecord::Base
belongs_to :commit
belongs_to :project_instance
View
7 app/models/test_unit.rb
@@ -1,3 +1,10 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * class_name [string] - name of group of tests
+# * created_at [datetime] - creation time
+# * name [text]
+# * test_suite_id [integer] - belongs_to TestSuite
+# * updated_at [datetime] - last update time
class TestUnit < ActiveRecord::Base
belongs_to :test_suite
end
View
7 app/models/test_unit_run.rb
@@ -1,3 +1,10 @@
+# Attributes:
+# * id [integer, primary, not null] - primary key
+# * created_at [datetime] - creation time
+# * result [string] - '.' - OK, 'E' - error, 'F' - failure, 'U' - undefined
+# * run_time [float] - time taken to run this test
+# * test_suite_run_id [integer] - belongs_to TestSuiteRun
+# * test_unit_id [integer] - belongs_to TestUnit
class TestUnitRun < ActiveRecord::Base
belongs_to :test_unit
belongs_to :test_suite_run
View
9 app/views/projects/show.html.haml
@@ -39,7 +39,7 @@
.about
%h3 About project
- %table{:class => 'keyvalue nostyle', :style => 'width: 100%; float: right;'}
+ %table{:class => 'keyvalue nostyle', :style => 'width: 100%;'}
%tr
%td.key Monitored since
%td.value= @project.created_at
@@ -48,3 +48,10 @@
%td.value= @project.commits.count
+ %h3 Currently runnning
+
+ %table
+ - @project.test_suite_runs.order('updated_at DESC').limit(5).all.each do |tr|
+ %tr
+ %td= tr.updated_at
+ %td= tr.state
Please sign in to comment.
Something went wrong with that request. Please try again.