kalibro_client 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 387feb2d4820e6db152bcdeb24cdf4ee45be437b
4
- data.tar.gz: 104d850c560ce31ba13f59091848127624608068
3
+ metadata.gz: 445483700c4558a87e28642b871c69e50bf92f17
4
+ data.tar.gz: 74b45e5f4d7f12b4ad7fc22744cd38658fd029f6
5
5
  SHA512:
6
- metadata.gz: 84eb2753a64cf3b0ae885621400769cc62922ae8b7653b4c9529eb56a8721c8160146640db39d4b35fd532eb31421781a4439b21719dbae142361818660224e6
7
- data.tar.gz: f5e9b407b3f7d03c0d1fe4eab8014b18dfe3ae70eaea217dd67992ed6698dc547b33ae11143d95378a9f2f78b75558695140908010c623aaf386fa237d573545
6
+ metadata.gz: 2e434bee814c6ccff290e4d16e8509341f4d2eca526fd81206325d8c426710bb6518281cdd03ebad652be15a18fae56ac897efacf5f1298436c39049f3fdf971
7
+ data.tar.gz: a3fa03fb905c25d1786ab1cbc7c0a6edf8bbf1874ca341275f50cf90ed781d7fa7ed5d8d65130c3dce29ac64babdadf76c0ea4f3ab81efa71eb6a6ac71f7d61f
data/.travis.yml CHANGED
@@ -6,7 +6,7 @@ addons:
6
6
  postgresql: "9.3"
7
7
 
8
8
  before_script:
9
- - git clone https://gist.github.com/6179925.git -b v2.0 kalibro_install
9
+ - git clone https://gist.github.com/6179925.git -b v2.4 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
data/AUTHORS CHANGED
@@ -1,4 +1,21 @@
1
+ Daniel Quadros Miranda
1
2
  Diego Araújo Martinez
2
- Fellipe Souto Sampaio
3
+ Heitor Reis Ribeiro
3
4
  Rafael Reggiani Manzo
4
- Renan Fichberg
5
+
6
+ UnB 2015 Team:
7
+ Álvaro Fernando Souza
8
+ Eduardo Brasil
9
+ Lucas dos Santos
10
+ Maria Luciene
11
+ Maxwell Almeida
12
+ Parley Pacheco Martins
13
+
14
+ Former:
15
+ Alessandro Palmeira
16
+ Carlos Morais
17
+ Daniel Paulino Alves
18
+ Guilherme Rojas
19
+ Fellipe Souto Sampaio
20
+ João da Silva
21
+ Renan Fichberg
@@ -0,0 +1,13 @@
1
+ Feature: Calculating the percentage of metrics used
2
+ In order to be able to calculate the metric percentage used
3
+ As a developer
4
+ I want to know which metrics are more used
5
+
6
+ @kalibro_configuration_restart
7
+ Scenario: With an used metric
8
+ Given I have a kalibro configuration with name "Java"
9
+ And I have a reading group with name "Group"
10
+ And I have a metric with name "Lines of Code"
11
+ And I have a loc configuration within the given kalibro configuration
12
+ When I request the metric_percentage
13
+ Then I should get a hash containing a real number
@@ -0,0 +1,7 @@
1
+ When (/^I request the metric_percentage$/) do
2
+ @metric_percentage = KalibroClient::Entities::Configurations::Statistic.metric_percentage(@metric.code)
3
+ end
4
+
5
+ Then (/^I should get a hash containing a real number$/) do
6
+ expect(@metric_percentage["metric_percentage"]).to be_a(Float)
7
+ end
@@ -23,8 +23,8 @@ require 'kalibro_client/version'
23
23
  Gem::Specification.new do |spec|
24
24
  spec.name = "kalibro_client"
25
25
  spec.version = KalibroClient::VERSION
26
- spec.authors = ["Diego de Araújo Martinez Camarinha", "Daniel Paulino Alves", "Rafael Reggiani Manzo", "Heitor Reis Ribeiro"]
27
- spec.email = ["diegamc90@gmail.com", "danpaulalves@gmail.com", "rr.manzo@gmail.com", "marcheing@gmail.com"]
26
+ spec.authors = ["Daniel Quadros Miranda", "Diego de Araújo Martinez Camarinha", "Heitor Reis Ribeiro", "Rafael Reggiani Manzo"]
27
+ spec.email = ["danielkza2@gmail.com", "diegamc90@gmail.com", "marcheing@gmail.com", "rr.manzo@gmail.com"]
28
28
  spec.description = "KalibroClient is a Ruby gem intended to be an interface for Ruby applications who want to use the open source code analysis webservice Kalibro."
29
29
  spec.summary = "KalibroClient is a communication interface with the KalibroProcessor and KalibroConfigurations services."
30
30
  spec.homepage = "https://github.com/mezuro/kalibro_client"
@@ -0,0 +1,11 @@
1
+ module KalibroClient
2
+ module Entities
3
+ module Configurations
4
+ class Statistic < KalibroClient::Entities::Configurations::Base
5
+ def self.metric_percentage(metric_code)
6
+ request('/metric_percentage', {metric_code: metric_code}, :get)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -38,3 +38,4 @@ require 'kalibro_client/entities/processor/process_time'
38
38
  require 'kalibro_client/entities/processor/processing'
39
39
  require 'kalibro_client/entities/processor/project'
40
40
  require 'kalibro_client/entities/processor/repository'
41
+ require 'kalibro_client/entities/configurations/statistic'
@@ -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 = "0.1.1"
18
+ VERSION = "0.2.0"
19
19
  end
@@ -0,0 +1,35 @@
1
+ # This file is part of KalibroClient
2
+ # Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+ require 'spec_helper'
18
+
19
+ describe KalibroClient::Entities::Configurations::Statistic do
20
+ describe 'metric_percentage' do
21
+ let(:metric_code) {"bf"}
22
+
23
+ before :each do
24
+ KalibroClient::Entities::Configurations::Statistic.
25
+ expects(:request).
26
+ with('/metric_percentage', {metric_code: metric_code}, :get).
27
+ returns({"metric_percentage" => 100})
28
+ end
29
+
30
+ it 'should return an array containing the percentage' do
31
+ expect(KalibroClient::Entities::Configurations::Statistic.
32
+ metric_percentage(metric_code)).to eq({"metric_percentage" => 100})
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kalibro_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Daniel Quadros Miranda
7
8
  - Diego de Araújo Martinez Camarinha
8
- - Daniel Paulino Alves
9
- - Rafael Reggiani Manzo
10
9
  - Heitor Reis Ribeiro
10
+ - Rafael Reggiani Manzo
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-05-08 00:00:00.000000000 Z
14
+ date: 2015-05-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -170,10 +170,10 @@ dependencies:
170
170
  description: KalibroClient is a Ruby gem intended to be an interface for Ruby applications
171
171
  who want to use the open source code analysis webservice Kalibro.
172
172
  email:
173
+ - danielkza2@gmail.com
173
174
  - diegamc90@gmail.com
174
- - danpaulalves@gmail.com
175
- - rr.manzo@gmail.com
176
175
  - marcheing@gmail.com
176
+ - rr.manzo@gmail.com
177
177
  executables: []
178
178
  extensions: []
179
179
  extra_rdoc_files: []
@@ -245,6 +245,7 @@ files:
245
245
  - features/repository/of.feature
246
246
  - features/repository/process.feature
247
247
  - features/repository/types.feature
248
+ - features/statistic/metric_percentage.feature
248
249
  - features/step_definitions/kalibro_configuration_steps.rb
249
250
  - features/step_definitions/metric_collector_details_steps.rb
250
251
  - features/step_definitions/metric_configuration_steps.rb
@@ -257,6 +258,7 @@ files:
257
258
  - features/step_definitions/reading_group_steps.rb
258
259
  - features/step_definitions/reading_steps.rb
259
260
  - features/step_definitions/repository_steps.rb
261
+ - features/step_definitions/statistic_steps.rb
260
262
  - features/support/env.rb
261
263
  - features/support/kalibro_cucumber_helpers.yml.sample
262
264
  - kalibro_client.gemspec
@@ -270,6 +272,7 @@ files:
270
272
  - lib/kalibro_client/entities/configurations/range_snapshot.rb
271
273
  - lib/kalibro_client/entities/configurations/reading.rb
272
274
  - lib/kalibro_client/entities/configurations/reading_group.rb
275
+ - lib/kalibro_client/entities/configurations/statistic.rb
273
276
  - lib/kalibro_client/entities/miscellaneous/base.rb
274
277
  - lib/kalibro_client/entities/miscellaneous/compound_metric.rb
275
278
  - lib/kalibro_client/entities/miscellaneous/date_metric_result.rb
@@ -310,6 +313,7 @@ files:
310
313
  - spec/entities/configurations/range_snapshot_spec.rb
311
314
  - spec/entities/configurations/reading_group_spec.rb
312
315
  - spec/entities/configurations/reading_spec.rb
316
+ - spec/entities/configurations/statistic_spec.rb
313
317
  - spec/entities/miscellaneous/base_spec.rb
314
318
  - spec/entities/miscellaneous/compound_metric_spec.rb
315
319
  - spec/entities/miscellaneous/date_metric_result_spec.rb
@@ -436,6 +440,7 @@ test_files:
436
440
  - features/repository/of.feature
437
441
  - features/repository/process.feature
438
442
  - features/repository/types.feature
443
+ - features/statistic/metric_percentage.feature
439
444
  - features/step_definitions/kalibro_configuration_steps.rb
440
445
  - features/step_definitions/metric_collector_details_steps.rb
441
446
  - features/step_definitions/metric_configuration_steps.rb
@@ -448,6 +453,7 @@ test_files:
448
453
  - features/step_definitions/reading_group_steps.rb
449
454
  - features/step_definitions/reading_steps.rb
450
455
  - features/step_definitions/repository_steps.rb
456
+ - features/step_definitions/statistic_steps.rb
451
457
  - features/support/env.rb
452
458
  - features/support/kalibro_cucumber_helpers.yml.sample
453
459
  - spec/entities/base_spec.rb
@@ -458,6 +464,7 @@ test_files:
458
464
  - spec/entities/configurations/range_snapshot_spec.rb
459
465
  - spec/entities/configurations/reading_group_spec.rb
460
466
  - spec/entities/configurations/reading_spec.rb
467
+ - spec/entities/configurations/statistic_spec.rb
461
468
  - spec/entities/miscellaneous/base_spec.rb
462
469
  - spec/entities/miscellaneous/compound_metric_spec.rb
463
470
  - spec/entities/miscellaneous/date_metric_result_spec.rb