difflcs 0.6.8 → 0.6.9

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.
@@ -0,0 +1,14 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ tmp
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
- *0.6.7* (23 June 2012)
1
+ *0.6.9* (24 June 2012)
2
2
 
3
- * Moved to Github, re-released using bundler under MIT license
3
+ * Moved to Github
4
+ * Re-released using bundler
5
+ * Re-licensed under MIT license
6
+ * Updated docs
4
7
 
5
8
 
6
9
  *0.6.6* (4 June 2009)
data/README.md CHANGED
@@ -60,8 +60,16 @@ Or install it yourself as:
60
60
 
61
61
  $ gem install difflcs
62
62
 
63
+ Feel free to report issues and to ask questions. For the latest news on
64
+ DiffLCS:
65
+
66
+ * http://foundation.logilogi.org/tags/DiffLCS
67
+
63
68
  ## Contributing
64
69
 
70
+ If you wish to contribute, please create a pull-request and remember to update
71
+ the corresponding unit test(s).
72
+
65
73
  1. Fork it
66
74
  2. Create your feature branch (`git checkout -b my-new-feature`)
67
75
  3. Commit your changes (`git commit -am 'Added some feature'`)
data/Rakefile CHANGED
@@ -3,8 +3,5 @@ require "bundler/gem_tasks"
3
3
  require 'rake/testtask'
4
4
 
5
5
  task :default => :test
6
-
7
6
  require 'rake/testtask'
8
- Rake::TestTask.new do |test|
9
- test.libs << 'lib' << 'test'
10
- end
7
+ Rake::TestTask.new
@@ -7,10 +7,9 @@ Gem::Specification.new do |gem|
7
7
  gem.description = "A resonably fast diff algoritm using longest common substrings that can also detect text that has moved"
8
8
  gem.summary = "Diff algoritm that can detect text that has moved"
9
9
  gem.homepage = "https://github.com/wybo/difflcs"
10
- gem.rubyforge_project = "difflcs"
11
10
 
12
11
  gem.files = `git ls-files`.split($\)
13
- gem.test_files = gem.files.grep(%r{^test/.*_test.rb})
12
+ gem.test_files = gem.files.grep(%r{^test/test_.*})
14
13
  gem.name = "difflcs"
15
14
  gem.require_paths = ["lib"]
16
15
  gem.version = DiffLCS::VERSION
@@ -4,26 +4,8 @@
4
4
  # MIT Licensed
5
5
  #++#
6
6
 
7
- require "diff_l_c_s/version"
8
7
  require 'position_range'
9
-
10
- module DiffLCS
11
- # Diffs self with other, see DiffLCS#diff
12
- #
13
- def diff(other, options = {})
14
- DiffLCS.diff(self.split(''), other.split(''), options)
15
- end
16
-
17
- # Diffs words in self with other, see DiffLCS#diff
18
- #
19
- # Words are non-spaces or groups of spaces delimited by either
20
- # spaces or the beginning or the end of the string.
21
- #
22
- def word_diff(other, options = {})
23
- DiffLCS.word_diff(self, other, options)
24
- end
25
- end
26
-
8
+ require 'diff_l_c_s/version'
27
9
  require 'diff_l_c_s/counter'
28
10
  require 'diff_l_c_s/word_split_array'
29
11
 
@@ -127,4 +109,19 @@ module DiffLCS
127
109
  :matched_new => in_new_p_r_list}
128
110
  end
129
111
  end
112
+
113
+ # Diffs self with other, see DiffLCS#diff
114
+ #
115
+ def diff(other, options = {})
116
+ DiffLCS.diff(self.split(''), other.split(''), options)
117
+ end
118
+
119
+ # Diffs words in self with other, see DiffLCS#diff
120
+ #
121
+ # Words are non-spaces or groups of spaces delimited by either
122
+ # spaces or the beginning or the end of the string.
123
+ #
124
+ def word_diff(other, options = {})
125
+ DiffLCS.word_diff(self, other, options)
126
+ end
130
127
  end
@@ -1,3 +1,3 @@
1
1
  module DiffLCS
2
- VERSION = "0.6.8"
2
+ VERSION = '0.6.9'
3
3
  end
@@ -1,3 +1,5 @@
1
+ $:.unshift File.expand_path('../../lib', __FILE__)
2
+
1
3
  require 'stringio'
2
4
  require 'test/unit'
3
- require 'difflcs'
5
+ require 'diff_l_c_s'
@@ -1,5 +1,5 @@
1
1
  ['rubygems', 'require_relative'].each {|g| require g} if RUBY_VERSION =~ /1\.8/
2
- require_relative "helper"
2
+ require_relative 'helper'
3
3
 
4
4
  class CounterTest < Test::Unit::TestCase
5
5
 
@@ -1,7 +1,7 @@
1
1
  ['rubygems', 'require_relative'].each {|g| require g} if RUBY_VERSION =~ /1\.8/
2
- require_relative "helper"
2
+ require_relative 'helper'
3
3
 
4
- require "diff_l_c_s/string"
4
+ require 'diff_l_c_s/string'
5
5
 
6
6
  class DiffLCSTest < Test::Unit::TestCase
7
7
  ### Class methods
@@ -1,5 +1,5 @@
1
1
  ['rubygems', 'require_relative'].each {|g| require g} if RUBY_VERSION =~ /1\.8/
2
- require_relative "helper"
2
+ require_relative 'helper'
3
3
 
4
4
  class WordSplitArrayTest < Test::Unit::TestCase
5
5
  ### Initialization
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: difflcs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 8
10
- version: 0.6.8
9
+ - 9
10
+ version: 0.6.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wybo Wiersma
@@ -84,6 +84,7 @@ extensions: []
84
84
  extra_rdoc_files: []
85
85
 
86
86
  files:
87
+ - .gitignore
87
88
  - CHANGELOG
88
89
  - Gemfile
89
90
  - LICENSE
@@ -129,10 +130,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
130
  version: "0"
130
131
  requirements: []
131
132
 
132
- rubyforge_project: difflcs
133
+ rubyforge_project:
133
134
  rubygems_version: 1.6.2
134
135
  signing_key:
135
136
  specification_version: 3
136
137
  summary: Diff algoritm that can detect text that has moved
137
- test_files: []
138
-
138
+ test_files:
139
+ - test/test_counter.rb
140
+ - test/test_diff_l_c_s.rb
141
+ - test/test_word_split_array.rb