kalibro_client 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/features/metric_configuration/creation.feature +1 -1
  4. data/features/metric_configuration/destroy.feature +1 -1
  5. data/features/metric_configuration/find.feature +1 -1
  6. data/features/metric_result/metric_results_of.feature +3 -3
  7. data/features/metric_result/module_results.feature +3 -3
  8. data/features/metric_result/tree/descendant_values.feature +3 -3
  9. data/features/metric_result/tree/history_of.feature +4 -4
  10. data/features/module_result/children.feature +3 -3
  11. data/features/module_result/find.feature +3 -3
  12. data/features/module_result/history_of.feature +3 -3
  13. data/features/repository/all.feature +2 -2
  14. data/features/repository/cancel_processing.feature +2 -2
  15. data/features/repository/destroy.feature +2 -2
  16. data/features/repository/exists.feature +2 -2
  17. data/features/repository/find.feature +2 -2
  18. data/features/repository/of.feature +3 -3
  19. data/features/repository/process.feature +3 -3
  20. data/features/repository/processing/first_processing.feature +3 -3
  21. data/features/repository/processing/first_processing_after.feature +3 -3
  22. data/features/repository/processing/has_processing.feature +3 -3
  23. data/features/repository/processing/has_processing_after.feature +3 -3
  24. data/features/repository/processing/has_processing_before.feature +3 -3
  25. data/features/repository/processing/has_ready_processing.feature +3 -3
  26. data/features/repository/processing/last_processing.feature +3 -3
  27. data/features/repository/processing/last_processing_before.feature +3 -3
  28. data/features/repository/processing/last_processing_state.feature +3 -3
  29. data/features/repository/processing/last_ready_processing.feature +3 -3
  30. data/features/repository/processing/processing.feature +6 -6
  31. data/features/repository/processing/processing_with_date.feature +6 -6
  32. data/features/statistic/metric_percentage.feature +1 -1
  33. data/features/step_definitions/metric_configuration_steps.rb +7 -7
  34. data/lib/kalibro_client/entities/processor/metric_collector_details.rb +5 -1
  35. data/lib/kalibro_client/version.rb +1 -1
  36. data/spec/entities/processor/metric_collector_details_spec.rb +6 -3
  37. data/spec/factories/metrics.rb +11 -0
  38. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf7ddc7b8e7edd2848fe20500cf46232ab12c81f
4
- data.tar.gz: ef4bce5837524dc3b06af9c260045aedb23cbc32
3
+ metadata.gz: e191f0d8e9425cbd141f40fa5394d0304111a341
4
+ data.tar.gz: 332b0704428ff197560f47326e24d4f501b49509
5
5
  SHA512:
6
- metadata.gz: c116c831e1f791412f1382fec11cd415db40e6fe54b0e4c9cc89d46ba4134d6f7cdbb2af8b992974ee6f03b9239b40977a3fbceb9e73a0f297d9da0cc1632812
7
- data.tar.gz: cb39f96e84cc27d6d47aa928648bd8054f79f41a038be38622cd23c09748ca947d48b468129d9c2c36cfc84b65a6772a1e318f47b6f9aaa11a56c5e2a86fd4fb
6
+ metadata.gz: 218d5627657e6aea3dcf3d164b49b7f412cee62cec5486bb8ac7e145b1387d0e6860ed1b325d87d39d537e2e4fb3e55d965d3083694d9b4d24a133895187ecf8
7
+ data.tar.gz: 61551fff5abe5367175a4d9d4f045b3de3edc20739c13c1d4dbcf8fee65661276aeb02f6fc8a24b9e5b9c93a6489011969fd0dfc646aada426a5cbc4a875b85c
data/.travis.yml CHANGED
@@ -9,7 +9,7 @@ before_script:
9
9
  # 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
10
  - sudo apt-get remove libzmq3
11
11
  - git clone https://github.com/mezuro/kalibro_install.git -b v4.0 kalibro_install
12
- - KALIBRO_PROCESSOR_VERSION='v1.1.1' KALIBRO_CONFIGURATIONS_VERSION='v1.2.0' ./kalibro_install/install.sh
12
+ - KALIBRO_PROCESSOR_VERSION='v1.1.2' KALIBRO_CONFIGURATIONS_VERSION='v1.2.0' ./kalibro_install/install.sh
13
13
  - cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml
14
14
  - export BUNDLE_GEMFILE=$PWD/Gemfile
15
15
  - export CODECLIMATE_REPO_TOKEN=46cbb96b053b03ad66b0355bd96d0787f56fc5a4fc171b8d6eb30c421c5e6777
