kolekti 1.0.2 → 1.1.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: 932dcb9685bbcb4a54a2b68e61fabe494a8d016c
4
- data.tar.gz: 3ea902c675534ddc8e80d9c93bba2d5a318ba043
3
+ metadata.gz: d31a54ccd3f90a1c99b7af76a8b2fb85234a5950
4
+ data.tar.gz: 46cdd89738d6160caba35f6ee738b8ea7b55a6e3
5
5
  SHA512:
6
- metadata.gz: 513b93473d64d99a82642380d81eb765697b526fd0a7af40ec5b0179c30bf290f7acbd70de6befd28793dd7de3a2c6caaf24f8e95fa7a6044297ce85bb004834
7
- data.tar.gz: c1a9d06b8e7b5b16b8deaa600e93fe3b1b4dea293e8b5e424a0143935cc833e4427bd1e019d784d9c69ad6f556ba85c049b299848119deb9ce7279c86b557bc9
6
+ metadata.gz: bcc633f5a514e884d82ecc0440c817a4711fbf8b7a34762fd82f95dbd83949e68ead01abe4178e8dfc5226f80c2b100232bc84a58b42ce3a6ab72584d1bdda39
7
+ data.tar.gz: 40db975688f9cb1dfe298b5dac0a0b871470e39d95d5f57c951f16e0dbb6004342a4e35e04cc83fb400bf50a56630ed6d4cf0e4a1cfd71a45f819dcd3b8eb918
data/CHANGELOG.rdoc CHANGED
@@ -4,6 +4,10 @@ The Kolekti gem provides a basic API for KalibroProcessor's collectors
4
4
 
5
5
  == Unreleased
6
6
 
7
+ == v1.1.0 - 06/04/2016
8
+
9
+ * Introduce the Parser class
10
+
7
11
  == v1.0.2 - 30/03/2016
8
12
 
9
13
  * Update Ruby to 2.3.0
data/lib/kolekti.rb CHANGED
@@ -4,6 +4,7 @@ require 'kolekti/runner'
4
4
  require 'kolekti/persistence_strategy'
5
5
  require 'kolekti/memory_persistence_strategy'
6
6
  require 'kolekti/errors'
7
+ require 'kolekti/parser'
7
8
 
8
9
  module Kolekti
9
10
  COLLECTORS = []
@@ -0,0 +1,24 @@
1
+ module Kolekti
2
+ class Parser
3
+ def self.parse(collected_metrics_hash); raise NotImplementedError; end
4
+
5
+ # Sometimes the parser does not generate results for some Module that
6
+ # other may generate. In this we case need a default value to fulfill
7
+ # it.
8
+ def self.default_value; raise NotImplementedError; end
9
+
10
+ def self.parse_file_name(file_name)
11
+ # Generates a module name by removing the file extension, replacing slashes with dots, and internal dots with underscores
12
+ path = Pathname.new(file_name.to_s)
13
+
14
+ path = (path.sub_ext '').to_s
15
+
16
+ path.sub! /^\//, ''
17
+ path.sub! /\/$/, ''
18
+ path.gsub! '.', '_'
19
+ path.gsub! '/', '.'
20
+
21
+ path
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module Kolekti
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kolekti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Miranda
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2016-03-30 00:00:00.000000000 Z
14
+ date: 2016-04-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: kalibro_client
@@ -168,6 +168,7 @@ files:
168
168
  - lib/kolekti/collector.rb
169
169
  - lib/kolekti/errors.rb
170
170
  - lib/kolekti/memory_persistence_strategy.rb
171
+ - lib/kolekti/parser.rb
171
172
  - lib/kolekti/persistence_strategy.rb
172
173
  - lib/kolekti/runner.rb
173
174
  - lib/kolekti/version.rb