regtest 2.3.0 → 2.4.1

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: 84ca27fae1d12f7b8616fa32743dbacccfb64fc25b7783b9ec19e7ddc8c8ef2b
4
- data.tar.gz: c414dd15ee7d42cd2717caac6530556232a6930c4c107270a16d2138226947c9
3
+ metadata.gz: a2c3eae05189bc9397839b3116acbfcfc8669d049a25fe5041f10e2c0d10c710
4
+ data.tar.gz: 32d1023dcd6cc66eea0bb47ede52a474edc026d8e87cefc2a79a50e3c95f07ef
5
5
  SHA512:
6
- metadata.gz: 5a43f2252a7cb0993eaef29d017e9132b908930fdc298c599f714331053e900bf602655294cfd8fbd24363e01e7053bea6cff90fd2ff11ba7afcdafa6277bbbf
7
- data.tar.gz: b3b77f936f251b850246799aa4a0eb01adead35ad758f9e8fefa6c9d02cc00d4017905af2b08dc822de0ace51e4ebabea1b5c294aaf2d52b86f04183fa2ac48d
6
+ metadata.gz: 8c47c65c0b8fb2e68b77f742d669f870a665b4777a3466da43c03bee7dc450d1875e67f1fce45098ca2e36d00f30cb7da85043af4c9393095d4d985f85ce0b57
7
+ data.tar.gz: 8d6afb80fe0584f38783a87b129272c48732d6362a404316afc38c40df6c6b1d8d90c428bebb20e5c881d7766b941f90e982935de2da71953b482443a8451ca5
data/Changelog CHANGED
@@ -1,3 +1,10 @@
1
+ 2.4.1
2
+ Fix a bug when using Regtest::Git.C or Regtest::Git.git_dir with relative
3
+ paths for filenames.
4
+
5
+ 2.4.0
6
+ Add parameter Regtest::Git.C.
7
+
1
8
  2.3.0
2
9
  Remove regtest/colorize use regtest/colors instead.
3
10
  Add Regtest::Git.work_tree and Regtest::Git.git_dir to be more flexible when
data/README.md CHANGED
@@ -282,12 +282,14 @@ workflow and environment it should not be checked into your SCM.
282
282
  If you use the git plugin (`require 'regtest/git'`) there will be two options
283
283
  you can set:
284
284
 
285
+ * `Regtest::Git.C`
285
286
  * `Regtest::Git.git_dir`
286
287
  * `Regtest::Git.work_tree`
287
288
 
288
- which corresponds to the git parameters `--git-dir` and `--work-path`. Which
289
- could be helpful if you run `regtest` from inside an other git repository than
290
- your regtest files. Have a look at the git documentation for more details.
289
+ which corresponds to the git parameters `-C`, `--git-dir` and `--work-tree`.
290
+ Which could be helpful if you run `regtest` from inside some other git
291
+ repository than your regtest files. Have a look at the git documentation for
292
+ more details.
291
293
 
292
294
  As said above: this should also be done in a local `.regtestrc` file.
293
295
 
data/lib/regtest/git.rb CHANGED
@@ -15,6 +15,9 @@ begin
15
15
  # Redefine Regtest.check_results.
16
16
  def check_results
17
17
  output_files = Regtest.results.keys
18
+ if Git.C || Git.work_tree
19
+ output_files.map! {|fn| File.expand_path(fn)}
20
+ end
18
21
  if output_files.empty?
19
22
  report "\nNothing to do.", type: :success
20
23
  return :success
@@ -46,6 +49,9 @@ begin
46
49
  end
47
50
 
48
51
  class << self
52
+ # git parameter +-C+
53
+ attr_accessor :C
54
+
49
55
  # git parameter +--work-tree+
50
56
  attr_accessor :work_tree
51
57
 
@@ -57,11 +63,15 @@ begin
57
63
 
58
64
  def git_global_args
59
65
  args = []
66
+ if c = Regtest::Git.C
67
+ args << '-C'
68
+ args << c
69
+ end
60
70
  if wt = Regtest::Git.work_tree
61
71
  args << format('--work-tree=%s', wt)
62
72
  end
63
- if gt = Regtest::Git.git_dir
64
- args << format('--git-dir=%s', gt)
73
+ if gd = Regtest::Git.git_dir
74
+ args << format('--git-dir=%s', gd)
65
75
  end
66
76
  args
67
77
  end
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Regtest
5
- VERSION = '2.3.0'
5
+ VERSION = '2.4.1'
6
6
  end
data/regtest.gemspec CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: regtest 2.3.0 ruby lib
2
+ # stub: regtest 2.4.1 ruby lib
3
3
  #
4
4
  # This file is automatically generated by rim.
5
5
  # PLEASE DO NOT EDIT IT DIRECTLY!
@@ -7,12 +7,12 @@
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "regtest"
10
- s.version = "2.3.0"
10
+ s.version = "2.4.1"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Jan Friedrich"]
15
- s.date = "2024-09-12"
15
+ s.date = "2024-09-14"
16
16
  s.description = "This library supports a very simple way to do regression testing with Ruby. It\nis not limited to Ruby projects you can use it also in other contexts where you\ncan extract data with Ruby.\n\nYou write Ruby scripts with samples. Run these and get the sample results as\nresults files besides your scripts. Check both the scripts and the results\nfiles in you Source Code Management System (SCM). When you run the scrips on a\nlater (or even previous) version of your code a simple diff show you if and how\nthe changes in your code or environment impact the results of your samples.\n\nThis is not a replacement for unit testing but a complement: You can produce a\nlot of samples with a small amount of Ruby code (e.g. a large number of\ncombinations of data).\n"
17
17
  s.email = "janfri26@gmail.com"
18
18
  s.files = ["./.aspell.pws", "Changelog", "Gemfile", "LICENSE", "README.md", "Rakefile", "lib/regtest", "lib/regtest.rb", "lib/regtest/colors.rb", "lib/regtest/git.rb", "lib/regtest/task.rb", "lib/regtest/version.rb", "regtest.gemspec"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regtest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Friedrich
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-09-12 00:00:00.000000000 Z
10
+ date: 2024-09-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake