diffy 3.4.0 → 3.4.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: ce6a165c4ad246372cf5e6888ca531c55da86a43051895900df4e466cef6c940
4
- data.tar.gz: 066c70ac2cbd41e1d34c2a9fc68f9ba9b4cc1ccea132e289638c5aeb927c0ad6
3
+ metadata.gz: 107dc73001f2e00bccf4b4f89a15ba86d045511f125f33bc8ed8987e239b5079
4
+ data.tar.gz: 0a07b298ff5eec7bcbf83adb0e3fa3c59c122796693d75e18d81d9ccfcb131de
5
5
  SHA512:
6
- metadata.gz: 911e04010bddf3a49726684822857ffdc1f05b62017367afef5e022f56b2eeecf618282bf40f381901bbded973c06f2273cecb1ada0292f94337cfc2690a3d4a
7
- data.tar.gz: a41fa95586a3f16ddcc19e5f3bbd6682d492cb4b0b44b1e6c16fcbd2556cd453d931720458d842caf04610a83067fb4b4daa86eef6010aa0f9d4da9110307cbd
6
+ metadata.gz: 47df78d6118935280b9011a77bb0c888da50af9dfac81dd810ca522cf23ad0099b50411a27e2ca57eac0369cb9fd9d82b97ce56525093002f2845d5d8e2e8121
7
+ data.tar.gz: fca9f15d0cd9cca745caa12f59da048f6bd4c62a572abd9987530ef3acacbdf228c78140c3305f618b86dc57a2a50a25fb0336e325f33afd5261c0a47e28f73c
data/CHANGELOG CHANGED
@@ -1,3 +1,16 @@
1
+ == 3.4.2 ==
2
+ Silence warning from unused variable when using `ruby -w`. Thanks
3
+ @sambostock!
4
+
5
+ == 3.4.1 ==
6
+ Prevent remote code execution from user controlled diff file paths. This
7
+ issue was only present in Windows platforms. Thanks @tehryanx for reporting
8
+ and testing the fix!
9
+
10
+ == 3.4.0 ==
11
+ Remove space between U diff option and context number. Thanks @tomas!
12
+ Add option to ignore CRLF diffs in HTML comparisons. Thanks @ptyagi16!
13
+
1
14
  == 3.3.0 ==
2
15
  Fix diff lines that begin with -- or ++. Thanks @dark-panda!
3
16
 
data/lib/diffy/diff.rb CHANGED
@@ -49,13 +49,7 @@ module Diffy
49
49
  [string1, string2]
50
50
  end
51
51
 
52
- if WINDOWS
53
- # don't use open3 on windows
54
- cmd = sprintf '"%s" %s %s', diff_bin, diff_options.join(' '), @paths.map { |s| %("#{s}") }.join(' ')
55
- diff = `#{cmd}`
56
- else
57
- diff = Open3.popen3(diff_bin, *(diff_options + @paths)) { |i, o, e| o.read }
58
- end
52
+ diff, _stderr, _process_status = Open3.capture3(diff_bin, *(diff_options + @paths))
59
53
  diff.force_encoding('ASCII-8BIT') if diff.respond_to?(:valid_encoding?) && !diff.valid_encoding?
60
54
  if diff =~ /\A\s*\Z/ && !options[:allow_empty_diff]
61
55
  diff = case options[:source]
data/lib/diffy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Diffy
2
- VERSION = '3.4.0'
2
+ VERSION = '3.4.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Goldstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake