differ 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,29 @@
1
+ require 'rubygems'
2
+
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ require 'differ'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
10
+
11
+ def diff(*parts)
12
+ x = Differ::Diff.new
13
+ x.instance_variable_set(:@raw, parts)
14
+ return x
15
+ end
16
+
17
+ class String
18
+ def +@
19
+ Differ::Change.new(:insert => self)
20
+ end
21
+
22
+ def -@
23
+ Differ::Change.new(:delete => self)
24
+ end
25
+
26
+ def >>(to)
27
+ Differ::Change.new(:delete => self, :insert => to)
28
+ end
29
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: differ
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Pieter Vande Bruggen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-03-29 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: pvande@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.rdoc
24
+ files:
25
+ - README.rdoc
26
+ - VERSION.yml
27
+ - lib/differ/change.rb
28
+ - lib/differ/diff.rb
29
+ - lib/differ/format/ascii.rb
30
+ - lib/differ/format/color.rb
31
+ - lib/differ/format/html.rb
32
+ - lib/differ/string.rb
33
+ - lib/differ.rb
34
+ - spec/differ/change_spec.rb
35
+ - spec/differ/diff_spec.rb
36
+ - spec/differ/format/ascii_spec.rb
37
+ - spec/differ/format/color_spec.rb
38
+ - spec/differ/format/html_spec.rb
39
+ - spec/differ/string_spec.rb
40
+ - spec/differ_spec.rb
41
+ - spec/spec_helper.rb
42
+ has_rdoc: true
43
+ homepage: http://github.com/pvande/differ
44
+ licenses: []
45
+
46
+ post_install_message:
47
+ rdoc_options:
48
+ - --inline-source
49
+ - --charset=UTF-8
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ requirements: []
65
+
66
+ rubyforge_project:
67
+ rubygems_version: 1.3.5
68
+ signing_key:
69
+ specification_version: 2
70
+ summary: A simple gem for generating string diffs
71
+ test_files: []
72
+