Commit 119b56ec2dcc418243d0caf10906013a48a3987f
Exists in
colab
and in
4 other branches
Merge pull request #215 from mezuro/saikuro
Saikuro
Showing
4 changed files
with
21 additions
and
4 deletions
Show diff stats
.travis.yml
| 1 | language: ruby | 1 | language: ruby |
| 2 | rvm: | 2 | rvm: |
| 3 | - 2.2.2 | 3 | - 2.2.2 |
| 4 | +addons: | ||
| 5 | + postgresql: "9.3" | ||
| 4 | 6 | ||
| 5 | before_script: | 7 | before_script: |
| 6 | - - git clone https://gist.github.com/6179925.git -b v2.2 kalibro_install | 8 | + - git clone https://gist.github.com/6179925.git -b v2.3 kalibro_install |
| 7 | - pushd kalibro_install | 9 | - pushd kalibro_install |
| 8 | # Remove bugged libzmq3 package, see https://github.com/travis-ci/travis-ci/issues/982 and https://github.com/travis-ci/travis-ci/issues/1715 for details | 10 | # Remove bugged libzmq3 package, see https://github.com/travis-ci/travis-ci/issues/982 and https://github.com/travis-ci/travis-ci/issues/1715 for details |
| 9 | - sudo apt-get remove libzmq3 | 11 | - sudo apt-get remove libzmq3 |
features/repository/show/modules_tree.feature
| @@ -53,7 +53,7 @@ Feature: Repository modules tree | @@ -53,7 +53,7 @@ Feature: Repository modules tree | ||
| 53 | And I click on the sample child's name | 53 | And I click on the sample child's name |
| 54 | Then I should see a sample child's name | 54 | Then I should see a sample child's name |
| 55 | 55 | ||
| 56 | - @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip | 56 | + @kalibro_configuration_restart @kalibro_processor_restart @javascript |
| 57 | Scenario: Should show modules directories root when the process has been finished | 57 | Scenario: Should show modules directories root when the process has been finished |
| 58 | Given I am a regular user | 58 | Given I am a regular user |
| 59 | And I am signed in | 59 | And I am signed in |
features/step_definitions/metric_configuration_steps.rb
| @@ -10,13 +10,17 @@ end | @@ -10,13 +10,17 @@ end | ||
| 10 | 10 | ||
| 11 | Given(/^I have a sample configuration with MetricFu metrics$/) do | 11 | Given(/^I have a sample configuration with MetricFu metrics$/) do |
| 12 | reading_group = FactoryGirl.create(:reading_group) | 12 | reading_group = FactoryGirl.create(:reading_group) |
| 13 | - reading = FactoryGirl.create(:reading, {reading_group_id: reading_group.id}) | 13 | + FactoryGirl.create(:reading, {reading_group_id: reading_group.id}) |
| 14 | 14 | ||
| 15 | @kalibro_configuration = FactoryGirl.create(:kalibro_configuration) | 15 | @kalibro_configuration = FactoryGirl.create(:kalibro_configuration) |
| 16 | - metric_configuration = FactoryGirl.create(:metric_configuration, | 16 | + FactoryGirl.create(:metric_configuration, |
| 17 | {metric: FactoryGirl.build(:pain), | 17 | {metric: FactoryGirl.build(:pain), |
| 18 | reading_group_id: reading_group.id, | 18 | reading_group_id: reading_group.id, |
| 19 | kalibro_configuration_id: @kalibro_configuration.id}) | 19 | kalibro_configuration_id: @kalibro_configuration.id}) |
| 20 | + FactoryGirl.create(:metric_configuration, | ||
| 21 | + {metric: FactoryGirl.build(:saikuro), | ||
| 22 | + reading_group_id: reading_group.id, | ||
| 23 | + kalibro_configuration_id: @kalibro_configuration.id}) | ||
| 20 | end | 24 | end |
| 21 | 25 | ||
| 22 | When(/^I visit the sample metric configuration edit page$/) do | 26 | When(/^I visit the sample metric configuration edit page$/) do |
spec/factories/metrics.rb
| @@ -32,6 +32,17 @@ FactoryGirl.define do | @@ -32,6 +32,17 @@ FactoryGirl.define do | ||
| 32 | initialize_with { new(name, code, scope, description, languages) } | 32 | initialize_with { new(name, code, scope, description, languages) } |
| 33 | end | 33 | end |
| 34 | 34 | ||
| 35 | + factory :saikuro, class: KalibroClient::Entities::Miscellaneous::NativeMetric do | ||
| 36 | + name "Cyclomatic Complexity" | ||
| 37 | + code "saikuro" | ||
| 38 | + scope "METHOD" | ||
| 39 | + description nil | ||
| 40 | + languages { [:ruby] } | ||
| 41 | + metric_collector_name "MetricFu" | ||
| 42 | + | ||
| 43 | + initialize_with { new(name, code, scope, description, languages) } | ||
| 44 | + end | ||
| 45 | + | ||
| 35 | factory :compound_metric, class: KalibroClient::Entities::Miscellaneous::CompoundMetric do | 46 | factory :compound_metric, class: KalibroClient::Entities::Miscellaneous::CompoundMetric do |
| 36 | name "Compound" | 47 | name "Compound" |
| 37 | code "compound" | 48 | code "compound" |