kalibro_client 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/features/repository/all.feature +2 -1
- data/features/step_definitions/repository_steps.rb +6 -3
- data/lib/kalibro_client/entities/processor/repository.rb +2 -9
- data/lib/kalibro_client/version.rb +1 -1
- data/spec/entities/base_spec.rb +1 -1
- data/spec/entities/configurations/kalibro_configuration_spec.rb +1 -1
- data/spec/entities/configurations/kalibro_range_spec.rb +1 -1
- data/spec/entities/configurations/reading_group_spec.rb +1 -1
- data/spec/entities/processor/metric_collector_details_spec.rb +2 -2
- data/spec/entities/processor/project_spec.rb +2 -2
- data/spec/entities/processor/repository_spec.rb +3 -8
- data/spec/factories/repositories.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 898bf1fce5f6d3c85b0c2e11e9e8f378f1bfc2e4
|
4
|
+
data.tar.gz: a25aaa22d3f6b64a04ff42a174e730cf230a7c35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6a8c927614532f3eb376b14c074bcc60277ee1460acc729838c04b8144c49094fc9da631140544071b00913ad9ac56b6a9004f3f66a192ac3bcc62fd1b7dd53
|
7
|
+
data.tar.gz: 7ec5f6c9d83e108e80f9013022929e0d8a013dbe4ab208ebcfa5a40dac3a001b08513a75d56d653543c27e1c99db211eed6ce8516bffc227b078c05fca06994b
|
data/.travis.yml
CHANGED
@@ -6,7 +6,7 @@ addons:
|
|
6
6
|
postgresql: "9.3"
|
7
7
|
|
8
8
|
before_script:
|
9
|
-
- git clone https://github.com/mezuro/kalibro_install.git -b v2.
|
9
|
+
- git clone https://github.com/mezuro/kalibro_install.git -b v2.6 kalibro_install
|
10
10
|
- pushd kalibro_install
|
11
11
|
# 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
|
12
12
|
- sudo apt-get remove libzmq3
|
@@ -10,5 +10,6 @@ Feature: Repositories listing
|
|
10
10
|
And the given project has the following Repositories:
|
11
11
|
| name | scm_type | address |
|
12
12
|
| Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
|
13
|
+
And I have an independent repository
|
13
14
|
When I ask for all the repositories
|
14
|
-
Then the response should contain the given
|
15
|
+
Then the response should contain the given repositories
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
Given(/^I have an independent repository$/) do
|
2
|
+
@independent_repository = FactoryGirl.create(:repository, project_id: nil)
|
3
|
+
end
|
2
4
|
|
3
5
|
Given(/^the given project has the following Repositories:$/) do |table|
|
4
6
|
hash = table.hashes.first
|
@@ -59,8 +61,9 @@ Then(/^I should get the given repository$/) do
|
|
59
61
|
expect(@response).to eq(@repository)
|
60
62
|
end
|
61
63
|
|
62
|
-
Then(/^the response should contain the given
|
63
|
-
expect(@response
|
64
|
+
Then(/^the response should contain the given repositories$/) do
|
65
|
+
expect(@response).to include(@repository)
|
66
|
+
expect(@response).to include(@independent_repository)
|
64
67
|
end
|
65
68
|
|
66
69
|
Then(/^the repositories should contain the project id$/) do
|
@@ -19,7 +19,7 @@ module KalibroClient
|
|
19
19
|
module Processor
|
20
20
|
class Repository < KalibroClient::Entities::Processor::Base
|
21
21
|
|
22
|
-
attr_accessor :id, :name, :description, :license, :period, :scm_type, :address, :kalibro_configuration_id, :project_id, :
|
22
|
+
attr_accessor :id, :name, :description, :license, :period, :scm_type, :address, :kalibro_configuration_id, :project_id, :code_directory, :branch
|
23
23
|
|
24
24
|
def self.repository_types
|
25
25
|
request('types', {}, :get)['types'].to_a
|
@@ -113,14 +113,7 @@ module KalibroClient
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def self.all
|
116
|
-
|
117
|
-
repositories = []
|
118
|
-
|
119
|
-
projects.each do |project|
|
120
|
-
repositories.concat(repositories_of(project.id))
|
121
|
-
end
|
122
|
-
|
123
|
-
return repositories
|
116
|
+
create_objects_array_from_hash(request("", {}, :get))
|
124
117
|
end
|
125
118
|
|
126
119
|
def self.branches(url, scm_type)
|
data/spec/entities/base_spec.rb
CHANGED
@@ -356,7 +356,7 @@ describe KalibroClient::Entities::Base do
|
|
356
356
|
describe 'create_objects_array_from_hash' do
|
357
357
|
context 'with nil' do
|
358
358
|
it 'should return an empty array' do
|
359
|
-
expect(KalibroClient::Entities::Base.create_objects_array_from_hash("bases" =>
|
359
|
+
expect(KalibroClient::Entities::Base.create_objects_array_from_hash("bases" => [])).to eq([])
|
360
360
|
end
|
361
361
|
end
|
362
362
|
|
@@ -30,7 +30,7 @@ describe KalibroClient::Entities::Configurations::KalibroConfiguration do
|
|
30
30
|
KalibroClient::Entities::Configurations::KalibroConfiguration.
|
31
31
|
expects(:request).
|
32
32
|
with('', {}, :get).
|
33
|
-
returns({'kalibro_configurations' =>
|
33
|
+
returns({'kalibro_configurations' => []})
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'should return nil' do
|
@@ -76,7 +76,7 @@ describe KalibroClient::Entities::Configurations::KalibroRange do
|
|
76
76
|
KalibroClient::Entities::Configurations::KalibroRange.
|
77
77
|
expects(:request).
|
78
78
|
with('', {}, :get, "metric_configurations/#{metric_configuration.id}").
|
79
|
-
returns({'ranges' =>
|
79
|
+
returns({'ranges' => []})
|
80
80
|
end
|
81
81
|
|
82
82
|
it 'should return a list with the ranges' do
|
@@ -32,7 +32,7 @@ describe KalibroClient::Entities::Configurations::ReadingGroup do
|
|
32
32
|
KalibroClient::Entities::Configurations::ReadingGroup.
|
33
33
|
expects(:request).
|
34
34
|
with('', {}, :get).
|
35
|
-
returns({'reading_groups' =>
|
35
|
+
returns({'reading_groups' => []})
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'should return nil' do
|
@@ -23,7 +23,7 @@ describe KalibroClient::Entities::Processor::MetricCollectorDetails do
|
|
23
23
|
KalibroClient::Entities::Processor::MetricCollectorDetails.
|
24
24
|
expects(:request).
|
25
25
|
with(:names, {}, :get).
|
26
|
-
returns({'names' =>
|
26
|
+
returns({'names' => []})
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should return empty array' do
|
@@ -58,7 +58,7 @@ describe KalibroClient::Entities::Processor::MetricCollectorDetails do
|
|
58
58
|
KalibroClient::Entities::Processor::MetricCollectorDetails.
|
59
59
|
expects(:request).
|
60
60
|
with('', {}, :get).
|
61
|
-
returns({"metric_collector_details" =>
|
61
|
+
returns({"metric_collector_details" => []})
|
62
62
|
end
|
63
63
|
|
64
64
|
it 'should return empty array' do
|
@@ -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
|
@@ -37,7 +37,7 @@ describe KalibroClient::Entities::Processor::Project do
|
|
37
37
|
KalibroClient::Entities::Processor::Project.
|
38
38
|
expects(:request).
|
39
39
|
with('', {}, :get).
|
40
|
-
returns({"projects" =>
|
40
|
+
returns({"projects" => []})
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'should return nil' do
|
@@ -100,16 +100,11 @@ describe KalibroClient::Entities::Processor::Repository do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
describe 'all' do
|
103
|
-
let(:project) { FactoryGirl.build(:project) }
|
104
|
-
|
105
103
|
before :each do
|
106
|
-
KalibroClient::Entities::Processor::Project.
|
107
|
-
expects(:all).
|
108
|
-
returns([project])
|
109
104
|
KalibroClient::Entities::Processor::Repository.
|
110
|
-
expects(:
|
111
|
-
with(
|
112
|
-
returns([subject])
|
105
|
+
expects(:request).
|
106
|
+
with("", {}, :get).
|
107
|
+
returns({'repositories' => [subject.to_hash]})
|
113
108
|
end
|
114
109
|
|
115
110
|
it 'should list all the repositories' do
|
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: 1.
|
4
|
+
version: 1.1.0
|
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-06
|
14
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|