kalibro_gatekeeper_client 0.3.2 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/metric_collector/all_names.feature +8 -0
- data/features/metric_collector/find_by_name.feature +12 -0
- data/features/step_definitions/metric_collector_steps.rb +28 -0
- data/lib/kalibro_gatekeeper_client/entities/{base_tool.rb → metric_collector.rb} +7 -7
- data/lib/kalibro_gatekeeper_client/entities/metric_configuration.rb +4 -4
- data/lib/kalibro_gatekeeper_client/entities.rb +2 -2
- data/lib/kalibro_gatekeeper_client/version.rb +1 -1
- data/spec/entities/{base_tool_spec.rb → metric_collector_spec.rb} +41 -41
- data/spec/factories/{base_tools.rb → metric_collectors.rb} +6 -6
- data/spec/factories/metric_configurations.rb +2 -2
- metadata +15 -15
- data/features/base_tool/all_names.feature +0 -8
- data/features/base_tool/find_by_name.feature +0 -12
- data/features/step_definitions/base_tool_steps.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2608c0043b948d427c8295b29c89a9c1696359af
|
4
|
+
data.tar.gz: b7fbddd6d727b1e7a3729b3c4b0747fb9e759c0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d8b5ccf430eb37250245f3d6c5a0665d094b2cd6a323d3f05736e1935a2ab34db357ab2f800facda853b30ce861ce58a55ce68614ccd3577ef5ef5708681173
|
7
|
+
data.tar.gz: 4032a1103cb3b26f2e9b7a0d3a8eb38ca9eba02c57ebe380c368c948cce7e9821a7fbf409bd03b744ce1995cbf599129fec6d21364aa381c80ebbc445808dbfc
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Feature: All Names
|
2
|
+
In order to be able to have metric collectors
|
3
|
+
As an developer
|
4
|
+
I want to get all the available metric collector names
|
5
|
+
|
6
|
+
Scenario: all metric collectors names
|
7
|
+
When I get all metric collector names
|
8
|
+
Then it should return Analizo string inside of an array
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Find By Names
|
2
|
+
In order to be able to have metric collectors
|
3
|
+
As an developer
|
4
|
+
I want to get a metric collector by name
|
5
|
+
|
6
|
+
Scenario: get a metric collector by name
|
7
|
+
When I search metric collector Analizo by name
|
8
|
+
Then I should get Analizo metric collector
|
9
|
+
|
10
|
+
Scenario: get a metric collector by inexistent name
|
11
|
+
When I search metric collector Avalio by name
|
12
|
+
Then I should get an error
|
@@ -0,0 +1,28 @@
|
|
1
|
+
When(/^I get all metric collector names$/) do
|
2
|
+
@metric_collector_names = KalibroGatekeeperClient::Entities::MetricCollector.all_names
|
3
|
+
end
|
4
|
+
|
5
|
+
When(/^I search metric collector Analizo by name$/) do
|
6
|
+
@result = KalibroGatekeeperClient::Entities::MetricCollector.find_by_name("Analizo")
|
7
|
+
end
|
8
|
+
|
9
|
+
When(/^I search metric collector Avalio by name$/) do
|
10
|
+
@is_error = false
|
11
|
+
begin
|
12
|
+
KalibroGatekeeperClient::Entities::MetricCollector.find_by_name("Avalio")
|
13
|
+
rescue KalibroGatekeeperClient::Errors::RecordNotFound
|
14
|
+
@is_error = true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
Then(/^it should return Analizo string inside of an array$/) do
|
19
|
+
expect(@metric_collector_names.include?("Analizo")).to be_truthy
|
20
|
+
end
|
21
|
+
|
22
|
+
Then(/^I should get Analizo metric collector$/) do
|
23
|
+
expect(@result.name).to eq("Analizo")
|
24
|
+
end
|
25
|
+
|
26
|
+
Then(/^I should get an error$/) do
|
27
|
+
expect(@is_error).to be_truthy
|
28
|
+
end
|
@@ -18,8 +18,8 @@ require "kalibro_gatekeeper_client/entities/model"
|
|
18
18
|
|
19
19
|
module KalibroGatekeeperClient
|
20
20
|
module Entities
|
21
|
-
class
|
22
|
-
attr_accessor :name, :description, :collector_class_name, :supported_metric
|
21
|
+
class MetricCollector < Model
|
22
|
+
attr_accessor :name, :description, :collector_class_name, :supported_metric, :wanted_metrics, :processing
|
23
23
|
|
24
24
|
def supported_metric=(value)
|
25
25
|
@supported_metric = KalibroGatekeeperClient::Entities::Metric.to_objects_array value
|
@@ -33,9 +33,9 @@ module KalibroGatekeeperClient
|
|
33
33
|
supported_metrics.find {|metric| metric.name == name}
|
34
34
|
end
|
35
35
|
|
36
|
-
def self.find_by_name(
|
36
|
+
def self.find_by_name(metric_collector_name)
|
37
37
|
begin
|
38
|
-
new request(:get, {name:
|
38
|
+
new request(:get, {name: metric_collector_name})
|
39
39
|
rescue
|
40
40
|
raise KalibroGatekeeperClient::Errors::RecordNotFound
|
41
41
|
end
|
@@ -43,12 +43,12 @@ module KalibroGatekeeperClient
|
|
43
43
|
|
44
44
|
def self.all_names
|
45
45
|
# FIXME: for some reason, the JSON is not getting automatically parsed
|
46
|
-
JSON.parse(request(:all_names, {}, :get))['
|
46
|
+
JSON.parse(request(:all_names, {}, :get))['metric_collector_names'].to_a
|
47
47
|
end
|
48
48
|
|
49
49
|
def self.all
|
50
|
-
|
51
|
-
|
50
|
+
metric_collectors = all_names
|
51
|
+
metric_collectors.map{ |name| find_by_name(name) }
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# it under the terms of the GNU General Public License as published by
|
6
6
|
# the Free Software Foundation, either version 3 of the License, or
|
7
7
|
# (at your option) any later version.
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
@@ -20,12 +20,12 @@ module KalibroGatekeeperClient
|
|
20
20
|
module Entities
|
21
21
|
class MetricConfiguration < Model
|
22
22
|
|
23
|
-
attr_accessor :id, :code, :metric, :
|
23
|
+
attr_accessor :id, :code, :metric, :metric_collector_name, :weight, :aggregation_form, :reading_group_id, :configuration_id
|
24
24
|
|
25
25
|
def id=(value)
|
26
26
|
@id = value.to_i
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def reading_group_id=(value)
|
30
30
|
@reading_group_id = value.to_i
|
31
31
|
end
|
@@ -67,7 +67,7 @@ module KalibroGatekeeperClient
|
|
67
67
|
end
|
68
68
|
|
69
69
|
private
|
70
|
-
|
70
|
+
|
71
71
|
def save_params
|
72
72
|
{:metric_configuration => self.to_hash, :configuration_id => self.configuration_id}
|
73
73
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# it under the terms of the GNU General Public License as published by
|
6
6
|
# the Free Software Foundation, either version 3 of the License, or
|
7
7
|
# (at your option) any later version.
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# You should have received a copy of the GNU General Public License
|
15
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
16
|
|
17
|
-
require 'kalibro_gatekeeper_client/entities/
|
17
|
+
require 'kalibro_gatekeeper_client/entities/metric_collector'
|
18
18
|
require 'kalibro_gatekeeper_client/entities/configuration'
|
19
19
|
require 'kalibro_gatekeeper_client/entities/date_metric_result'
|
20
20
|
require 'kalibro_gatekeeper_client/entities/date_module_result'
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# it under the terms of the GNU General Public License as published by
|
6
6
|
# the Free Software Foundation, either version 3 of the License, or
|
7
7
|
# (at your option) any later version.
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
@@ -16,114 +16,114 @@
|
|
16
16
|
|
17
17
|
require 'spec_helper'
|
18
18
|
|
19
|
-
describe KalibroGatekeeperClient::Entities::
|
19
|
+
describe KalibroGatekeeperClient::Entities::MetricCollector do
|
20
20
|
describe 'all_names' do
|
21
|
-
context 'with no
|
21
|
+
context 'with no metric collectors' do
|
22
22
|
before :each do
|
23
|
-
KalibroGatekeeperClient::Entities::
|
23
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
24
24
|
expects(:request).
|
25
25
|
with(:all_names, {}, :get).
|
26
26
|
returns({'names' => nil}.to_json)
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should return empty array' do
|
30
|
-
expect(KalibroGatekeeperClient::Entities::
|
30
|
+
expect(KalibroGatekeeperClient::Entities::MetricCollector.all_names).to be_empty
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
context 'with many
|
35
|
-
let(:
|
36
|
-
let(:
|
34
|
+
context 'with many metric collectors' do
|
35
|
+
let(:metric_collector_hash) { FactoryGirl.build(:metric_collector).to_hash }
|
36
|
+
let(:another_metric_collector_hash) { FactoryGirl.build(:another_metric_collector).to_hash }
|
37
37
|
|
38
38
|
before :each do
|
39
|
-
KalibroGatekeeperClient::Entities::
|
39
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
40
40
|
expects(:request).
|
41
41
|
with(:all_names, {}, :get).
|
42
|
-
returns({'
|
42
|
+
returns({'metric_collector_names' => [metric_collector_hash, another_metric_collector_hash]}.to_json)
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'should return the two elements' do
|
46
|
-
names = KalibroGatekeeperClient::Entities::
|
46
|
+
names = KalibroGatekeeperClient::Entities::MetricCollector.all_names
|
47
47
|
|
48
48
|
expect(names.size).to eq(2)
|
49
|
-
expect(names.first).to eq(JSON.parse(
|
50
|
-
expect(names.last).to eq(JSON.parse(
|
49
|
+
expect(names.first).to eq(JSON.parse(metric_collector_hash.to_json))
|
50
|
+
expect(names.last).to eq(JSON.parse(another_metric_collector_hash.to_json))
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
55
|
describe 'all' do
|
56
|
-
context 'with no
|
56
|
+
context 'with no metric collectors' do
|
57
57
|
before :each do
|
58
|
-
KalibroGatekeeperClient::Entities::
|
58
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
59
59
|
expects(:request).
|
60
60
|
with(:all_names, {}, :get).
|
61
61
|
returns({'names' => nil}.to_json)
|
62
62
|
end
|
63
63
|
|
64
64
|
it 'should return empty array' do
|
65
|
-
expect(KalibroGatekeeperClient::Entities::
|
65
|
+
expect(KalibroGatekeeperClient::Entities::MetricCollector.all_names).to be_empty
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
context 'with many
|
70
|
-
let(:
|
71
|
-
let(:
|
69
|
+
context 'with many metric collectors' do
|
70
|
+
let(:metric_collector) { FactoryGirl.build(:metric_collector) }
|
71
|
+
let(:another_metric_collector) { FactoryGirl.build(:another_metric_collector) }
|
72
72
|
|
73
73
|
before :each do
|
74
|
-
KalibroGatekeeperClient::Entities::
|
74
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
75
75
|
expects(:request).
|
76
76
|
with(:all_names, {}, :get).
|
77
|
-
returns({'
|
78
|
-
|
79
|
-
KalibroGatekeeperClient::Entities::
|
77
|
+
returns({'metric_collector_names' => [metric_collector.name, another_metric_collector.name]}.to_json)
|
78
|
+
|
79
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
80
80
|
expects(:request).
|
81
|
-
with(:get, {name:
|
82
|
-
returns(
|
81
|
+
with(:get, {name: metric_collector.name}).
|
82
|
+
returns(metric_collector.to_hash)
|
83
83
|
|
84
|
-
KalibroGatekeeperClient::Entities::
|
84
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
85
85
|
expects(:request).
|
86
|
-
with(:get, {name:
|
87
|
-
returns(
|
86
|
+
with(:get, {name: another_metric_collector.name}).
|
87
|
+
returns(another_metric_collector.to_hash)
|
88
88
|
end
|
89
89
|
|
90
90
|
it 'should return the two elements' do
|
91
|
-
|
91
|
+
metric_collectors = KalibroGatekeeperClient::Entities::MetricCollector.all
|
92
92
|
|
93
|
-
expect(
|
94
|
-
expect(
|
95
|
-
expect(
|
93
|
+
expect(metric_collectors.size).to eq(2)
|
94
|
+
expect(metric_collectors.first.name).to eq(metric_collector.name)
|
95
|
+
expect(metric_collectors.last.name).to eq(another_metric_collector.name)
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
100
|
describe 'find_by_name' do
|
101
|
-
subject { FactoryGirl.build(:
|
101
|
+
subject { FactoryGirl.build(:metric_collector) }
|
102
102
|
|
103
103
|
context 'with an inexistent name' do
|
104
104
|
before :each do
|
105
|
-
KalibroGatekeeperClient::Entities::
|
105
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
106
106
|
expects(:request).
|
107
107
|
with(:get, {name: subject.name}).
|
108
108
|
returns(nil)
|
109
109
|
end
|
110
110
|
|
111
111
|
it 'should raise a RecordNotFound error' do
|
112
|
-
expect { KalibroGatekeeperClient::Entities::
|
112
|
+
expect { KalibroGatekeeperClient::Entities::MetricCollector.find_by_name(subject.name)}.
|
113
113
|
to raise_error(KalibroGatekeeperClient::Errors::RecordNotFound)
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
117
|
context 'with an existent name' do
|
118
118
|
before :each do
|
119
|
-
KalibroGatekeeperClient::Entities::
|
119
|
+
KalibroGatekeeperClient::Entities::MetricCollector.
|
120
120
|
expects(:request).
|
121
121
|
with(:get,{name: subject.name}).
|
122
122
|
returns(subject.to_hash)
|
123
123
|
end
|
124
124
|
|
125
|
-
it 'should return a
|
126
|
-
expect(KalibroGatekeeperClient::Entities::
|
125
|
+
it 'should return a metric_collector' do
|
126
|
+
expect(KalibroGatekeeperClient::Entities::MetricCollector.find_by_name(subject.name).name).to eq(subject.name)
|
127
127
|
end
|
128
128
|
end
|
129
129
|
end
|
@@ -152,11 +152,11 @@ describe KalibroGatekeeperClient::Entities::BaseTool do
|
|
152
152
|
end
|
153
153
|
end
|
154
154
|
end
|
155
|
-
|
155
|
+
|
156
156
|
describe 'metric' do
|
157
|
-
subject { FactoryGirl.build(:
|
157
|
+
subject { FactoryGirl.build(:metric_collector) }
|
158
158
|
let(:metric) { subject.supported_metrics.first }
|
159
|
-
|
159
|
+
|
160
160
|
it 'should return nil with an inexistent name' do
|
161
161
|
expect(subject.metric("fake name")).to be_nil
|
162
162
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# it under the terms of the GNU General Public License as published by
|
6
6
|
# the Free Software Foundation, either version 3 of the License, or
|
7
7
|
# (at your option) any later version.
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
@@ -15,17 +15,17 @@
|
|
15
15
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
16
|
|
17
17
|
FactoryGirl.define do
|
18
|
-
factory :
|
18
|
+
factory :metric_collector, class: KalibroGatekeeperClient::Entities::MetricCollector do
|
19
19
|
name "Analizo"
|
20
20
|
description "Analizo is a suite of source code analysis tools."
|
21
21
|
collector_class_name "org.analizo.AnalizoMetricCollector"
|
22
22
|
supported_metric { [FactoryGirl.build(:metric), FactoryGirl.build(:metric)] }
|
23
|
-
|
24
|
-
trait :
|
23
|
+
|
24
|
+
trait :another_metric_collector do
|
25
25
|
name "Avalio"
|
26
26
|
description "Avalio is another source code analyser that hasn't been developed yet."
|
27
27
|
end
|
28
28
|
|
29
|
-
factory :
|
30
|
-
end
|
29
|
+
factory :another_metric_collector, traits: [:another_metric_collector]
|
30
|
+
end
|
31
31
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# it under the terms of the GNU General Public License as published by
|
6
6
|
# the Free Software Foundation, either version 3 of the License, or
|
7
7
|
# (at your option) any later version.
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
@@ -19,7 +19,7 @@ FactoryGirl.define do
|
|
19
19
|
id 1
|
20
20
|
code 'total_abstract_classes'
|
21
21
|
metric {FactoryGirl.build(:metric)}
|
22
|
-
|
22
|
+
metric_collector_name "Analizo"
|
23
23
|
weight 1
|
24
24
|
aggregation_form "AVERAGE"
|
25
25
|
reading_group_id 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kalibro_gatekeeper_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Araújo Martinez
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-09-
|
14
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -176,10 +176,10 @@ files:
|
|
176
176
|
- README.md
|
177
177
|
- Rakefile
|
178
178
|
- cucumber.yml
|
179
|
-
- features/base_tool/all_names.feature
|
180
|
-
- features/base_tool/find_by_name.feature
|
181
179
|
- features/configuration/all.feature
|
182
180
|
- features/configuration/creation.feature
|
181
|
+
- features/metric_collector/all_names.feature
|
182
|
+
- features/metric_collector/find_by_name.feature
|
183
183
|
- features/metric_configuration/find.feature
|
184
184
|
- features/metric_configuration/metric_configurations_of.feature
|
185
185
|
- features/metric_result/descendant_results.feature
|
@@ -222,8 +222,8 @@ files:
|
|
222
222
|
- features/repository/of.feature
|
223
223
|
- features/repository/process.feature
|
224
224
|
- features/repository/types.feature
|
225
|
-
- features/step_definitions/base_tool_steps.rb
|
226
225
|
- features/step_definitions/configuration_steps.rb
|
226
|
+
- features/step_definitions/metric_collector_steps.rb
|
227
227
|
- features/step_definitions/metric_configuration_steps.rb
|
228
228
|
- features/step_definitions/metric_result_steps.rb
|
229
229
|
- features/step_definitions/metric_steps.rb
|
@@ -239,11 +239,11 @@ files:
|
|
239
239
|
- kalibro_gatekeeper_client.gemspec
|
240
240
|
- lib/kalibro_gatekeeper_client.rb
|
241
241
|
- lib/kalibro_gatekeeper_client/entities.rb
|
242
|
-
- lib/kalibro_gatekeeper_client/entities/base_tool.rb
|
243
242
|
- lib/kalibro_gatekeeper_client/entities/configuration.rb
|
244
243
|
- lib/kalibro_gatekeeper_client/entities/date_metric_result.rb
|
245
244
|
- lib/kalibro_gatekeeper_client/entities/date_module_result.rb
|
246
245
|
- lib/kalibro_gatekeeper_client/entities/metric.rb
|
246
|
+
- lib/kalibro_gatekeeper_client/entities/metric_collector.rb
|
247
247
|
- lib/kalibro_gatekeeper_client/entities/metric_configuration.rb
|
248
248
|
- lib/kalibro_gatekeeper_client/entities/metric_configuration_snapshot.rb
|
249
249
|
- lib/kalibro_gatekeeper_client/entities/metric_result.rb
|
@@ -277,10 +277,10 @@ files:
|
|
277
277
|
- lib/kalibro_gatekeeper_client/kalibro_cucumber_helpers/scripts/return_kalibro_from_test_mode.sh
|
278
278
|
- lib/kalibro_gatekeeper_client/version.rb
|
279
279
|
- lib/rake/test_task.rb
|
280
|
-
- spec/entities/base_tool_spec.rb
|
281
280
|
- spec/entities/configuration_spec.rb
|
282
281
|
- spec/entities/date_metric_result_spec.rb
|
283
282
|
- spec/entities/date_module_result_spec.rb
|
283
|
+
- spec/entities/metric_collector_spec.rb
|
284
284
|
- spec/entities/metric_configuration_snapshot_spec.rb
|
285
285
|
- spec/entities/metric_configuration_spec.rb
|
286
286
|
- spec/entities/metric_result_spec.rb
|
@@ -298,10 +298,10 @@ files:
|
|
298
298
|
- spec/entities/repository_spec.rb
|
299
299
|
- spec/entities/stack_trace_element_spec.rb
|
300
300
|
- spec/entities/throwable_spec.rb
|
301
|
-
- spec/factories/base_tools.rb
|
302
301
|
- spec/factories/configurations.rb
|
303
302
|
- spec/factories/date_metric_results.rb
|
304
303
|
- spec/factories/date_module_results.rb
|
304
|
+
- spec/factories/metric_collectors.rb
|
305
305
|
- spec/factories/metric_configurations.rb
|
306
306
|
- spec/factories/metric_configurations_snapshot.rb
|
307
307
|
- spec/factories/metric_results.rb
|
@@ -344,9 +344,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
346
346
|
requirements:
|
347
|
-
- - "
|
347
|
+
- - ">"
|
348
348
|
- !ruby/object:Gem::Version
|
349
|
-
version:
|
349
|
+
version: 1.3.1
|
350
350
|
requirements: []
|
351
351
|
rubyforge_project:
|
352
352
|
rubygems_version: 2.2.2
|
@@ -355,10 +355,10 @@ specification_version: 4
|
|
355
355
|
summary: KalibroGatekeeperClient is a communication interface with the KalibroGateKeeper
|
356
356
|
service.
|
357
357
|
test_files:
|
358
|
-
- features/base_tool/all_names.feature
|
359
|
-
- features/base_tool/find_by_name.feature
|
360
358
|
- features/configuration/all.feature
|
361
359
|
- features/configuration/creation.feature
|
360
|
+
- features/metric_collector/all_names.feature
|
361
|
+
- features/metric_collector/find_by_name.feature
|
362
362
|
- features/metric_configuration/find.feature
|
363
363
|
- features/metric_configuration/metric_configurations_of.feature
|
364
364
|
- features/metric_result/descendant_results.feature
|
@@ -401,8 +401,8 @@ test_files:
|
|
401
401
|
- features/repository/of.feature
|
402
402
|
- features/repository/process.feature
|
403
403
|
- features/repository/types.feature
|
404
|
-
- features/step_definitions/base_tool_steps.rb
|
405
404
|
- features/step_definitions/configuration_steps.rb
|
405
|
+
- features/step_definitions/metric_collector_steps.rb
|
406
406
|
- features/step_definitions/metric_configuration_steps.rb
|
407
407
|
- features/step_definitions/metric_result_steps.rb
|
408
408
|
- features/step_definitions/metric_steps.rb
|
@@ -415,10 +415,10 @@ test_files:
|
|
415
415
|
- features/step_definitions/repository_steps.rb
|
416
416
|
- features/support/env.rb
|
417
417
|
- features/support/kalibro_cucumber_helpers.yml.sample
|
418
|
-
- spec/entities/base_tool_spec.rb
|
419
418
|
- spec/entities/configuration_spec.rb
|
420
419
|
- spec/entities/date_metric_result_spec.rb
|
421
420
|
- spec/entities/date_module_result_spec.rb
|
421
|
+
- spec/entities/metric_collector_spec.rb
|
422
422
|
- spec/entities/metric_configuration_snapshot_spec.rb
|
423
423
|
- spec/entities/metric_configuration_spec.rb
|
424
424
|
- spec/entities/metric_result_spec.rb
|
@@ -436,10 +436,10 @@ test_files:
|
|
436
436
|
- spec/entities/repository_spec.rb
|
437
437
|
- spec/entities/stack_trace_element_spec.rb
|
438
438
|
- spec/entities/throwable_spec.rb
|
439
|
-
- spec/factories/base_tools.rb
|
440
439
|
- spec/factories/configurations.rb
|
441
440
|
- spec/factories/date_metric_results.rb
|
442
441
|
- spec/factories/date_module_results.rb
|
442
|
+
- spec/factories/metric_collectors.rb
|
443
443
|
- spec/factories/metric_configurations.rb
|
444
444
|
- spec/factories/metric_configurations_snapshot.rb
|
445
445
|
- spec/factories/metric_results.rb
|
@@ -1,12 +0,0 @@
|
|
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
|
@@ -1,28 +0,0 @@
|
|
1
|
-
When(/^I get all base tool names$/) do
|
2
|
-
@base_tool_names = KalibroGatekeeperClient::Entities::BaseTool.all_names
|
3
|
-
end
|
4
|
-
|
5
|
-
When(/^I search base tool Analizo by name$/) do
|
6
|
-
@result = KalibroGatekeeperClient::Entities::BaseTool.find_by_name("Analizo")
|
7
|
-
end
|
8
|
-
|
9
|
-
When(/^I search base tool Avalio by name$/) do
|
10
|
-
@is_error = false
|
11
|
-
begin
|
12
|
-
KalibroGatekeeperClient::Entities::BaseTool.find_by_name("Avalio")
|
13
|
-
rescue KalibroGatekeeperClient::Errors::RecordNotFound
|
14
|
-
@is_error = true
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
Then(/^it should return Analizo string inside of an array$/) do
|
19
|
-
expect(@base_tool_names.include?("Analizo")).to be_truthy
|
20
|
-
end
|
21
|
-
|
22
|
-
Then(/^I should get Analizo base tool$/) do
|
23
|
-
expect(@result.name).to eq("Analizo")
|
24
|
-
end
|
25
|
-
|
26
|
-
Then(/^I should get an error$/) do
|
27
|
-
expect(@is_error).to be_truthy
|
28
|
-
end
|