pretty_diff 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/pretty_diff/html_generators/line_numbers_generator.rb +12 -3
- data/pretty_diff.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
@@ -13,16 +13,25 @@ class PrettyDiff::LineNumbersGenerator
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def left_column
|
16
|
-
line_numbers.left_column.join("\n")
|
16
|
+
empty_lines_to_whitespace(line_numbers.left_column).join("\n")
|
17
17
|
end
|
18
18
|
|
19
19
|
def right_column
|
20
|
-
line_numbers.right_column.join("\n")
|
20
|
+
empty_lines_to_whitespace(line_numbers.right_column).join("\n")
|
21
|
+
end
|
22
|
+
|
23
|
+
def empty_lines_to_whitespace(numbers)
|
24
|
+
result = []
|
25
|
+
numbers.each do |v|
|
26
|
+
result << (v.nil? ? ' ' : v)
|
27
|
+
end
|
28
|
+
result
|
21
29
|
end
|
22
30
|
|
23
31
|
def column_html(text)
|
24
32
|
%Q[<div class="code-lines"><pre>
|
25
|
-
#{text}
|
33
|
+
#{text}
|
34
|
+
</pre></div>]
|
26
35
|
end
|
27
36
|
|
28
37
|
end
|
data/pretty_diff.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pretty_diff}
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ilya Sabanin"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-01-27}
|
13
13
|
s.description = %q{PrettyDiff is a highly customizable library for creating fully featured HTML
|
14
14
|
listings out of unified diff format strings.
|
15
15
|
Include copy/paste-safe line numbers and built-in syntax highlighting.}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pretty_diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 1
|
10
|
+
version: 0.8.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ilya Sabanin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-01-27 00:00:00 +07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|