@@ -7,7 +7,7 @@ Feature: Create
7
7
  Scenario: creating a metric configuration
8
8
  Given I have a kalibro configuration with name "Kalibro for Java"
9
9
  And I have a reading group with name "Group"
10
- When I have a loc configuration within the given kalibro configuration
10
+ When I have a "saikuro" configuration within the given kalibro configuration
11
11
  Then the metric configuration should exist
12
12
 
13
13
  @kalibro_configuration_restart
@@ -7,6 +7,6 @@ Feature: Destroy
7
7
  Scenario: destroying a metric configuration
8
8
  Given I have a kalibro configuration with name "Kalibro for Java"
9
9
  And I have a reading group with name "Group"
10
- And I have a loc configuration within the given kalibro configuration
10
+ And I have a "saikuro" configuration within the given kalibro configuration
11
11
  When I destroy the metric configuration
12
12
  Then the metric configuration should no longer exist
@@ -7,7 +7,7 @@ Feature: Find
7
7
  Scenario: find a valid metric configuration
8
8
  Given I have a kalibro configuration with name "Kalibro for Java"
9
9
  And I have a reading group with name "Group"
10
- And I have a loc configuration within the given kalibro configuration
10
+ And I have a "saikuro" configuration within the given kalibro configuration
11
11
  When I search a metric configuration with the same id of the given metric configuration
12
12
  Then it should return the same metric configuration as the given one
13
13
 
@@ -6,12 +6,12 @@ Feature: Metric results of
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: when there is a metric result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I call the first_processing method for the given repository
@@ -6,12 +6,12 @@ Feature: Module Results
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: when there is a metric result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I call the first_processing method for the given repository
@@ -6,12 +6,12 @@ Feature: Descendant values
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: when there is a metric result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I call the first_processing method for the given repository
@@ -6,13 +6,13 @@ Feature: history of
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: when there is a metric result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a metric with name "Lines of Code"
12
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a metric with name "Cyclomatic Complexity"
12
+ And I have a "saikuro" configuration within the given kalibro configuration
13
13
  And the given project has the following Repositories:
14
14
  | name | scm_type | address |
15
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
16
16
  And I call the process method for the given repository
17
17
  And I wait up for a ready processing
18
18
  And I call the first_processing method for the given repository
@@ -6,12 +6,12 @@ Feature: Children
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: find a valid module result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  When I ask for the children of the processing root module result
@@ -6,12 +6,12 @@ Feature: Find
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: find a valid module result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  When I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I get the module result of the processing
@@ -6,12 +6,12 @@ Feature: /history of
6
6
  @kalibro_configuration_restart @kalibro_processor_restart
7
7
  Scenario: get the history of a module result
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I get the module result of the processing
@@ -6,10 +6,10 @@ Feature: Repositories listing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With existing project repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And the given project has the following Repositories:
11
11
  | name | scm_type | address |
12
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
12
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
13
13
  And I have an independent repository
14
14
  When I ask for all the repositories
15
15
  Then the response should contain the given repositories
@@ -6,9 +6,9 @@ Feature: Process
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And the given project has the following Repositories:
11
11
  | name | scm_type | address |
12
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
12
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
13
13
  When I call the cancel_process method for the given repository
14
14
  Then I should get success
@@ -6,9 +6,9 @@ Feature: Repositories destroying
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With existing repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And the given project has the following Repositories:
11
11
  | name | scm_type | address |
12
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
12
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
13
13
  When I destroy the repository
14
14
  Then the repository should no longer exist
@@ -6,9 +6,9 @@ Feature: Repositories listing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With existing project repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And the given project has the following Repositories:
11
11
  | name | scm_type | address |
12
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
12
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
13
13
  When I ask to check if the given repository exists
14
14
  Then I should get true
@@ -6,9 +6,9 @@ Feature: Repositories listing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With existing project repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And the given project has the following Repositories:
11
11
  | name | scm_type | address |
12
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
12
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
13
13
  When I ask to find the given repository
14
14
  Then I should get the given repository
@@ -6,10 +6,10 @@ Feature: Repositories listing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With existing project repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And the given project has the following Repositories:
11
11
  | name | scm_type | address |
12
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
12
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
13
13
  When I ask for repositories from the given project
14
14
  Then I should get a list with the given repository
15
- And the repositories should contain the project id
15
+ And the repositories should contain the project id
@@ -6,11 +6,11 @@ Feature: Process
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  When I call the process method for the given repository
16
16
  Then I should get success
