minitest-holdify 1.0.1 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e52a7f895ae3023c767178f3b678fbb7daa0da3f0253ee83a4428cccfa23cce0
4
- data.tar.gz: 56f7bf3e4903f8506053b7fecb3be01c3ac642f6b2d9f490cdcdbb0fc303dfa3
3
+ metadata.gz: 6a833738964de4fd5b67fbb6c68a1238e62077ed8716c4c37016e430234280a9
4
+ data.tar.gz: bf3e156990631e915295f4109b3bacd6f3e4553e3f155a5d0559ea9172421e42
5
5
  SHA512:
6
- metadata.gz: 26522a5a41ee3ff122d748a0536f830d9d7c7d1b376ae3d3f42fe8df46ad2852f4aad48239df5bd0a70ba29af127a51da5efdf565fbeea5700f65833f455cd88
7
- data.tar.gz: add1f22c79883b79477340aa077921b981916fbeb36807944b2d6d85d00720baefa76241bdfcd59fa120c0e1b403b0fee381a7db04adf2e09a9a51dca65e764a
6
+ metadata.gz: 7cdf43d2f02bbf34a5011d8808b27d0ca8ec1f9619d7c1caefc01a9e8b68f4176bd7ff1cfe5c301ec93d9176925c9ea2033374f7753b57b629846c4c69abc2aa
7
+ data.tar.gz: a1db8f0d6d12bf7b68fca7144a073dfc6ad55676452bb187003c9c4dced2a6a910db9156cb86eadd2b393859a5f7a12ddc0845b783a0094e750994a24c29823c
data/lib/holdify/store.rb CHANGED
@@ -8,7 +8,7 @@ class Holdify
8
8
  class Store
9
9
  def initialize(source_path)
10
10
  @path = "#{source_path}#{CONFIG[:ext]}"
11
- File.delete(@path) if Holdify.rebuild && File.exist?(@path)
11
+ File.delete(@path) if Holdify.reconcile && File.exist?(@path)
12
12
 
13
13
  @source = {} # { lineno => id }
14
14
  File.foreach(source_path).with_index(1) do |line, lineno|
data/lib/holdify.rb CHANGED
@@ -5,11 +5,11 @@ require_relative 'holdify/store'
5
5
 
6
6
  # Add description
7
7
  class Holdify
8
- VERSION = '1.0.1'
8
+ VERSION = '1.0.2'
9
9
  CONFIG = { ext: '.yaml' }.freeze
10
10
 
11
11
  class << self
12
- attr_accessor :rebuild, :quiet
12
+ attr_accessor :reconcile, :quiet
13
13
 
14
14
  def stores = @stores ||= {}
15
15
  end
@@ -32,7 +32,7 @@ class Holdify
32
32
  @session[id] << actual
33
33
  @forced << "#{location.path}:#{location.lineno}" if force
34
34
 
35
- return actual if force || self.class.rebuild
35
+ return actual if force || self.class.reconcile
36
36
 
37
37
  stored = @store.stored(id)
38
38
  index = @session[id].size - 1
@@ -6,9 +6,9 @@ require 'holdify'
6
6
  module Minitest
7
7
  # Set the Holdify options
8
8
  def self.plugin_holdify_options(opts, _options)
9
- opts.on '--holdify-rebuild', 'Rebuild the stores with the current entries/values' do
10
- Holdify.rebuild = true
11
- Holdify.quiet = true
9
+ opts.on '--holdify-reconcile', 'Reconcile the held values with the new ones' do
10
+ Holdify.reconcile = true
11
+ Holdify.quiet = true
12
12
  end
13
13
  # :nocov:
14
14
  opts.on '--holdify-quiet', 'Skip the warning on storing a new value' do
@@ -65,7 +65,7 @@ module Minitest
65
65
  def assert_hold_?(actual, *)
66
66
  @holdify ||= Holdify.new(self)
67
67
  location = @holdify.find_location
68
- warn "[holdify] Actual value dumped from: #{location.path}:#{location.lineno}\n=> #{actual.inspect}"
68
+ warn "[holdify] Actual value from: #{location.path}:#{location.lineno}\n=> #{actual.inspect}"
69
69
  @holdify.hold(actual)
70
70
  end
71
71
  end
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.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis