Browse files

restore .version method, fix require paths

  • Loading branch information...
1 parent 9bd7d85 commit 0333d5588ba4922795349229b6865875094f10a0 @lazylester committed May 14, 2013
View
3 damerau-levenshtein.gemspec
@@ -1,6 +1,6 @@
$:.push File.expand_path("../lib", __FILE__)
-require "damerau-levenshtein/version"
+require "damerau_levenshtein/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
s.email = 'dmozzherin@gmail.com'
s.files = `git ls-files`.split("\n")
s.extensions = ['ext/damerau_levenshtein/extconf.rb']
+ s.require_paths = ["lib", "lib/damerau_levenshtein"]
s.add_dependency 'bundler', '~> 1.0'
s.add_dependency 'rake', '~> 10.0'
View
8 lib/damerau-levenshtein.rb
@@ -1,11 +1,15 @@
# encoding: UTF-8
-require 'damerau_levenshtein_binding'
-require 'damerau-levenshtein/version'
+require 'damerau_levenshtein/damerau_levenshtein_binding'
+require 'damerau_levenshtein/version'
module DamerauLevenshtein
extend DamerauLevenshteinBinding
+ def self.version
+ VERSION
+ end
+
def self.distance(str1, str2, block_size = 1, max_distance = 10)
distance_utf(str1.unpack('U*'), str2.unpack('U*'), block_size, max_distance)
end
View
0 lib/damerau-levenshtein/version.rb → lib/damerau_levenshtein/version.rb
File renamed without changes.

0 comments on commit 0333d55

Please sign in to comment.