diff_test 0.8.11 → 0.8.12
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 +4 -4
- data/README.md +16 -0
- data/lib/diff_test/file_hash_computer.rb +1 -1
- data/lib/diff_test/helper.rb +1 -1
- data/lib/diff_test/integrations/minitest/lifecycle.rb +0 -10
- data/lib/diff_test/integrations/rails_js/annotator.rb +3 -3
- data/lib/diff_test/should_run_decider.rb +1 -1
- data/lib/diff_test/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 572fb4d96758c15f33fb86d759208c20707bc041e86bd41846ad3fb25e7878bc
|
4
|
+
data.tar.gz: 58be1a6c50f15d51ee35c867f9f82351e027f11391e80a00236a72084935c64d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d127f58c88c7e5d05a0af258fda8f1e553f98f2e17c1ca7b5d079f620a769211ca62b5e0e6d9ac1fbb0a44624f3af7c2c2bda947d6cbd8a072d55edf802584e
|
7
|
+
data.tar.gz: 296d9ddcff60b4958d90ecdd4f7acf1b7402af66fd4f73c23d392efe22dc4ab3bb2f721bb1c404619f91b69889e4a5ad4fe0b2295d77fdd545b586fe0c00a7c7
|
data/README.md
CHANGED
@@ -256,3 +256,19 @@ method_added/const_added
|
|
256
256
|
|
257
257
|
|
258
258
|
# WRITE test for it setting time from previous successful run
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
# Perf improvements
|
263
|
+
|
264
|
+
# TestExecution
|
265
|
+
# - New Test table (just for test name)
|
266
|
+
# - Drop updated_at
|
267
|
+
# - impacted_file_hash becomes integer
|
268
|
+
|
269
|
+
# ImpactedFile
|
270
|
+
- add file_path and file_hash
|
271
|
+
|
272
|
+
# TestExecutionImpactedFile
|
273
|
+
- Store file hash with impacted file
|
274
|
+
- TestExecutionImpactedFile then just belongs to test execution and impacted_file
|
@@ -11,7 +11,7 @@ module DiffTest
|
|
11
11
|
content = DiffTest::Integrations::RailsJs::Annotator.unannotate(content)
|
12
12
|
|
13
13
|
@cache ||= {}
|
14
|
-
@cache[file_path] = XXhash.
|
14
|
+
@cache[file_path] = XXhash.xxh32(content).to_s
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.compute_relative(file_path)
|
data/lib/diff_test/helper.rb
CHANGED
@@ -4,16 +4,6 @@ module DiffTest
|
|
4
4
|
module Lifecycle
|
5
5
|
def self.included(base)
|
6
6
|
base.prepend(InstanceMethods)
|
7
|
-
|
8
|
-
require 'get_process_mem'
|
9
|
-
Thread.new do
|
10
|
-
mem = GetProcessMem.new
|
11
|
-
loop do
|
12
|
-
# `mem.mb` returns the resident set size as a Float in megabytes
|
13
|
-
DiffTest::Helper.log("Memory: #{format('%8.2f MB', mem.mb)}")
|
14
|
-
sleep 1
|
15
|
-
end
|
16
|
-
end
|
17
7
|
end
|
18
8
|
|
19
9
|
module InstanceMethods
|
@@ -34,7 +34,7 @@ module DiffTest
|
|
34
34
|
insert_at_first_non_comment_line_str(content, annotation)
|
35
35
|
end
|
36
36
|
|
37
|
-
UNANNOTATE_REGEX = /(\/\/|#) Automatically added by DiffTest.*?(\/\/|#) Automatically added by DiffTest\n
|
37
|
+
UNANNOTATE_REGEX = /(\/\/|#) Automatically added by DiffTest.*?(\/\/|#) Automatically added by DiffTest\n/m
|
38
38
|
def self.unannotate(content)
|
39
39
|
content.gsub!(UNANNOTATE_REGEX, '')
|
40
40
|
content
|
@@ -45,7 +45,7 @@ module DiffTest
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.insert_at_first_non_comment_line_str(content, text_to_insert)
|
48
|
-
lines = content.lines
|
48
|
+
lines = content.lines
|
49
49
|
|
50
50
|
in_multiline_comment = false
|
51
51
|
comment_type = nil
|
@@ -97,7 +97,7 @@ module DiffTest
|
|
97
97
|
new_lines = lines.dup
|
98
98
|
new_lines.insert(insert_index, text_to_insert)
|
99
99
|
|
100
|
-
new_lines.join
|
100
|
+
new_lines.join
|
101
101
|
end
|
102
102
|
end
|
103
103
|
end
|
@@ -18,7 +18,7 @@ module DiffTest
|
|
18
18
|
has_previous_execution_with_no_impacted_changes = previous_test_executions.any? do |previous_test_execution|
|
19
19
|
hashes_match = previous_test_execution['test_execution_impacted_files'].all? do |test_execution_impacted_file|
|
20
20
|
impacted_file_id = test_execution_impacted_file['impacted_file_id'].to_s
|
21
|
-
file_hash = test_execution_impacted_file['file_hash']
|
21
|
+
file_hash = test_execution_impacted_file['file_hash'].to_s
|
22
22
|
impacted_file_path = @impacted_file_path_by_id[impacted_file_id]
|
23
23
|
|
24
24
|
DiffTest::FileHashComputer.compute_relative(impacted_file_path) == file_hash
|
data/lib/diff_test/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diff_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owais
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|