diffy 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of diffy might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG +4 -0
- data/CONTRIBUTORS +1 -0
- data/diffy.gemspec +1 -1
- data/lib/diffy/html_formatter.rb +2 -2
- data/lib/diffy/version.rb +1 -1
- data/spec/diffy_spec.rb +62 -62
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7d4f4a66634be0ec2d8e97ac84c138449f4db99
|
4
|
+
data.tar.gz: dc22c84c8f59bee43e87ef2a8a2762705b7a31cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b05641f373b4423fdf6f2d1579698be95dc5f09e5d59fe018a77ae0d65c9b06990204baca2df1da4e421d2d011ef160aad31fae52b65885711caa523efb42254
|
7
|
+
data.tar.gz: df73bca729bed4de32b55556d27a058bfc2d103ff130e94ee0c7a7df2bb48b036815ffe0c531e1f12e75afac6ceae78cd1cec5d231edfbc99b4aee6d93b7802e
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
data/CONTRIBUTORS
CHANGED
data/diffy.gemspec
CHANGED
data/lib/diffy/html_formatter.rb
CHANGED
@@ -96,14 +96,14 @@ module Diffy
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def reconstruct_characters(line_diff, type)
|
99
|
-
enum = line_diff.each_chunk
|
99
|
+
enum = line_diff.each_chunk.to_a
|
100
100
|
enum.each_with_index.map do |l, i|
|
101
101
|
re = /(^|\\n)#{Regexp.escape(type)}/
|
102
102
|
case l
|
103
103
|
when re
|
104
104
|
highlight(l)
|
105
105
|
when /^ /
|
106
|
-
if i > 1 and enum
|
106
|
+
if i > 1 and enum[i+1] and l.each_line.to_a.size < 4
|
107
107
|
highlight(l)
|
108
108
|
else
|
109
109
|
l.gsub(/^./, '').gsub("\n", '').
|
data/lib/diffy/version.rb
CHANGED
data/spec/diffy_spec.rb
CHANGED
@@ -20,7 +20,7 @@ describe Diffy::Diff do
|
|
20
20
|
string1 = "foo\nbar\nbang\n"
|
21
21
|
string2 = "foo\nbang\n"
|
22
22
|
path1, path2 = tempfile(string1), tempfile(string2)
|
23
|
-
Diffy::Diff.new(path1, path2, :source => 'files').to_s.
|
23
|
+
expect(Diffy::Diff.new(path1, path2, :source => 'files').to_s).to eq <<-DIFF
|
24
24
|
foo
|
25
25
|
-bar
|
26
26
|
bang
|
@@ -31,7 +31,7 @@ describe Diffy::Diff do
|
|
31
31
|
string1 = "foo\nbar\nbang\n"
|
32
32
|
string2 = "foo\nbang\n"
|
33
33
|
path1, path2 = tempfile(string1, 'path with spaces'), tempfile(string2, 'path with spaces')
|
34
|
-
Diffy::Diff.new(path1, path2, :source => 'files').to_s.
|
34
|
+
expect(Diffy::Diff.new(path1, path2, :source => 'files').to_s).to eq <<-DIFF
|
35
35
|
foo
|
36
36
|
-bar
|
37
37
|
bang
|
@@ -46,7 +46,7 @@ describe Diffy::Diff do
|
|
46
46
|
string1 = "foo\nbar\nbang\n"
|
47
47
|
string2 = "foo\nbang\n"
|
48
48
|
path1, path2 = tempfile(string1, 'path with spaces'), tempfile(string2, 'path with spaces')
|
49
|
-
Diffy::Diff.new(path1, path2, :source => 'files').to_s.
|
49
|
+
expect(Diffy::Diff.new(path1, path2, :source => 'files').to_s).to eq <<-DIFF
|
50
50
|
foo
|
51
51
|
-bar
|
52
52
|
bang
|
@@ -65,8 +65,8 @@ describe Diffy::Diff do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
it "should show everything" do
|
68
|
-
Diffy::Diff.new(@path1, @path2, :source => 'files', :allow_empty_diff => false).
|
69
|
-
to_s.
|
68
|
+
expect(Diffy::Diff.new(@path1, @path2, :source => 'files', :allow_empty_diff => false).
|
69
|
+
to_s).to eq <<-DIFF
|
70
70
|
foo
|
71
71
|
bar
|
72
72
|
bang
|
@@ -74,7 +74,7 @@ describe Diffy::Diff do
|
|
74
74
|
end
|
75
75
|
|
76
76
|
it "should not show everything if the :allow_empty_diff option is set" do
|
77
|
-
Diffy::Diff.new(@path1, @path2, :source => 'files', :allow_empty_diff => true).to_s.
|
77
|
+
expect(Diffy::Diff.new(@path1, @path2, :source => 'files', :allow_empty_diff => true).to_s).to eq('')
|
78
78
|
end
|
79
79
|
end
|
80
80
|
describe "with lines that start with backslashes" do
|
@@ -85,7 +85,7 @@ describe Diffy::Diff do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
it "should not leave lines out" do
|
88
|
-
Diffy::Diff.new(@path1, @path2, :source => 'files').to_s.
|
88
|
+
expect(Diffy::Diff.new(@path1, @path2, :source => 'files').to_s).to eq <<-DIFF
|
89
89
|
foo
|
90
90
|
-\\\\bag
|
91
91
|
+\\\\bar
|
@@ -106,7 +106,7 @@ describe Diffy::Diff do
|
|
106
106
|
+Bar ICS95095010000000000083320000BS01030000004100+\xFF00000000000000000
|
107
107
|
DIFF
|
108
108
|
desired.force_encoding("ASCII-8BIT") if desired.respond_to?(:force_encoding)
|
109
|
-
Diffy::Diff.new(@path1, @path2, :source => 'files').to_s.
|
109
|
+
expect(Diffy::Diff.new(@path1, @path2, :source => 'files').to_s).to eq(desired)
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -117,20 +117,20 @@ describe Diffy::Diff do
|
|
117
117
|
before_tmpfiles = Dir.entries(Dir.tmpdir)
|
118
118
|
d = ::Diffy::Diff.new("a", "b").to_s
|
119
119
|
after_tmpfiles = Dir.entries(Dir.tmpdir)
|
120
|
-
before_tmpfiles.
|
120
|
+
expect(before_tmpfiles).to match_array(after_tmpfiles)
|
121
121
|
end
|
122
122
|
|
123
123
|
it "should still be able to generate multiple diffs" do
|
124
124
|
d = ::Diffy::Diff.new("a", "b")
|
125
|
-
d.to_s.
|
126
|
-
d.to_s(:html).
|
125
|
+
expect(d.to_s).to be_a String
|
126
|
+
expect(d.to_s(:html)).to be_a String
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
130
|
describe "options[:context]" do
|
131
131
|
it "should limit context lines to 1" do
|
132
132
|
diff = Diffy::Diff.new("foo\nfoo\nBAR\nbang\nbaz", "foo\nfoo\nbar\nbang\nbaz", :context => 1)
|
133
|
-
diff.to_s.
|
133
|
+
expect(diff.to_s).to eq <<-DIFF
|
134
134
|
foo
|
135
135
|
-BAR
|
136
136
|
+bar
|
@@ -142,19 +142,19 @@ describe Diffy::Diff do
|
|
142
142
|
describe "options[:include_plus_and_minus_in_html]" do
|
143
143
|
it "defaults to false" do
|
144
144
|
@diffy = Diffy::Diff.new(" foo\nbar\n", "foo\nbar\n")
|
145
|
-
@diffy.options[:include_plus_and_minus_in_html].
|
145
|
+
expect(@diffy.options[:include_plus_and_minus_in_html]).to eq(false)
|
146
146
|
end
|
147
147
|
|
148
148
|
it "can be set to true" do
|
149
149
|
@diffy = Diffy::Diff.new(" foo\nbar\n", "foo\nbar\n", :include_plus_and_minus_in_html=> true )
|
150
|
-
@diffy.options[:include_plus_and_minus_in_html].
|
150
|
+
expect(@diffy.options[:include_plus_and_minus_in_html]).to eq(true)
|
151
151
|
end
|
152
152
|
|
153
153
|
describe "formats" do
|
154
154
|
it "includes symbols in html_simple" do
|
155
155
|
output = Diffy::Diff.new("foo\nbar\nbang\n", "foo\nbang\n", :include_plus_and_minus_in_html => true ).
|
156
156
|
to_s(:html_simple)
|
157
|
-
output.
|
157
|
+
expect(output).to eq <<-HTML
|
158
158
|
<div class="diff">
|
159
159
|
<ul>
|
160
160
|
<li class="unchanged"><span><span class="symbol"> </span>foo</span></li>
|
@@ -168,7 +168,7 @@ describe Diffy::Diff do
|
|
168
168
|
it "includes symbols in html" do
|
169
169
|
output = Diffy::Diff.new("foo\nbar\nbang\n", "foo\naba\nbang\n", :include_plus_and_minus_in_html => true ).
|
170
170
|
to_s(:html)
|
171
|
-
output.
|
171
|
+
expect(output).to eq <<-HTML
|
172
172
|
<div class="diff">
|
173
173
|
<ul>
|
174
174
|
<li class="unchanged"><span><span class="symbol"> </span>foo</span></li>
|
@@ -187,34 +187,34 @@ describe Diffy::Diff do
|
|
187
187
|
describe "options[:include_diff_info]" do
|
188
188
|
it "defaults to false" do
|
189
189
|
@diffy = Diffy::Diff.new(" foo\nbar\n", "foo\nbar\n")
|
190
|
-
@diffy.options[:include_diff_info].
|
190
|
+
expect(@diffy.options[:include_diff_info]).to eq(false)
|
191
191
|
end
|
192
192
|
|
193
193
|
it "can be set to true" do
|
194
194
|
@diffy = Diffy::Diff.new(" foo\nbar\n", "foo\nbar\n", :include_diff_info => true )
|
195
|
-
@diffy.options[:include_diff_info].
|
195
|
+
expect(@diffy.options[:include_diff_info]).to eq(true)
|
196
196
|
end
|
197
197
|
|
198
198
|
it "includes all diff output" do
|
199
199
|
output = Diffy::Diff.new("foo\nbar\nbang\n", "foo\nbang\n", :include_diff_info => true ).to_s
|
200
|
-
output.to_s.
|
201
|
-
output.
|
202
|
-
output.
|
200
|
+
expect(output.to_s).to match( /@@/)
|
201
|
+
expect(output).to match( /---/)
|
202
|
+
expect(output).to match( /\+\+\+/)
|
203
203
|
end
|
204
204
|
|
205
205
|
describe "formats" do
|
206
206
|
it "works for :color" do
|
207
207
|
output = Diffy::Diff.new("foo\nbar\nbang\n", "foo\nbang\n", :include_diff_info => true ).to_s(:color)
|
208
|
-
output.
|
209
|
-
output.to_s.
|
210
|
-
output.to_s.
|
208
|
+
expect(output).to match( /\e\[0m\n\e\[36m\@\@/ )
|
209
|
+
expect(output.to_s).to match( /\e\[90m---/)
|
210
|
+
expect(output.to_s).to match( /\e\[0m\n\e\[90m\+\+\+/)
|
211
211
|
end
|
212
212
|
|
213
213
|
it "works for :html_simple" do
|
214
214
|
output = Diffy::Diff.new("foo\nbar\nbang\n", "foo\nbang\n", :include_diff_info => true ).to_s(:html_simple)
|
215
|
-
output.split("\n").
|
216
|
-
output.
|
217
|
-
output.
|
215
|
+
expect(output.split("\n")).to include( " <li class=\"diff-block-info\"><span>@@ -1,3 +1,2 @@</span></li>" )
|
216
|
+
expect(output).to include( "<li class=\"diff-comment\"><span>---")
|
217
|
+
expect(output).to include( "<li class=\"diff-comment\"><span>+++")
|
218
218
|
end
|
219
219
|
end
|
220
220
|
end
|
@@ -222,7 +222,7 @@ describe Diffy::Diff do
|
|
222
222
|
describe "options[:diff]" do
|
223
223
|
it "should accept an option to diff" do
|
224
224
|
@diff = Diffy::Diff.new(" foo\nbar\n", "foo\nbar\n", :diff => "-w", :allow_empty_diff => false)
|
225
|
-
@diff.to_s.
|
225
|
+
expect(@diff.to_s).to eq <<-DIFF
|
226
226
|
foo
|
227
227
|
bar
|
228
228
|
DIFF
|
@@ -230,7 +230,7 @@ describe Diffy::Diff do
|
|
230
230
|
|
231
231
|
it "should accept multiple arguments to diff" do
|
232
232
|
@diff = Diffy::Diff.new(" foo\nbar\n", "foo\nbaz\n", :diff => ["-w", "-U 3"])
|
233
|
-
@diff.to_s.
|
233
|
+
expect(@diff.to_s).to eq <<-DIFF
|
234
234
|
foo
|
235
235
|
-bar
|
236
236
|
+baz
|
@@ -246,7 +246,7 @@ describe Diffy::Diff do
|
|
246
246
|
end
|
247
247
|
|
248
248
|
it "should show everything" do
|
249
|
-
Diffy::Diff.new(@string1, @string2, :allow_empty_diff => false).to_s.
|
249
|
+
expect(Diffy::Diff.new(@string1, @string2, :allow_empty_diff => false).to_s).to eq <<-DIFF
|
250
250
|
foo
|
251
251
|
bar
|
252
252
|
bang
|
@@ -260,7 +260,7 @@ describe Diffy::Diff do
|
|
260
260
|
end
|
261
261
|
|
262
262
|
it "should show one line removed" do
|
263
|
-
Diffy::Diff.new(@string1, @string2).to_s.
|
263
|
+
expect(Diffy::Diff.new(@string1, @string2).to_s).to eq <<-DIFF
|
264
264
|
foo
|
265
265
|
-bar
|
266
266
|
bang
|
@@ -268,29 +268,29 @@ describe Diffy::Diff do
|
|
268
268
|
end
|
269
269
|
|
270
270
|
it "to_s should accept a format key" do
|
271
|
-
Diffy::Diff.new(@string1, @string2).to_s(:color).
|
272
|
-
|
271
|
+
expect(Diffy::Diff.new(@string1, @string2).to_s(:color)).
|
272
|
+
to eq(" foo\n\e[31m-bar\e[0m\n bang\n")
|
273
273
|
end
|
274
274
|
|
275
275
|
it "should accept a default format option" do
|
276
276
|
old_format = Diffy::Diff.default_format
|
277
277
|
Diffy::Diff.default_format = :color
|
278
|
-
Diffy::Diff.new(@string1, @string2).to_s.
|
279
|
-
|
278
|
+
expect(Diffy::Diff.new(@string1, @string2).to_s).
|
279
|
+
to eq(" foo\n\e[31m-bar\e[0m\n bang\n")
|
280
280
|
Diffy::Diff.default_format = old_format
|
281
281
|
end
|
282
282
|
|
283
283
|
it "should accept a default options" do
|
284
284
|
old_options = Diffy::Diff.default_options
|
285
285
|
Diffy::Diff.default_options = old_options.merge(:include_diff_info => true)
|
286
|
-
Diffy::Diff.new(@string1, @string2).to_s.
|
287
|
-
|
286
|
+
expect(Diffy::Diff.new(@string1, @string2).to_s).
|
287
|
+
to include('@@ -1,3 +1,2 @@')
|
288
288
|
Diffy::Diff.default_options = old_options
|
289
289
|
end
|
290
290
|
|
291
291
|
it "should show one line added" do
|
292
|
-
Diffy::Diff.new(@string2, @string1).to_s.
|
293
|
-
|
292
|
+
expect(Diffy::Diff.new(@string2, @string1).to_s).
|
293
|
+
to eq <<-DIFF
|
294
294
|
foo
|
295
295
|
+bar
|
296
296
|
bang
|
@@ -304,7 +304,7 @@ describe Diffy::Diff do
|
|
304
304
|
@string2 = "foo\nbong\nbang\n"
|
305
305
|
end
|
306
306
|
it "should show one line added and one removed" do
|
307
|
-
Diffy::Diff.new(@string1, @string2).to_s.
|
307
|
+
expect(Diffy::Diff.new(@string1, @string2).to_s).to eq <<-DIFF
|
308
308
|
foo
|
309
309
|
-bar
|
310
310
|
+bong
|
@@ -319,7 +319,7 @@ describe Diffy::Diff do
|
|
319
319
|
@string2 = "one\ntwo\nthree\n"
|
320
320
|
end
|
321
321
|
it "should show one line added and one removed" do
|
322
|
-
Diffy::Diff.new(@string1, @string2).to_s.
|
322
|
+
expect(Diffy::Diff.new(@string1, @string2).to_s).to eq <<-DIFF
|
323
323
|
-foo
|
324
324
|
-bar
|
325
325
|
-bang
|
@@ -337,7 +337,7 @@ describe Diffy::Diff do
|
|
337
337
|
@diff = Diffy::Diff.new(@string1, @string2)
|
338
338
|
end
|
339
339
|
it "should show one line added and one removed" do
|
340
|
-
@diff.to_s.
|
340
|
+
expect(@diff.to_s).to eq <<-DIFF
|
341
341
|
-foo
|
342
342
|
+one
|
343
343
|
+two
|
@@ -350,7 +350,7 @@ describe Diffy::Diff do
|
|
350
350
|
end
|
351
351
|
|
352
352
|
it "should make an awesome simple html diff" do
|
353
|
-
@diff.to_s(:html_simple).
|
353
|
+
expect(@diff.to_s(:html_simple)).to eq <<-HTML
|
354
354
|
<div class="diff">
|
355
355
|
<ul>
|
356
356
|
<li class="del"><del>foo</del></li>
|
@@ -368,7 +368,7 @@ describe Diffy::Diff do
|
|
368
368
|
|
369
369
|
it "should accept overrides to diff's options" do
|
370
370
|
@diff = Diffy::Diff.new(@string1, @string2, :diff => "--rcs")
|
371
|
-
@diff.to_s.
|
371
|
+
expect(@diff.to_s).to eq <<-DIFF
|
372
372
|
d1 1
|
373
373
|
a1 3
|
374
374
|
one
|
@@ -398,7 +398,7 @@ baz
|
|
398
398
|
</ul>
|
399
399
|
</div>
|
400
400
|
HTML
|
401
|
-
@diff.to_s(:html).
|
401
|
+
expect(@diff.to_s(:html)).to eq(html)
|
402
402
|
end
|
403
403
|
|
404
404
|
it "should highlight the changes within the line" do
|
@@ -416,7 +416,7 @@ baz
|
|
416
416
|
</ul>
|
417
417
|
</div>
|
418
418
|
HTML
|
419
|
-
@diff.to_s(:html).
|
419
|
+
expect(@diff.to_s(:html)).to eq(html)
|
420
420
|
end
|
421
421
|
|
422
422
|
it "should not duplicate some lines" do
|
@@ -433,7 +433,7 @@ baz
|
|
433
433
|
</ul>
|
434
434
|
</div>
|
435
435
|
HTML
|
436
|
-
@diff.to_s(:html).
|
436
|
+
expect(@diff.to_s(:html)).to eq(html)
|
437
437
|
end
|
438
438
|
|
439
439
|
it "should escape html" do
|
@@ -450,7 +450,7 @@ baz
|
|
450
450
|
</ul>
|
451
451
|
</div>
|
452
452
|
HTML
|
453
|
-
@diff.to_s(:html).
|
453
|
+
expect(@diff.to_s(:html)).to eq(html)
|
454
454
|
end
|
455
455
|
|
456
456
|
it "should not double escape html in wierd edge cases" do
|
@@ -465,7 +465,7 @@ baz
|
|
465
465
|
</ul>
|
466
466
|
</div>
|
467
467
|
HTML
|
468
|
-
@diff.to_s(:html).
|
468
|
+
expect(@diff.to_s(:html)).to eq(html)
|
469
469
|
end
|
470
470
|
|
471
471
|
it "should highlight the changes within the line with windows style line breaks" do
|
@@ -483,7 +483,7 @@ baz
|
|
483
483
|
</ul>
|
484
484
|
</div>
|
485
485
|
HTML
|
486
|
-
@diff.to_s(:html).
|
486
|
+
expect(@diff.to_s(:html)).to eq(html)
|
487
487
|
end
|
488
488
|
|
489
489
|
it "should treat unix vs windows newlines as differences" do
|
@@ -500,7 +500,7 @@ baz
|
|
500
500
|
</ul>
|
501
501
|
</div>
|
502
502
|
HTML
|
503
|
-
@diff.to_s(:html).
|
503
|
+
expect(@diff.to_s(:html)).to eq(html)
|
504
504
|
end
|
505
505
|
|
506
506
|
describe 'with lines that include \n' do
|
@@ -512,7 +512,7 @@ baz
|
|
512
512
|
end
|
513
513
|
|
514
514
|
it "should not leave lines out" do
|
515
|
-
Diffy::Diff.new(@string1, @string2 ).to_s(:html).
|
515
|
+
expect(Diffy::Diff.new(@string1, @string2 ).to_s(:html)).to eq <<-DIFF
|
516
516
|
<div class="diff">
|
517
517
|
<ul>
|
518
518
|
<li class="del"><del>a<strong>\\n</strong>b</del></li>
|
@@ -526,7 +526,7 @@ baz
|
|
526
526
|
it "should do highlighting on the last line when there's no trailing newlines" do
|
527
527
|
s1 = "foo\nbar\nbang"
|
528
528
|
s2 = "foo\nbar\nbangleize"
|
529
|
-
Diffy::Diff.new(s1,s2).to_s(:html).
|
529
|
+
expect(Diffy::Diff.new(s1,s2).to_s(:html)).to eq <<-DIFF
|
530
530
|
<div class="diff">
|
531
531
|
<ul>
|
532
532
|
<li class="unchanged"><span>foo</span></li>
|
@@ -541,36 +541,36 @@ baz
|
|
541
541
|
|
542
542
|
it "should escape diffed html in html output" do
|
543
543
|
diff = Diffy::Diff.new("<script>alert('bar')</script>", "<script>alert('foo')</script>").to_s(:html)
|
544
|
-
diff.
|
545
|
-
diff.
|
544
|
+
expect(diff).to include('<script>')
|
545
|
+
expect(diff).not_to include('<script>')
|
546
546
|
end
|
547
547
|
|
548
548
|
it "should be easy to generate custom format" do
|
549
|
-
Diffy::Diff.new("foo\nbar\n", "foo\nbar\nbaz\n").map do |line|
|
549
|
+
expect(Diffy::Diff.new("foo\nbar\n", "foo\nbar\nbaz\n").map do |line|
|
550
550
|
case line
|
551
551
|
when /^\+/ then "line #{line.chomp} added"
|
552
552
|
when /^-/ then "line #{line.chomp} removed"
|
553
553
|
end
|
554
|
-
end.compact.join.
|
554
|
+
end.compact.join).to eq("line +baz added")
|
555
555
|
end
|
556
556
|
|
557
557
|
it "should let you iterate over chunks instead of lines" do
|
558
|
-
Diffy::Diff.new("foo\nbar\n", "foo\nbar\nbaz\n").each_chunk.map do |chunk|
|
558
|
+
expect(Diffy::Diff.new("foo\nbar\n", "foo\nbar\nbaz\n").each_chunk.map do |chunk|
|
559
559
|
chunk
|
560
|
-
end.
|
560
|
+
end).to eq([" foo\n bar\n", "+baz\n"])
|
561
561
|
end
|
562
562
|
|
563
563
|
it "should allow chaining enumerable methods" do
|
564
|
-
Diffy::Diff.new("foo\nbar\n", "foo\nbar\nbaz\n").each.map do |line|
|
564
|
+
expect(Diffy::Diff.new("foo\nbar\n", "foo\nbar\nbaz\n").each.map do |line|
|
565
565
|
line
|
566
|
-
end.
|
566
|
+
end).to eq([" foo\n", " bar\n", "+baz\n"])
|
567
567
|
end
|
568
568
|
end
|
569
569
|
end
|
570
570
|
|
571
571
|
describe 'Diffy::CSS' do
|
572
572
|
it "should be some css" do
|
573
|
-
Diffy::CSS.
|
573
|
+
expect(Diffy::CSS).to include 'diff{overflow:auto;}'
|
574
574
|
end
|
575
575
|
end
|
576
576
|
|
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.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Goldstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.14'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.14'
|
41
41
|
description: Convenient diffing in ruby
|
42
42
|
email:
|
43
43
|
- sgrock@gmail.org
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.2.
|
86
|
+
rubygems_version: 2.2.2
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: A convenient way to diff string in ruby
|