ydiffy 0.0.3 → 0.0.4

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: ebdabe7fec38695e1803b5d909e2c022de065545fe277f291897484e9393db0a
4
- data.tar.gz: a6d4c054837d86ebf9728699b9d7758fa40ddd76e527aaddcd3e74cf7ea1b1b4
3
+ metadata.gz: 6ba6d4ccacd12fd0225293d29cc5c827718cf3b55f2b2ce665b382c2a489fa24
4
+ data.tar.gz: 6a5dc28e465b9ae4c0796ad23cbfe5950e4f802ec0def086f8e2580586a641d0
5
5
  SHA512:
6
- metadata.gz: b283c2a765a052b9e4737bbca15f554bd31795463d3823409c88af2248f8952c82b509486d1ab8ff146b4b3674ce54743d2ccc7782b1cb2d6df5348274e30935
7
- data.tar.gz: fb54cf453e43fe74eab822d84544f39ed399d44acb9efc6ae41ce58af3610fce917ea9cef8133eaae81225b0c2def1e59ecfbf4a1d5aed3f3d12aa7b204c0cea
6
+ metadata.gz: 5f66bdf4b7b2d7f9f882215bdf5f13312f5a1fa3bcf5203a1d0f09d81a454bcece5aa06016b7793b8cc27fc214b5470a85847baacef4ebb3e9d974bd84b68094
7
+ data.tar.gz: 8e6517141b2b2302d37a7d633b55b8bfc36cac7440968d006963f4154a82189447cb2835d5db200c6a7b750e602f0b442926a4f715db2fb745babbf0e30aab12
data/README.md CHANGED
@@ -30,7 +30,7 @@ Installation
30
30
  ------------
31
31
 
32
32
  ### on Unix
33
-
33
+ gem build
34
34
  gem install diffy
35
35
 
36
36
  ### on Windows:
data/lib/diffy/css.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Diffy
2
3
  CSS = <<-STYLE
3
4
  .diff{overflow:auto;}
data/lib/diffy/diff.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Diffy
2
3
  class Diff
3
4
  ORIGINAL_DEFAULT_OPTIONS = {
@@ -144,9 +145,9 @@ module Diffy
144
145
  def to_utf8(line)
145
146
  return unless line
146
147
  return line if line.encoding.to_s.eql?('UTF-8')
147
- if /ISO-8859-1/.match(line.encoding.to_s)
148
+ begin
148
149
  line.encode!('UTF-8')
149
- else
150
+ rescue
150
151
  line.force_encoding('UTF-8')
151
152
  end
152
153
  end
data/lib/diffy/format.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Diffy
2
3
  module Format
3
4
  # ANSI color output suitable for terminal output
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Diffy
2
3
  class HtmlFormatter
3
4
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Diffy
2
3
  class SplitDiff
3
4
  def initialize(left, right, options = {})
data/lib/diffy/version.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Diffy
2
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
3
4
  end
data/lib/diffy.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require 'tempfile'
2
3
  require 'erb'
3
4
  require 'rbconfig'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ydiffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Goldstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-15 00:00:00.000000000 Z
11
+ date: 2023-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake