kalibro_client 4.0.0 → 5.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 314934db03c691b5dd570e900b7abb418020a412
4
- data.tar.gz: 9fbb07bb841306ed40a3d1081add9fadcc5f7dc1
3
+ metadata.gz: 3d79608df969e71a05b220fd5c0978674d08aa3f
4
+ data.tar.gz: af3a59e162eedeb47e8bbd4827db9cb3f45852a1
5
5
  SHA512:
6
- metadata.gz: 31bc1769ece73ce56c426eb17aaee8f57789be9808f86f6085cfcc2a96f905fefe4d9dc31f75ba7cac28cd4f5b8b34059582eb57fc7d0a90264e8a08ba2c5f66
7
- data.tar.gz: 259ed77f702410b4b5f81b2bc3907432d98a1a0a666d507e1f7603a09f52defd72d2eede14e807ec92cc928c4fb4d9b6145cd2facc81a67e4be73d4e463b37d4
6
+ metadata.gz: 62103b2c331ae326b17f948cd56204f93371b36ceb092089fe9ed4d8db6f8fc9d78124495d501db486a609df2dc633e1da8888067e87fa1b1a8ec9bcb683e357
7
+ data.tar.gz: 1c1336d73ba6a82521634df179eda5300001f1688988d1768b9a97fc8d7c6c4c2905a38137d6fc352ac010288044267c6e9e07ab3523a12152d1aff663afcad7
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.3.0
1
+ ruby-2.4.1
data/.travis.yml CHANGED
@@ -1,8 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.3.0
4
- - 2.0.0-p598 # CentOS 7
5
- - 2.1.5 # Debian 8
6
4
 
7
5
  addons:
8
6
  postgresql: "9.3"
data/CHANGELOG.md ADDED
@@ -0,0 +1,141 @@
1
+ # Revision history for Kalibro Client gem
2
+
3
+ The Kalibro Client gem abstracts communication with all the services in the Mezuro
4
+ platform, with an uniform Ruby API.
5
+
6
+ ## Unreleased
7
+
8
+ ## v5.0.0 - 05/03/2018
9
+
10
+ - Drop Ruby 2.0.0 and 2.1.5 support
11
+ - Bump Ruby version 2.4.1
12
+ - Restrict code climate test reporter previous to 1.0
13
+ - Make MetricFu the main collector for testing
14
+ - Development on Mezuro's single repository
15
+
16
+ ## v4.0.0 - 30/03/2016
17
+ - Extract HTTP request handling code to the Likeno gem (https://github.com/mezuro/likeno)
18
+ - Refactor MetricCollector and MetricCollectoDetails finding methods
19
+ - Remove savon's leftovers
20
+ - Add deprecation warnings on error classes
21
+ - Use Likeno errors instead of KalibroClient errors
22
+
23
+ ## v3.0.1 - 29/02/2016
24
+ - Relax faraday_middleware version requirement
25
+ - Bump version
26
+
27
+ ## v3.0.0 - 16/02/2016
28
+ - Relax RSpec and Cucumber version requirement
29
+ - Update to Ruby 2.3.0
30
+ - Add inheritance for Granularity from Base
31
+ - Send metric snapshot's scope with {type: granularity} format
32
+
33
+ ## v2.1.2 - 23/10/2015
34
+ - Use a ruby metric configuration on features
35
+ - Fix supported metrics instantiation
36
+
37
+ ## v2.1.1 - 19/10/2015
38
+ - Fix MetricResult#module_result
39
+
40
+ ## v2.1.0 - 15/10/2015
41
+ - Implement hotspot and tree metric result retrieval
42
+ - Add module_result method to MetricResult
43
+ - Fix granularity method calls on kalibro module factory
44
+
45
+ ## v2.0.0 - 30/09/2015
46
+ - Make all requests raise exceptions in case of HTTP errors instead of ignoring them
47
+ - Make Entities::Base#save! raise an exception on error
48
+ - Split MetricResult into a superclass with TreeMetricResult subclass
49
+ - Implemente HotspotMetricResult
50
+ - Implemente hotspot_metric_results on module_result
51
+ - Remove deprecated method ModuleResult#metric_results.
52
+ - Fix outdated AggregationOptions
53
+ - Fix Entities::Base#request sending parameters for :get calls
54
+
55
+ ## v1.4.1 - 14/09/2015
56
+ - Adds missing hotspot attributes to MetricResult
57
+
58
+ ## v1.4.0 - 11/09/2015
59
+ - Update dependencies: faraday_middleware, cucumber
60
+ - Updates to Ruby 2.2.3
61
+ - Added range method to kalibro range
62
+ - Implemented range method for RangeSnapshot
63
+ - Updated kalibro range boundaries to delay validation
64
+
65
+ ## v1.3.0 - 28/08/2015
66
+ - Fixes MetricConfiguration#find to return the new instance with true valued persisted attribute
67
+ - Undo deprecation of NativeMetric's constructor
68
+ - Implemented HotspotMetric
69
+ - Implemented HotspotMetrics on MetricConfiguration
70
+
71
+ ## v1.2.2 - 21/08/2015
72
+ - Version fix release: should be identical to v1.2.2
73
+
74
+ ## v1.2.1 - 21/08/2015
75
+ - Raise errors on comparison between function and class granularities
76
+
77
+ ## v1.2.0 - 17/08/2015
78
+ - Removed processing from metric collector details
79
+ - Removed wanted_metrics from metric collector details
80
+ - Granularity comparisons using Comparable Module
81
+
82
+ ## v0.5.0 - 17/08/2015
83
+ - Implemented FUNCTION Granularity
84
+ - Make Granularity comparisons use the Comparable Module
85
+
86
+ ## v1.1.0 - 06/07/2015
87
+ - Refactored the repository method all to match the new API of kalibro processor
88
+
89
+ ## v0.4.0 - 06/07/2015
90
+ - Refactored the repository method all to match the new API of kalibro processor
91
+
92
+ ## v1.0.0 - 08/05/2015
93
+ - Delete deprecated methods in MetricResult and Processing
94
+ - Make Processing independent of Repository
95
+ - Update rspec gem
96
+
97
+ ## v0.3.0 - 16/06/2015
98
+ - Adding the branch attribute on repository.
99
+ - Added branches method on Repository
100
+
101
+ ## v0.2.0 - 29/05/2015
102
+ - Adding new entity to show statistic of the metrics
103
+
104
+ ## v0.1.1 - 08/05/2015
105
+ - Update to Ruby 2.2.2
106
+ - Performance improvement
107
+
108
+ ## v0.1.0 - 01/04/2015
109
+ - Update dependencies: factory_girl, rspec
110
+ - Added name and short_name methods to kalibro module
111
+ - Fix Granularity comparisons
112
+
113
+ ## v0.0.2 - 11/02/2015
114
+ - Added repositories method to project
115
+ - Fix base entity #save return value (should be false on failure)
116
+ - make has_processing method use GET instead of POST
117
+ - Fix cancel_processing and module_result_history_of bugs
118
+ - Fixed errors hash returned on metric configuration
119
+ - Fixed error handling on save error
120
+ - Added readings method to reading group
121
+ - Add update action for entities
122
+ - Correctly set persisted attribute when creating new entities
123
+ - Fix supported metrics on metric collector details
124
+ - Changing metric on metric collector details to find metric by name or code
125
+ - Adding kalibro ranges method to metric configuration
126
+ - Change created_at and updated_at methods to return Time instances
127
+ - Fix constructor for supported metrics on metric collector
128
+ - Add Processing retrieval methods inside Repository instance
129
+ - Alias `granularity` for KalibroModule method `granlrty`
130
+ - Added metric_configuration_id= to MetricResult and implemented ModuleResult metric_results instance method
131
+ - Add ModuleResult processing method
132
+
133
+ ## v0.0.1 - 22/01//2015 (Initial release)
134
+ - Rename from Kalibro Gatekeeper Client to Kalibro Client
135
+ - Refactor package structure to include Entites
136
+ - Update XML methods
137
+ - Add acceptance tests using Cucumber
138
+ - Add hash conversion method to entities
139
+ - Update to Ruby 2.1.0
140
+ - Replace Savon gem with Faraday
141
+ - Implement destroy methods for many entities
@@ -5,4 +5,4 @@ Feature: All Names
5
5
 
6
6
  Scenario: all metric collectors names
7
7
  When I get all metric collector names
8
- Then it should return Analizo string inside of an array
8
+ Then it should return MetricFu string inside of an array
@@ -3,17 +3,9 @@ Feature: Find By Name
3
3
  As a developer
4
4
  I want to get a metric collector by name
5
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
13
-
14
6
  Scenario: get a metric collector by name
15
- When I search metric collector "Analizo" by name
16
- Then I should get "Analizo" metric collector
7
+ When I search metric collector "MetricFu" by name
8
+ Then I should get "MetricFu" metric collector
17
9
 
18
10
  Scenario: get a metric collector by inexistent name
19
11
  When I search metric collector "Avalio" by name
@@ -19,8 +19,8 @@ When(/^I search metric collector "(.+)" by name$/) do |name|
19
19
  @response = KalibroClient::Entities::Processor::MetricCollectorDetails.find_by_name(name)
20
20
  end
21
21
 
22
- Then(/^it should return Analizo string inside of an array$/) do
23
- expect(@metric_collector_names.include?("Analizo")).to be_truthy
22
+ Then(/^it should return MetricFu string inside of an array$/) do
23
+ expect(@metric_collector_names.include?("MetricFu")).to be_truthy
24
24
  end
25
25
 
26
26
  Then(/^I should get "(.+)" metric collector$/) do |name|
@@ -18,16 +18,16 @@
18
18
  lib = File.expand_path('../lib', __FILE__)
19
19
 
20
20
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
21
- require 'kalibro_client/version'
21
+ version = File.read(File.expand_path("../../VERSION", __dir__)).strip
22
22
 
23
23
  Gem::Specification.new do |spec|
24
24
  spec.name = "kalibro_client"
25
- spec.version = KalibroClient::VERSION
25
+ spec.version = version
26
26
  spec.authors = ["Daniel Quadros Miranda", "Diego de Araújo Martinez Camarinha", "Heitor Reis Ribeiro", "Rafael Reggiani Manzo"]
27
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
- spec.homepage = "https://github.com/mezuro/kalibro_client"
30
+ spec.homepage = "https://gitlab.com/mezuro/mezuro/tree/master/kalibro/client"
31
31
  spec.license = "LGPLv3"
32
32
 
33
33
  spec.files = `git ls-files`.split($/)
@@ -35,6 +35,8 @@ Gem::Specification.new do |spec|
35
35
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
36
36
  spec.require_paths = ["lib"]
37
37
 
38
+ spec.required_ruby_version = '>= 2.2.2'
39
+
38
40
  spec.add_development_dependency "bundler", "~> 1.3"
39
41
  spec.add_development_dependency "rake"
40
42
  spec.add_development_dependency "rspec", "~> 3.0"
@@ -42,7 +44,7 @@ Gem::Specification.new do |spec|
42
44
  spec.add_development_dependency "mocha", "~> 1.1.0"
43
45
  spec.add_development_dependency "simplecov"
44
46
  spec.add_development_dependency "factory_girl", "~> 4.5.0"
45
- spec.add_development_dependency "codeclimate-test-reporter"
47
+ spec.add_development_dependency "codeclimate-test-reporter", '< 1.0.0'
46
48
  spec.add_development_dependency "ruby-prof"
47
49
 
48
50
  spec.add_dependency "activesupport", ">= 2.2.1" #version in which underscore was introduced
@@ -15,7 +15,6 @@
15
15
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
  require 'likeno'
18
- require "kalibro_client/version"
19
18
  require "kalibro_client/errors"
20
19
  require "kalibro_client/entities"
21
20
 
@@ -19,9 +19,14 @@ module KalibroClient
19
19
  'tests'
20
20
  end
21
21
 
22
+ # :nocov:
22
23
  def clean_database
23
24
  request('clean_database', {}, :post)
25
+ rescue Likeno::Errors::RequestError => error
26
+ p error.response
27
+ raise error
24
28
  end
29
+ # :nocov:
25
30
  end
26
31
  end
27
32
  end
@@ -0,0 +1,29 @@
1
+ require 'rspec/mocks'
2
+ require 'faraday'
3
+ require 'likeno'
4
+ require 'kalibro_client/kalibro_cucumber_helpers'
5
+
6
+ describe KalibroClient::KalibroCucumberHelpers do
7
+ let(:cleaner) { mock("KalibroClient::KalibroCucumberHelpers::Cleaner") }
8
+
9
+ describe 'methods' do
10
+ let(:processor_cleaner) { mock("KalibroClient::KalibroCucumberHelpers::Cleaner") }
11
+
12
+ before :each do
13
+ KalibroClient::KalibroCucumberHelpers::Cleaner.expects(:new).returns(cleaner)
14
+ cleaner.expects(:clean_database)
15
+ end
16
+
17
+ describe 'clean_processor' do
18
+ it 'is expected to clean the processor database' do
19
+ KalibroClient::KalibroCucumberHelpers.clean_processor
20
+ end
21
+
22
+ describe 'clean_configurations' do
23
+ it 'is expected to clean the processor database' do
24
+ KalibroClient::KalibroCucumberHelpers.clean_configurations
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
data/spec/spec_helper.rb CHANGED
@@ -31,6 +31,11 @@ SimpleCov.start do
31
31
  add_filter "/features/"
32
32
 
33
33
  coverage_dir 'coverage/rspec'
34
+
35
+ # Minimum coverage is only desired on CI tools when building the environment. CI is a
36
+ # default environment variable used by Travis. For reference, see here:
37
+ # https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
38
+ minimum_coverage 100 if ENV["CI"] == 'true'
34
39
  end
35
40
 
36
41
  require 'kalibro_client'
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: 4.0.0
4
+ version: 5.0.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: 2016-03-30 00:00:00.000000000 Z
14
+ date: 2018-03-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -115,16 +115,16 @@ dependencies:
115
115
  name: codeclimate-test-reporter
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - ">="
118
+ - - "<"
119
119
  - !ruby/object:Gem::Version
120
- version: '0'
120
+ version: 1.0.0
121
121
  type: :development
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - ">="
125
+ - - "<"
126
126
  - !ruby/object:Gem::Version
127
- version: '0'
127
+ version: 1.0.0
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: ruby-prof
130
130
  requirement: !ruby/object:Gem::Requirement
@@ -198,6 +198,7 @@ files:
198
198
  - ".ruby-version"
199
199
  - ".travis.yml"
200
200
  - AUTHORS
201
+ - CHANGELOG.md
201
202
  - COPYING
202
203
  - COPYING.LESSER
203
204
  - Gemfile
@@ -318,7 +319,6 @@ files:
318
319
  - lib/kalibro_client/kalibro_cucumber_helpers.rb
319
320
  - lib/kalibro_client/kalibro_cucumber_helpers/cleaner.rb
320
321
  - lib/kalibro_client/kalibro_cucumber_helpers/hooks.rb
321
- - lib/kalibro_client/version.rb
322
322
  - lib/rake/test_task.rb
323
323
  - performance/base.rb
324
324
  - performance/performance.rb
@@ -377,8 +377,9 @@ files:
377
377
  - spec/helpers/aggregation_options_spec.rb
378
378
  - spec/helpers/range_methods_spec.rb
379
379
  - spec/kalibro_cucumber_helpers/cleaner_spec.rb
380
+ - spec/kalibro_cucumber_helpers/kalibro_cucumber_helper_spec.rb
380
381
  - spec/spec_helper.rb
381
- homepage: https://github.com/mezuro/kalibro_client
382
+ homepage: https://gitlab.com/mezuro/mezuro/tree/master/kalibro/client
382
383
  licenses:
383
384
  - LGPLv3
384
385
  metadata: {}
@@ -390,7 +391,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
390
391
  requirements:
391
392
  - - ">="
392
393
  - !ruby/object:Gem::Version
393
- version: '0'
394
+ version: 2.2.2
394
395
  required_rubygems_version: !ruby/object:Gem::Requirement
395
396
  requirements:
396
397
  - - ">="
@@ -398,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
399
  version: '0'
399
400
  requirements: []
400
401
  rubyforge_project:
401
- rubygems_version: 2.5.1
402
+ rubygems_version: 2.6.11
402
403
  signing_key:
403
404
  specification_version: 4
404
405
  summary: KalibroClient is a communication interface with the KalibroProcessor and
@@ -535,4 +536,5 @@ test_files:
535
536
  - spec/helpers/aggregation_options_spec.rb
536
537
  - spec/helpers/range_methods_spec.rb
537
538
  - spec/kalibro_cucumber_helpers/cleaner_spec.rb
539
+ - spec/kalibro_cucumber_helpers/kalibro_cucumber_helper_spec.rb
538
540
  - spec/spec_helper.rb
@@ -1,19 +0,0 @@
1
- # This file is part of KalibroClient
2
- # Copyright (C) 2014 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
- module KalibroClient
18
- VERSION = "4.0.0"
19
- end