levenshtein-ffi 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  README.markdown.html
2
2
  *.rbc
3
+ pkg
4
+ .*.sw?
@@ -0,0 +1,7 @@
1
+ 1.0.1
2
+ -----
3
+ * Support loading .so files on Linux, whoops!
4
+
5
+ 1.0.0
6
+ -----
7
+ * Birthday
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{levenshtein-ffi}
8
- s.version = "1.0.0"
8
+ s.version = "1.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Balatero"]
12
- s.date = %q{2010-11-03}
12
+ s.date = %q{2010-11-04}
13
13
  s.description = %q{Provides a fast, cross-Ruby implementation of the levenshtein distance algorithm.}
14
14
  s.email = %q{dbalatero@gmail.com}
15
15
  s.extensions = ["ext/levenshtein/extconf.rb"]
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".gitignore",
21
+ "CHANGELOG.markdown",
21
22
  "Gemfile",
22
23
  "README.markdown",
23
24
  "Rakefile",
@@ -3,12 +3,10 @@ require 'ffi'
3
3
  module Levenshtein
4
4
  extend FFI::Library
5
5
 
6
+ # Try loading in order.
6
7
  library = File.dirname(__FILE__) + "/../ext/levenshtein/levenshtein"
7
- begin
8
- ffi_lib(library)
9
- rescue LoadError
10
- ffi_lib(library + ".bundle")
11
- end
12
-
8
+ candidates = ['.bundle', '.so', '.dylib', ''].map { |ext| library + ext }
9
+ ffi_lib(candidates)
10
+
13
11
  attach_function :distance, :levenshtein, [:string, :string], :int
14
12
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: levenshtein-ffi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Balatero
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-03 00:00:00 -07:00
18
+ date: 2010-11-04 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -70,6 +70,7 @@ extra_rdoc_files:
70
70
  - README.markdown
71
71
  files:
72
72
  - .gitignore
73
+ - CHANGELOG.markdown
73
74
  - Gemfile
74
75
  - README.markdown
75
76
  - Rakefile