deprecations_detector 0.2.0 → 0.2.2

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
  SHA256:
3
- metadata.gz: 55be48db383dbe077bd4f5d4a6af0268d556a49fd6eac9e308511b7099391be5
4
- data.tar.gz: f70e76bf040dabf491c147bad51633e4ce7aa132a3025d5fe54e1171fbbacdaf
3
+ metadata.gz: 2416996b167428bda291cb71e1a98182df8173d04bf5ecd582415e3ec722da82
4
+ data.tar.gz: e447d1e72d4ee7cbd7d315afab5a0f054b4e1f7715ead8cf092f065f4da21111
5
5
  SHA512:
6
- metadata.gz: 0f0c038b934842c4668d60e498e4c5088a457fbf858fbf796b79d56da004232af0c915ab93dc6ebe07a11013cf34f2145728ea30412f1d30e4c921de6fdc5e4a
7
- data.tar.gz: cd1dafac32b3b3451021a6a61280a65817375a341e4bd08950ac8066b357432edd4231d7eb9952245e9e3bdcc14c9b09ff42f10a82dcffc29051c5e1cdfc1bd5
6
+ metadata.gz: ec7fa2a879fb9c210947bcbeaaed42dc06a1bddb6b74c5fb323d0e2f8486942457d19361e6b949573574c60dc4c099550a330edddf3b21bfa6015a66379f05e9
7
+ data.tar.gz: 8cbbfd1d57012bd3198917a3996df0acadd6457b839dfa277f8e589d31d9a4d8e7534231d0b8d4d4da1d7f377d75309346046459483615db677894ae7c0bed0e
@@ -96,7 +96,13 @@ module DeprecationsDetector
96
96
  grouped_files = []
97
97
 
98
98
  groups.each do |deprecation_message|
99
- grouped[deprecation_message] = files.select { |source_file, lines| lines.detect { |line, examples| examples.detect { |example| example[:deprecation_message] == deprecation_message } } }
99
+ grouped[deprecation_message] = files.select do |source_file, lines|
100
+ lines.detect do |line, examples|
101
+ examples.detect do |example|
102
+ example[:deprecation_message] == deprecation_message
103
+ end
104
+ end
105
+ end
100
106
  grouped_files += grouped[deprecation_message].keys
101
107
  end
102
108
  if !groups.empty? && !(other_files = files.reject { |source_file| grouped_files.include?(source_file) }).empty?
@@ -48,7 +48,7 @@ module DeprecationsDetector
48
48
  file_path = result[1] # "#{Dir.pwd}#{result[1]}"
49
49
 
50
50
  @deprecation_matrix[file_path] ||= {}
51
- @deprecation_matrix[file_path][result[2].to_i - 1] = message
51
+ @deprecation_matrix[file_path][result[2].to_i - 1] = /(.*)\(called.*\)/m.match(message)[1]
52
52
  end
53
53
 
54
54
  def start
@@ -57,6 +57,8 @@ module DeprecationsDetector
57
57
  end
58
58
 
59
59
  def save_results(matrix = @coverage_matrix, file_name: ENV['MATRIX_FILENAME'] || 'deprecations_detector.yml')
60
+ matrix = {} if matrix.nil?
61
+
60
62
  path = File.join(output_path, file_name)
61
63
  FileUtils.mkdir_p(output_path)
62
64
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeprecationsDetector
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprecations_detector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniele Palombo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-01 00:00:00.000000000 Z
11
+ date: 2023-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.3.17
251
+ rubygems_version: 3.3.7
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: A tool to display deprecations in a simple way on a single HTML page.