deprecations_detector 0.2.1 → 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: 7185d3707b17f919e9c3fdd44b33cab18e48d1fc05c97fd8f91cd1df8dfbea74
4
- data.tar.gz: 6c8f7c961c4a2f0e0363b64558c86375c56059d309b90861ecefb386b06c06cc
3
+ metadata.gz: 2416996b167428bda291cb71e1a98182df8173d04bf5ecd582415e3ec722da82
4
+ data.tar.gz: e447d1e72d4ee7cbd7d315afab5a0f054b4e1f7715ead8cf092f065f4da21111
5
5
  SHA512:
6
- metadata.gz: 7b1edede24ecf8007fe412a61f3a2b067f72aa63f4ee42f4e8b0523a77d9112dc1e5a503425a907c279bf55f99355f5ba7c465f4248f442886e3056206dc224d
7
- data.tar.gz: 2e9681f8dea3f65e96f42159df4005c88236531f9df91944bbe67c64d0d09f737cc6e5805b8e25546f234286439b1575833459e2d5d2cacaa089c80b82f8293a
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeprecationsDetector
4
- VERSION = '0.2.1'
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.1
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-02 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.