minitest-holdify 1.1.1 → 1.1.2
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/lib/holdify/hold.rb +1 -1
- data/lib/holdify/ledger.rb +1 -1
- data/lib/holdify/source.rb +3 -3
- data/lib/holdify/store.rb +1 -1
- data/lib/holdify.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 633215ac6e960bb4fe8e63dbf22d1247b9b684da3a2300611882b5a1251ca0ad
|
|
4
|
+
data.tar.gz: a80e8995767b2b3438dc809f494a473e4376da664924ba6ee117aa26ccc2d274
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0129f206eddc8ba5683d64e6ac5c4273dd83818a43ef636a5493706816143b6b35c567bcb407aed623c3c761f0a1d954ac23b2c691c6e81b6f1affcdad0d4ac5'
|
|
7
|
+
data.tar.gz: e1980a9bfd4f392c40c13194bb35c6d375f26bcef76a93ac4d1173305da5d3c557e8ecf69e659194ce1515b89b8ae2f423f204db883ff0c092c13db467c9e395
|
data/lib/holdify/hold.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Holdify
|
|
|
17
17
|
def call(actual, force: false)
|
|
18
18
|
location = find_location
|
|
19
19
|
line = location.lineno
|
|
20
|
-
raise "Could not find holdify statement at line #{line}" unless @store.
|
|
20
|
+
raise "Could not find holdify statement at line #{line}" unless @store.xxh_at(line)
|
|
21
21
|
|
|
22
22
|
@session[line] << actual
|
|
23
23
|
@forced << "#{@path}:#{line}" if force
|
data/lib/holdify/ledger.rb
CHANGED
data/lib/holdify/source.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require '
|
|
3
|
+
require 'xxhash'
|
|
4
4
|
|
|
5
5
|
module Holdify
|
|
6
6
|
# Represents the current state of the source file
|
|
7
7
|
class Source
|
|
8
8
|
def initialize(path) = (@line_sha, @sha_lines = parse(path))
|
|
9
9
|
|
|
10
|
-
def
|
|
10
|
+
def xxh_at(line) = @line_sha[line]
|
|
11
11
|
|
|
12
12
|
def lines_with(sha) = @sha_lines[sha]
|
|
13
13
|
|
|
@@ -21,7 +21,7 @@ module Holdify
|
|
|
21
21
|
content = text.strip
|
|
22
22
|
next if content.empty?
|
|
23
23
|
|
|
24
|
-
sha =
|
|
24
|
+
sha = XXhash.xxh32(content).to_s
|
|
25
25
|
line_sha[line] = sha
|
|
26
26
|
sha_lines[sha] << line
|
|
27
27
|
end
|
data/lib/holdify/store.rb
CHANGED
data/lib/holdify.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minitest-holdify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Domizio Demichelis
|
|
@@ -23,6 +23,20 @@ dependencies:
|
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: 5.0.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: xxhash
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 0.7.0
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: 0.7.0
|
|
26
40
|
description: Stop maintaining large expected values in your test/fixture files! Hold
|
|
27
41
|
them automatically. Update them effortlessly.
|
|
28
42
|
email:
|