kalibro_entities 0.0.1.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +21 -0
- data/AUTHORS +4 -0
- data/COPYING +674 -0
- data/COPYING.LESSER +165 -0
- data/Gemfile +4 -0
- data/README.md +77 -0
- data/Rakefile +6 -0
- data/cucumber.yml +1 -0
- data/features/base_tool/all_names.feature +8 -0
- data/features/base_tool/find_by_name.feature +12 -0
- data/features/configuration/all.feature +10 -0
- data/features/metric_configuration/find.feature +18 -0
- data/features/metric_configuration/metric_configurations_of.feature +18 -0
- data/features/metric_result/descendant_results.feature +19 -0
- data/features/metric_result/history_of.feature +20 -0
- data/features/metric_result/metric_results_of.feature +19 -0
- data/features/module_result/children.feature +18 -0
- data/features/module_result/find.feature +15 -0
- data/features/module_result/history_of.feature +11 -0
- data/features/processing/first_processing_after.feature +18 -0
- data/features/processing/first_processing_of.feature +18 -0
- data/features/processing/has_processing.feature +18 -0
- data/features/processing/has_processing_after.feature +18 -0
- data/features/processing/has_processing_before.feature +18 -0
- data/features/processing/has_ready_processing.feature +18 -0
- data/features/processing/last_processing_before.feature +18 -0
- data/features/processing/last_processing_of.feature +18 -0
- data/features/processing/last_processing_state_of.feature +18 -0
- data/features/processing/last_ready_processing_of.feature +18 -0
- data/features/processing/processing_of.feature +32 -0
- data/features/processing/processing_with_date_of.feature +32 -0
- data/features/project/all.feature +10 -0
- data/features/project/creation.feature +9 -0
- data/features/project/destroy.feature +10 -0
- data/features/project/exists.feature +9 -0
- data/features/project/find.feature +10 -0
- data/features/range/ranges_of.feature +22 -0
- data/features/range/save.feature +32 -0
- data/features/reading/find.feature +11 -0
- data/features/reading/readings_of.feature +11 -0
- data/features/reading_group/all.feature +10 -0
- data/features/repository/all.feature +14 -0
- data/features/repository/cancel_processing.feature +14 -0
- data/features/repository/find.feature +14 -0
- data/features/repository/of.feature +15 -0
- data/features/repository/process.feature +16 -0
- data/features/repository/types.feature +9 -0
- data/features/step_definitions/base_tool_steps.rb +28 -0
- data/features/step_definitions/configuration_steps.rb +11 -0
- data/features/step_definitions/metric_configuration_steps.rb +52 -0
- data/features/step_definitions/metric_result_steps.rb +29 -0
- data/features/step_definitions/metric_steps.rb +3 -0
- data/features/step_definitions/module_result_steps.rb +30 -0
- data/features/step_definitions/processing_steps.rb +91 -0
- data/features/step_definitions/project_steps.rb +48 -0
- data/features/step_definitions/range_steps.rb +41 -0
- data/features/step_definitions/reading_group_steps.rb +19 -0
- data/features/step_definitions/reading_steps.rb +20 -0
- data/features/step_definitions/repository_steps.rb +57 -0
- data/features/support/env.rb +25 -0
- data/features/support/kalibro_cucumber_helpers.yml.sample +10 -0
- data/kalibro_entities.gemspec +48 -0
- data/lib/kalibro_entities.rb +61 -0
- data/lib/kalibro_entities/entities.rb +37 -0
- data/lib/kalibro_entities/entities/base_tool.rb +54 -0
- data/lib/kalibro_entities/entities/configuration.rb +33 -0
- data/lib/kalibro_entities/entities/date_metric_result.rb +39 -0
- data/lib/kalibro_entities/entities/date_module_result.rb +39 -0
- data/lib/kalibro_entities/entities/metric.rb +21 -0
- data/lib/kalibro_entities/entities/metric_configuration.rb +70 -0
- data/lib/kalibro_entities/entities/metric_configuration_snapshot.rb +57 -0
- data/lib/kalibro_entities/entities/metric_result.rb +63 -0
- data/lib/kalibro_entities/entities/model.rb +162 -0
- data/lib/kalibro_entities/entities/module.rb +27 -0
- data/lib/kalibro_entities/entities/module_result.rb +69 -0
- data/lib/kalibro_entities/entities/process_time.rb +31 -0
- data/lib/kalibro_entities/entities/processing.rb +113 -0
- data/lib/kalibro_entities/entities/project.rb +34 -0
- data/lib/kalibro_entities/entities/range.rb +75 -0
- data/lib/kalibro_entities/entities/range_snapshot.rb +37 -0
- data/lib/kalibro_entities/entities/reading.rb +51 -0
- data/lib/kalibro_entities/entities/reading_group.rb +43 -0
- data/lib/kalibro_entities/entities/repository.rb +78 -0
- data/lib/kalibro_entities/entities/repository_observer.rb +50 -0
- data/lib/kalibro_entities/entities/stack_trace_element.rb +31 -0
- data/lib/kalibro_entities/entities/throwable.rb +42 -0
- data/lib/kalibro_entities/errors.rb +18 -0
- data/lib/kalibro_entities/errors/record_not_found.rb +22 -0
- data/lib/kalibro_entities/errors/standard.rb +24 -0
- data/lib/kalibro_entities/helpers/aggregation_options.rb +25 -0
- data/lib/kalibro_entities/helpers/hash_converters.rb +48 -0
- data/lib/kalibro_entities/helpers/request_methods.rb +47 -0
- data/lib/kalibro_entities/helpers/xml_converters.rb +20 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers.rb +40 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/configuration.rb +39 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/hooks.rb +50 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/delete_all_kalibro_entries.sh +23 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/prepare_kalibro_query_file.sh +38 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/put_kalibro_on_test_mode.sh +35 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/return_kalibro_from_test_mode.sh +26 -0
- data/lib/kalibro_entities/version.rb +19 -0
- data/lib/rake/test_task.rb +57 -0
- data/spec/entities/base_tool_spec.rb +168 -0
- data/spec/entities/configuration_spec.rb +61 -0
- data/spec/entities/date_metric_result_spec.rb +62 -0
- data/spec/entities/date_module_result_spec.rb +61 -0
- data/spec/entities/metric_configuration_snapshot_spec.rb +107 -0
- data/spec/entities/metric_configuration_spec.rb +149 -0
- data/spec/entities/metric_result_spec.rb +193 -0
- data/spec/entities/metric_spec.rb +47 -0
- data/spec/entities/model_spec.rb +275 -0
- data/spec/entities/module_result_spec.rb +135 -0
- data/spec/entities/process_time_spec.rb +33 -0
- data/spec/entities/processing_spec.rb +334 -0
- data/spec/entities/project_spec.rb +68 -0
- data/spec/entities/range_snapshot_spec.rb +50 -0
- data/spec/entities/range_spec.rb +181 -0
- data/spec/entities/reading_group_spec.rb +90 -0
- data/spec/entities/reading_spec.rb +106 -0
- data/spec/entities/repository_observer_spec.rb +123 -0
- data/spec/entities/repository_spec.rb +167 -0
- data/spec/entities/stack_trace_element_spec.rb +26 -0
- data/spec/entities/throwable_spec.rb +51 -0
- data/spec/factories/base_tools.rb +31 -0
- data/spec/factories/configurations.rb +29 -0
- data/spec/factories/date_metric_results.rb +28 -0
- data/spec/factories/date_module_results.rb +22 -0
- data/spec/factories/metric_configurations.rb +28 -0
- data/spec/factories/metric_configurations_snapshot.rb +26 -0
- data/spec/factories/metric_results.rb +24 -0
- data/spec/factories/metrics.rb +35 -0
- data/spec/factories/models.rb +20 -0
- data/spec/factories/module_results.rb +33 -0
- data/spec/factories/modules.rb +22 -0
- data/spec/factories/process_times.rb +27 -0
- data/spec/factories/processings.rb +25 -0
- data/spec/factories/projects.rb +29 -0
- data/spec/factories/ranges.rb +30 -0
- data/spec/factories/ranges_snapshot.rb +26 -0
- data/spec/factories/reading_groups.rb +23 -0
- data/spec/factories/readings.rb +25 -0
- data/spec/factories/repositories.rb +34 -0
- data/spec/factories/repository_observers.rb +24 -0
- data/spec/factories/stack_trace_elements.rb +24 -0
- data/spec/factories/throwables.rb +23 -0
- data/spec/helpers/aggregation_options_spec.rb +31 -0
- data/spec/helpers/hash_converters_spec.rb +111 -0
- data/spec/helpers/xml_converters_spec.rb +64 -0
- data/spec/kalibro_entities_spec.rb +108 -0
- data/spec/savon/fixtures/config.yml +1 -0
- data/spec/savon/fixtures/invalid_config.yml +2 -0
- data/spec/savon/fixtures/project/does_not_exists.xml +1 -0
- data/spec/savon/savon_test_helper.rb +14 -0
- data/spec/spec_helper.rb +60 -0
- metadata +461 -0
data/COPYING.LESSER
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# KalibroEntities
|
2
|
+
|
3
|
+
[](https://travis-ci.org/mezuro/kalibro_entities)
|
4
|
+
[](https://codeclimate.com/github/mezuro/kalibro_entities)
|
5
|
+
[](https://coveralls.io/r/mezuro/kalibro_entities)
|
6
|
+
|
7
|
+
KalibroEntities is a Ruby gem intended to be an interface for Ruby applications who want to use the open source code analysis webservice Kalibro (http://gitorious.org/kalibro/kalibro).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'kalibro_entities'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install kalibro_entities
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
KalibroEntities is intended to be an easy interface that encapsulates the usage of all the Kalibro service's endpoints. So have a look at the available entities at `lib/kalibro_entities/entities`.
|
26
|
+
|
27
|
+
All the entities are subclasses from `Model`, so have a good look at it. Specially notice that all the entities have methods:
|
28
|
+
|
29
|
+
* `save`
|
30
|
+
* `exists?`
|
31
|
+
* `find`
|
32
|
+
* `destroy`
|
33
|
+
|
34
|
+
These four methods should be useful.
|
35
|
+
|
36
|
+
We hope to make available soon a full documentation on RDoc that will make easier to understand all this.
|
37
|
+
|
38
|
+
A good example on how to get everything from KalibroEntities should be Mezuro. So, have a look there for some examples.
|
39
|
+
|
40
|
+
### Cucumber helpers
|
41
|
+
|
42
|
+
Acceptance tests with the Kalibro webservice can be painful. But we've created cucumber hooks that make it easy.
|
43
|
+
|
44
|
+
Just add to your `env.rb` the following:
|
45
|
+
|
46
|
+
require 'kalibro_entities/kalibro_cucumber_helpers/hooks.rb'
|
47
|
+
|
48
|
+
The test configurations available are:
|
49
|
+
|
50
|
+
* database
|
51
|
+
* user
|
52
|
+
* password
|
53
|
+
* psql_file_path
|
54
|
+
* query_file_path
|
55
|
+
* kalibro_home
|
56
|
+
* tomcat_user
|
57
|
+
* tomcat_group
|
58
|
+
* tomcat_restart_command
|
59
|
+
|
60
|
+
An example on how to change them is:
|
61
|
+
|
62
|
+
KalibroEntities::KalibroCucumberHelpers.configure do |config|
|
63
|
+
config.database = "kalibro_test"
|
64
|
+
end
|
65
|
+
|
66
|
+
We hope to make available soon an YAML parser for test configurations.
|
67
|
+
|
68
|
+
## Contributing
|
69
|
+
|
70
|
+
0. Install RVM (rvm.io)
|
71
|
+
1. Fork it
|
72
|
+
2. Run `bundle install`
|
73
|
+
3. Create your feature branch (`git checkout -b my-new-feature`)
|
74
|
+
4. Make your modifications and changes
|
75
|
+
5. Commit your changes (`git commit -am 'Add some feature'`)
|
76
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
77
|
+
7. Create new Pull Request
|
data/Rakefile
ADDED
data/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
default: --tag ~@wip
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Feature: All Names
|
2
|
+
In order to be able to have base tools
|
3
|
+
As an developer
|
4
|
+
I want to get all the available base tool names
|
5
|
+
|
6
|
+
Scenario: all base tools names
|
7
|
+
When I get all base tool names
|
8
|
+
Then it should return Checkstyle and Analizo strings inside of an array
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Find By Names
|
2
|
+
In order to be able to have base tools
|
3
|
+
As an developer
|
4
|
+
I want to get a base tool by name
|
5
|
+
|
6
|
+
Scenario: get a base tool by name
|
7
|
+
When I search base tool Analizo by name
|
8
|
+
Then I should get Analizo base tool
|
9
|
+
|
10
|
+
Scenario: get a base tool by inexistent name
|
11
|
+
When I search base tool Avalio by name
|
12
|
+
Then I should get an error
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: All
|
2
|
+
In order to be able to have configurations
|
3
|
+
As an developer
|
4
|
+
I want to get all the available configurations
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: one configuration
|
8
|
+
Given I have a configuration with name "Java"
|
9
|
+
When I get all the configurations
|
10
|
+
Then I should get a list with the given configuration
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: Find
|
2
|
+
In order to be able to have configurations
|
3
|
+
As an developer
|
4
|
+
I want to find metric_configurations
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: find a valid metric configuration
|
8
|
+
Given I have a configuration with name "Kalibro for Java"
|
9
|
+
And I have a reading group with name "Group"
|
10
|
+
And I have a metric configuration within the given configuration
|
11
|
+
When I search a metric configuration with the same id of the given metric configuration
|
12
|
+
Then it should return the same metric configuration as the given one
|
13
|
+
|
14
|
+
|
15
|
+
@kalibro_restart
|
16
|
+
Scenario: try to find an inexistent metric configuration
|
17
|
+
When I search an inexistent metric configuration
|
18
|
+
Then I should get an error
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: MetricConfigurationsOf
|
2
|
+
In order to be able to have configurations
|
3
|
+
As an developer
|
4
|
+
I want to get all metric_configurations of a configuration
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: get a list of all metric configurations of some configuration
|
8
|
+
Given I have a configuration with name "Kalibro for Java"
|
9
|
+
And I have a reading group with name "Group"
|
10
|
+
And I have a metric configuration within the given configuration
|
11
|
+
When I request all metric configurations of the given configuration
|
12
|
+
Then I should get a list of its metric configurations
|
13
|
+
|
14
|
+
@kalibro_restart
|
15
|
+
Scenario: get an empty list for a configuration without metric configurations
|
16
|
+
Given I have a configuration with name "Kalibro for Java"
|
17
|
+
When I request all metric configurations of the given configuration
|
18
|
+
Then I should get an empty list of metric configurations
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Feature: Descendant results
|
2
|
+
In order to be able to get the descendant results of a processed repository
|
3
|
+
As a developer
|
4
|
+
I want to get the descendant metric results of the given module result
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: when there is a metric result
|
8
|
+
Given I have a project with name "Kalibro"
|
9
|
+
And I have a configuration with name "Java"
|
10
|
+
And I have a reading group with name "Group"
|
11
|
+
And I have a loc configuration within the given configuration
|
12
|
+
And the given project has the following Repositories:
|
13
|
+
| name | type | address |
|
14
|
+
| SBKing | GIT | https://git.gitorious.org/sbking/sbking.git |
|
15
|
+
And I call the process method for the given repository
|
16
|
+
And I wait up for a ready processing
|
17
|
+
And I call the first_processing_of method for the given repository
|
18
|
+
And I search a metric result with descendant results for the given metric result
|
19
|
+
Then I should get a Float list
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Feature: history of
|
2
|
+
In order to be able to get the date metric results of a processed repository
|
3
|
+
As a developer
|
4
|
+
I want to get the date metric results of the given module result and the given metric name
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: when there is a metric result
|
8
|
+
Given I have a project with name "Kalibro"
|
9
|
+
And I have a configuration with name "Java"
|
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 metric configuration within the given configuration with the given metric
|
13
|
+
And the given project has the following Repositories:
|
14
|
+
| name | type | address |
|
15
|
+
| SBKing | GIT | https://git.gitorious.org/sbking/sbking.git |
|
16
|
+
And I call the process method for the given repository
|
17
|
+
And I wait up for a ready processing
|
18
|
+
And I call the first_processing_of method for the given repository
|
19
|
+
When I call the history of method with the metric name and the results root id of the given processing
|
20
|
+
Then I should get a list of date metric results
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Feature: Metric results of
|
2
|
+
In order to be able to get the metric results of a processed repository
|
3
|
+
As a developer
|
4
|
+
I want to get the metric results of the given module result
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: when there is a metric result
|
8
|
+
Given I have a project with name "Kalibro"
|
9
|
+
And I have a configuration with name "Java"
|
10
|
+
And I have a reading group with name "Group"
|
11
|
+
And I have a metric configuration within the given configuration
|
12
|
+
And the given project has the following Repositories:
|
13
|
+
| name | type | address |
|
14
|
+
| SBKing | GIT | https://git.gitorious.org/sbking/sbking.git |
|
15
|
+
And I call the process method for the given repository
|
16
|
+
And I wait up for a ready processing
|
17
|
+
And I call the first_processing_of method for the given repository
|
18
|
+
When I call the metric results of method with the results root id of the given processing
|
19
|
+
Then I should get a list of metric results
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: Children
|
2
|
+
In order to be able to have the children of a module result
|
3
|
+
As an developer
|
4
|
+
I want to find children module results
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: find a valid module result
|
8
|
+
Given I have a project with name "Kalibro"
|
9
|
+
And I have a configuration with name "Java"
|
10
|
+
And I have a reading group with name "Group"
|
11
|
+
And I have a metric configuration within the given configuration
|
12
|
+
And the given project has the following Repositories:
|
13
|
+
| name | type | address |
|
14
|
+
| Kalibro | GIT | https://github.com/mezuro/kalibro.git |
|
15
|
+
And I call the process method for the given repository
|
16
|
+
And I wait up for a ready processing
|
17
|
+
When I ask for the children of the processing root module result
|
18
|
+
Then I should get a list with the children module results
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: Find
|
2
|
+
In order to be able to have module result
|
3
|
+
As an developer
|
4
|
+
I want to find module results
|
5
|
+
|
6
|
+
@wip
|
7
|
+
@kalibro_restart
|
8
|
+
Scenario: find a valid module result
|
9
|
+
Given I have a module result
|
10
|
+
When I ask a module result with the same id of the given module result
|
11
|
+
Then I should get the given module result
|
12
|
+
|
13
|
+
Scenario: get a module result by inexistent name
|
14
|
+
When I ask for an inexistent module result
|
15
|
+
Then I should get an error
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: /history of
|
2
|
+
In order to be able to have the history of a module result
|
3
|
+
As an developer
|
4
|
+
I want to get the history of module results
|
5
|
+
|
6
|
+
@wip
|
7
|
+
@kalibro_restart
|
8
|
+
Scenario: get the history of a module result
|
9
|
+
Given I have a module result
|
10
|
+
When I ask for the history of the given module result
|
11
|
+
Then I should get a list with date module results
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: First processing after
|
2
|
+
In order to be able to retrieve processing results
|
3
|
+
As a developer
|
4
|
+
I want to be able to retrieve the first processing after a given date
|
5
|
+
|
6
|
+
@kalibro_restart
|
7
|
+
Scenario: With one repository just after starting to process
|
8
|
+
Given I have a project with name "Kalibro"
|
9
|
+
And I have a configuration with name "Java"
|
10
|
+
And I have a reading group with name "Group"
|
11
|
+
And I have a metric configuration within the given configuration
|
12
|
+
And the given project has the following Repositories:
|
13
|
+
| name | type | address |
|
14
|
+
| Kalibro | GIT | https://github.com/mezuro/kalibro.git |
|
15
|
+
And I call the process method for the given repository
|
16
|
+
And I wait up to 1 seconds
|
17
|
+
When I call the first_processing_after method for the given repository and yesterday's date
|
18
|
+
Then I should get a Processing
|