@@ -6,12 +6,12 @@ Feature: First processing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the first_processing method for the given repository
@@ -6,12 +6,12 @@ Feature: First processing after
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the first_processing_after method for the given repository and yesterday's date
@@ -6,12 +6,12 @@ Feature: Has processing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository after process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_processing for the given repository
@@ -6,12 +6,12 @@ Feature: Has processing after
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_processing_after for the given repository with yerterday's date
@@ -6,12 +6,12 @@ Feature: Has processing before
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_processing_before for the given repository with tomorrows's date
@@ -6,12 +6,12 @@ Feature: Has ready processing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_ready_processing for the given repository
@@ -6,12 +6,12 @@ Feature: Last processing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the last_processing method for the given repository
@@ -6,12 +6,12 @@ Feature: Last processing before
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the last_processing_before method for the given repository and tomorrow's date
@@ -6,12 +6,12 @@ Feature: Last processing state
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the last_processing_state method for the given repository
@@ -6,12 +6,12 @@ Feature: Last ready processing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after with ready processing
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  When I call the last_ready_processing method for the given repository
@@ -6,12 +6,12 @@ Feature: Processing
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the processing method for the given repository
@@ -20,12 +20,12 @@ Feature: Processing
20
20
  @kalibro_processor_restart @kalibro_configuration_restart
21
21
  Scenario: With one repository just after with ready processing
22
22
  Given I have a project with name "Kalibro"
23
- And I have a kalibro configuration with name "Java"
23
+ And I have a kalibro configuration with name "Conf"
24
24
  And I have a reading group with name "Group"
25
- And I have a loc configuration within the given kalibro configuration
25
+ And I have a "saikuro" configuration within the given kalibro configuration
26
26
  And the given project has the following Repositories:
27
27
  | name | scm_type | address |
28
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
28
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
29
29
  And I call the process method for the given repository
30
30
  And I wait up for a ready processing
31
31
  When I call the processing method for the given repository
@@ -6,12 +6,12 @@ Feature: Processing with date
6
6
  @kalibro_processor_restart @kalibro_configuration_restart
7
7
  Scenario: With one repository just after starting to process and tomorrow's date
8
8
  Given I have a project with name "Kalibro"
9
- And I have a kalibro configuration with name "Java"
9
+ And I have a kalibro configuration with name "Conf"
10
10
  And I have a reading group with name "Group"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
13
  | name | scm_type | address |
14
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
14
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the processing_with_date method for the given repository and tomorrow's date
@@ -20,12 +20,12 @@ Feature: Processing with date
20
20
  @kalibro_processor_restart @kalibro_configuration_restart
21
21
  Scenario: With one repository just after starting to process and yesterday's date
22
22
  Given I have a project with name "Kalibro"
23
- And I have a kalibro configuration with name "Java"
23
+ And I have a kalibro configuration with name "Conf"
24
24
  And I have a reading group with name "Group"
25
- And I have a loc configuration within the given kalibro configuration
25
+ And I have a "saikuro" configuration within the given kalibro configuration
26
26
  And the given project has the following Repositories:
27
27
  | name | scm_type | address |
28
- | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
28
+ | Kalibro | GIT | https://github.com/mezuro/kalibro_processor.git |
29
29
  And I call the process method for the given repository
30
30
  And I wait up to 1 seconds
31
31
  When I call the processing_with_date method for the given repository and yesterday's date
@@ -8,6 +8,6 @@ Feature: Calculating the percentage of metrics used
8
8
  Given I have a kalibro configuration with name "Java"
9
9
  And I have a reading group with name "Group"
10
10
  And I have a metric with name "Lines of Code"
11
- And I have a loc configuration within the given kalibro configuration
11
+ And I have a "saikuro" configuration within the given kalibro configuration
12
12
  When I request the metric_percentage
13
13
  Then I should get a hash containing a real number
@@ -1,7 +1,7 @@
1
1
  Given(/^I have a metric configuration within the given kalibro configuration$/) do
2
2
  @metric_configuration = FactoryGirl.create(:metric_configuration,
3
- {reading_group_id: @reading_group.id,
4
- kalibro_configuration_id: @kalibro_configuration.id})
3
+ reading_group_id: @reading_group.id,
4
+ kalibro_configuration_id: @kalibro_configuration.id)
5
5
  end
6
6
 
7
7
  Given(/^I have a metric configuration within the given kalibro configuration with the given metric$/) do
@@ -11,11 +11,11 @@ Given(/^I have a metric configuration within the given kalibro configuration wit
11
11
  kalibro_configuration_id: @kalibro_configuration.id})
12
12
  end
13
13
 
14
- Given(/^I have a loc configuration within the given kalibro configuration$/) do
14
+ Given(/^I have a "(.+)" configuration within the given kalibro configuration$/) do |metric_code|
15
15
  @metric_configuration = FactoryGirl.create(:metric_configuration,
16
- {metric: FactoryGirl.build(:loc),
17
- reading_group_id: @reading_group.id,
18
- kalibro_configuration_id: @kalibro_configuration.id})
16
+ metric: FactoryGirl.build(metric_code.to_sym),
17
+ reading_group_id: @reading_group.id,
18
+ kalibro_configuration_id: @kalibro_configuration.id)
19
19
  end
20
20
 
21
21
  Given(/^I have a hotspot metric configuration within the given kalibro configuration$/) do
@@ -25,7 +25,7 @@ Given(/^I have a hotspot metric configuration within the given kalibro configura
25
25
  end
26
26
 
27
27
  Given(/^I have a tree metric configuration within the given kalibro configuration$/) do
28
- step "I have a loc configuration within the given kalibro configuration"
28
+ step 'I have a "saikuro" configuration within the given kalibro configuration'
29
29
  @tree_metric_configuration = @metric_configuration
30
30
  end
31
31
 
@@ -23,7 +23,11 @@ module KalibroClient
23
23
  def supported_metrics=(value)
24
24
  @supported_metrics = {}
25
25
  value.each do |code, metric|
26
- @supported_metrics[code] = KalibroClient::Entities::Miscellaneous::NativeMetric.new(metric["name"], metric["code"], metric["scope"], metric["languages"], metric["metric_collector_name"])
26
+ if metric['type'] == 'HotspotMetricSnapshot'
27
+ @supported_metrics[code] = KalibroClient::Entities::Miscellaneous::HotspotMetric.new(metric["name"], metric["code"], metric["languages"], metric["metric_collector_name"])
28
+ else
29
+ @supported_metrics[code] = KalibroClient::Entities::Miscellaneous::NativeMetric.new(metric["name"], metric["code"], metric["scope"], metric["languages"], metric["metric_collector_name"])
30
+ end
27
31
  end
28
32
  end
29
33
 
@@ -15,5 +15,5 @@
15
15
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
  module KalibroClient
18
- VERSION = "2.1.1"
18
+ VERSION = "2.1.2"
19
19
  end
@@ -118,14 +118,17 @@ describe KalibroClient::Entities::Processor::MetricCollectorDetails do
118
118
  end
119
119
  end
120
120
 
121
- describe 'Supported Metrics' do
122
- let(:code_and_metric) { { "total_abstract_classes" => FactoryGirl.build(:loc) } }
123
- let(:code_and_metric_parameter) { { "total_abstract_classes" => FactoryGirl.build(:loc).to_hash } }
121
+ describe 'supported_metrics' do
122
+ let(:code_and_metric) { { "total_abstract_classes" => FactoryGirl.build(:loc),
123
+ "flay" => FactoryGirl.build(:hotspot_metric) } }
124
+ let(:code_and_metric_parameter) { { "total_abstract_classes" => FactoryGirl.build(:loc).to_hash,
125
+ "flay" => FactoryGirl.build(:hotspot_metric).to_hash } }
124
126
 
125
127
  context 'supported_metrics accessors' do
126
128
  it 'should set the value of the array of supported metrics' do
127
129
  subject.supported_metrics = code_and_metric_parameter
128
130
  expect(subject.supported_metrics["total_abstract_classes"].to_hash).to eql(code_and_metric["total_abstract_classes"].to_hash)
131
+ expect(subject.supported_metrics["flay"].to_hash).to eql(code_and_metric["flay"].to_hash)
129
132
  end
130
133
  end
131
134
  end
@@ -55,4 +55,15 @@ FactoryGirl.define do
55
55
 
56
56
  initialize_with { KalibroClient::Entities::Miscellaneous::HotspotMetric.new(name, code, languages, metric_collector_name) }
57
57
  end
58
+
59
+ factory :saikuro, class: KalibroClient::Entities::Miscellaneous::NativeMetric do
60
+ name 'Cyclomatic Complexity'
61
+ code 'saikuro'
62
+ scope 'METHOD'
63
+ description ''
64
+ metric_collector_name 'MetricFu'
65
+ languages nil
66
+
67
+ initialize_with { KalibroClient::Entities::Miscellaneous::NativeMetric.new(name, code, scope, languages, metric_collector_name) }
68
+ end
58
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kalibro_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Quadros Miranda
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-10-19 00:00:00.000000000 Z
14
+ date: 2015-10-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler