-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4508599
commit eb091bf
Showing
4 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
if RUBY_ENGINE == 'ruby' | ||
require 'mkmf' | ||
$CFLAGS << ' -std=c99 ' | ||
create_makefile('jaro_winkler/jaro_winkler_ext') | ||
else | ||
open('Makefile', 'wb') do |file| | ||
file.write <<-MAKEFILE | ||
.PHONY: install | ||
install: | ||
\techo "Cannot compile C Extension, fall back to pure Ruby version." | ||
clean: | ||
MAKEFILE | ||
end | ||
end | ||
require 'mkmf' | ||
$CFLAGS << ' -std=c99 ' | ||
create_makefile('jaro_winkler/jaro_winkler_ext') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'jaro_winkler/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'jaro_winkler' | ||
spec.version = JaroWinkler::VERSION | ||
spec.authors = ['Jian Weihang'] | ||
spec.email = 'tonytonyjan@gmail.com' | ||
spec.summary = 'An implementation of Jaro-Winkler distance algorithm written \ | ||
in C extension which supports any kind of string encoding.' | ||
spec.description = 'jaro_winkler is an implementation of Jaro-Winkler \ | ||
distance algorithm which is written in C extension and will fallback to pure \ | ||
Ruby version in platforms other than MRI/KRI like JRuby or Rubinius. Both of \ | ||
C and Ruby implementation support any kind of string encoding, such as \ | ||
UTF-8, EUC-JP, Big5, etc.' | ||
spec.homepage = 'https://github.com/tonytonyjan/jaro_winkler' | ||
spec.license = 'MIT' | ||
spec.files = Dir['lib/**/*.rb'] | ||
spec.add_development_dependency 'bundler', '~> 1.7' | ||
spec.add_development_dependency 'rake', '~> 12.0' | ||
spec.add_development_dependency 'rake-compiler' | ||
spec.add_development_dependency 'minitest' | ||
spec.platform = 'java' | ||
end |