di 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +5 -5
  2. data/HISTORY +5 -0
  3. data/LICENSE +1 -1
  4. data/lib/di.rb +15 -4
  5. metadata +6 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 61c8f70aa068fb3d011c9baf120f8ec0b5978051
4
- data.tar.gz: de784ceb4217db80523b59f63e6cb246bfa883a5
2
+ SHA256:
3
+ metadata.gz: 38a6ebb27f63c158a2281c8084a8b7e9f863c0694a27c65e046041dd417cb513
4
+ data.tar.gz: '05084a0031eb646d6250c9d479f23b8f438ac1ce6106f6c1b32d28fd4d02590b'
5
5
  SHA512:
6
- metadata.gz: 35b97e1c80d0d57e95769997eec6c786e229564b2518e30a3df751356d7bc3db9987a2c72f31910ae6d4dd012fca4ea7aff097669323efb5940035cc425c8549
7
- data.tar.gz: eabdb6553af81cec6b8ad8db3b7fb102e5caca21a1504d4b51955539d28c9d7092e56236d64681fcd0393afa2bbe317748f01029265ed44510312966f25a8925
6
+ metadata.gz: d410883c4714053d447fb99d320ebc5f451b3fab559f65b782e4d31d5885c6960b269e000377c0738c895063a93cadbecfb772aa7997acb4af300766ee14089c
7
+ data.tar.gz: e880ee0456c03170f1ca9276ee50864366b773bfa0b6182f1692251e5ae8438878fb3b06174ffc4ba22037fbfe9bae2ba04d37615133bc2976aa82089a8d6f5d
data/HISTORY CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.4.4 2021-04-06
2
+
3
+ * Fix a fatal conflict when -p is specified.
4
+ ("error: conflicting output format options.")
5
+
1
6
  == 0.4.3 2015-01-05
2
7
 
3
8
  * Do not use colors if the terminal does not support colors.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2015 Akinori MUSHA
1
+ Copyright (c) 2008-2021 Akinori MUSHA
2
2
 
3
3
  All rights reserved.
4
4
 
data/lib/di.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # di - a wrapper around GNU diff(1)
5
5
  #
6
- # Copyright (c) 2008-2015 Akinori MUSHA
6
+ # Copyright (c) 2008-2021 Akinori MUSHA
7
7
  #
8
8
  # All rights reserved.
9
9
  #
@@ -28,9 +28,9 @@
28
28
  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29
29
  # SUCH DAMAGE.
30
30
 
31
- MYVERSION = "0.4.3"
31
+ MYVERSION = "0.4.4"
32
32
  MYNAME = File.basename($0)
33
- MYCOPYRIGHT = "Copyright (c) 2008-2015 Akinori MUSHA"
33
+ MYCOPYRIGHT = "Copyright (c) 2008-2021 Akinori MUSHA"
34
34
 
35
35
  DIFF_CMD = ENV.fetch('DIFF', 'diff')
36
36
  ENV_NAME = "#{MYNAME.tr('-a-z', '_A-Z')}_OPTIONS"
@@ -431,8 +431,9 @@ EOS
431
431
 
432
432
  opts.parse!(args)
433
433
 
434
+ # -U3 must come before -p, otherwise you get "error: conflicting output format options."
434
435
  $diff.format_flags.each { |format_flag|
435
- set_flag(*format_flag)
436
+ prepend_flag(*format_flag)
436
437
  }
437
438
 
438
439
  if $diff.ignore_cvs_lines
@@ -535,6 +536,16 @@ def invoke_colorizer!
535
536
  }
536
537
  end
537
538
 
539
+ def prepend_flag(flag, val)
540
+ case val
541
+ when true, false
542
+ $diff.flags.reject! { |f,| f == flag }
543
+ $diff.flags.unshift [flag] if val
544
+ else
545
+ $diff.flags.unshift [flag, val]
546
+ end
547
+ end
548
+
538
549
  def set_flag(flag, val)
539
550
  case val
540
551
  when true, false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: di
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-05 00:00:00.000000000 Z
11
+ date: 2021-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -51,7 +51,7 @@ homepage: https://github.com/knu/di
51
51
  licenses:
52
52
  - 2-clause BSDL
53
53
  metadata: {}
54
- post_install_message:
54
+ post_install_message:
55
55
  rdoc_options: []
56
56
  require_paths:
57
57
  - lib
@@ -66,12 +66,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubyforge_project:
70
- rubygems_version: 2.2.2
71
- signing_key:
69
+ rubygems_version: 3.0.3
70
+ signing_key:
72
71
  specification_version: 4
73
72
  summary: A wrapper around GNU diff(1)
74
73
  test_files:
75
74
  - test/helper.rb
76
75
  - test/test_di.rb
77
- has_rdoc: