pretty_diff 0.7.0 → 0.8.0

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.
@@ -16,7 +16,7 @@ A quick example will tell it all:
16
16
 
17
17
  Wrap it with HTML, add some styles and you will get something like this:
18
18
 
19
- http://ilya.sabanin.ru/projects/pretty_diff_example.html
19
+ http://rubybrothers.ru/assets/2010/1/16/pretty_diff.jpg
20
20
 
21
21
  == Features
22
22
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.8.0
@@ -18,18 +18,24 @@ private
18
18
  def content
19
19
  chunk.lines.map{|l| l.to_html }.join("\n")
20
20
  end
21
+
22
+ def wrapper_class
23
+ klass = "code-viewer"
24
+ klass << ' chunk' if chunk.diff.chunks.size > 1
25
+ klass
26
+ end
21
27
 
22
28
  def start_html
23
- %Q[<tr>]
29
+ %Q[<div class="#{ wrapper_class }">]
24
30
  end
25
31
 
26
32
  def code_html(text)
27
- %Q[<td class="code"><div class="highlight"><pre>
28
- #{text}</pre></div></td>]
33
+ %Q[<div class="code-list"><pre>
34
+ #{text}</pre></div>]
29
35
  end
30
36
 
31
37
  def end_html
32
- %Q[</tr>]
38
+ %Q[</div>]
33
39
  end
34
40
 
35
41
  end
@@ -14,15 +14,15 @@ class PrettyDiff::DiffGenerator
14
14
  private
15
15
 
16
16
  def intro_html
17
- %Q[<table class="highlighttable">]
17
+ %Q[]
18
18
  end
19
19
 
20
20
  def chunk_separator_html
21
- %Q[<tr class="chunk_separator"><td colspan="3"></td></tr>]
21
+ %Q[]
22
22
  end
23
23
 
24
24
  def outro_html
25
- %Q[</table>]
25
+ %Q[]
26
26
  end
27
27
 
28
28
  end
@@ -21,8 +21,8 @@ private
21
21
  end
22
22
 
23
23
  def column_html(text)
24
- %Q[<td width="2%" class="linenos"><pre>
25
- #{text}</pre></td>]
24
+ %Q[<div class="code-lines"><pre>
25
+ #{text}</pre></div>]
26
26
  end
27
27
 
28
28
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pretty_diff}
8
- s.version = "0.7.0"
8
+ s.version = "0.8.0"
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{2010-09-09}
12
+ s.date = %q{2010-12-21}
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.}
@@ -46,7 +46,7 @@ Gem::Specification.new do |s|
46
46
  s.homepage = %q{http://github.com/isabanin/pretty_diff}
47
47
  s.rdoc_options = ["--charset=UTF-8"]
48
48
  s.require_paths = ["lib"]
49
- s.rubygems_version = %q{1.3.5}
49
+ s.rubygems_version = %q{1.3.7}
50
50
  s.summary = %q{Library for converting unified diff format into HTML listings.}
51
51
  s.test_files = [
52
52
  "test/chunk_test.rb",
@@ -60,7 +60,7 @@ Gem::Specification.new do |s|
60
60
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
61
61
  s.specification_version = 3
62
62
 
63
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
63
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
64
64
  s.add_development_dependency(%q<shoulda>, [">= 0"])
65
65
  else
66
66
  s.add_dependency(%q<shoulda>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ hash: 63
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 0
10
+ version: 0.8.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - Ilya Sabanin
@@ -9,19 +15,23 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-09-09 00:00:00 +08:00
18
+ date: 2010-12-21 00:00:00 +01:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: shoulda
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
23
32
  version: "0"
24
- version:
33
+ type: :development
34
+ version_requirements: *id001
25
35
  description: |-
26
36
  PrettyDiff is a highly customizable library for creating fully featured HTML
27
37
  listings out of unified diff format strings.
@@ -68,21 +78,27 @@ rdoc_options:
68
78
  require_paths:
69
79
  - lib
70
80
  required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
71
82
  requirements:
72
83
  - - ">="
73
84
  - !ruby/object:Gem::Version
85
+ hash: 3
86
+ segments:
87
+ - 0
74
88
  version: "0"
75
- version:
76
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
77
91
  requirements:
78
92
  - - ">="
79
93
  - !ruby/object:Gem::Version
94
+ hash: 3
95
+ segments:
96
+ - 0
80
97
  version: "0"
81
- version:
82
98
  requirements: []
83
99
 
84
100
  rubyforge_project:
85
- rubygems_version: 1.3.5
101
+ rubygems_version: 1.3.7
86
102
  signing_key:
87
103
  specification_version: 3
88
104
  summary: Library for converting unified diff format into HTML listings.