ruby-stemmer 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5dbc48a9cab081a36f22eed41424dd6d7341cd2b
4
+ data.tar.gz: db5d8748469945014bd36c3f79535863ca8b8543
5
+ SHA512:
6
+ metadata.gz: 7fbeec56ffd4475f7e84b7242be98571abe40c1e610dc73dd44686b91cf21eb213b35507efeffb5c40c6a26508ab9b4f5ba535dc0eb49ba81b8309990aace444
7
+ data.tar.gz: e325e7d527f3f6343756fa183720a9655c4cef188a0ef6a9252ef595d27509b64a988fa5c76b1b591a9f50e58d4b35a290d6f600d21632ccb2532fb9b10ff7c1
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2011 Aurelian Oancea
1
+ Copyright (c) 2008-2015 Aurelian Oancea
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -52,6 +52,10 @@ For more details about libstemmer_c please visit the {SnowBall website}[http://s
52
52
 
53
53
  There's also a Windows (Fat bin) compiled against ruby 1.9.3 and ruby 1.8.7.
54
54
 
55
+ gem install ruby-stemmer --platform=x86-mingw32
56
+
57
+ As far as I know the above should work with {rubyinstaller}[http://rubyinstaller.org/]. If if fails, you could try with:
58
+
55
59
  gem install ruby-stemmer --platform=x86-mswin32
56
60
 
57
61
  {It's known}[http://cl.ly/BX9o] to work under Windows XP.
data/Rakefile CHANGED
@@ -1,63 +1,30 @@
1
1
  require 'rubygems'
2
- require 'rake'
2
+ require 'bundler/setup'
3
3
 
4
- gem 'rake-compiler', '~>0.7'
4
+ require 'rdoc/task'
5
+ require 'rake/testtask'
6
+ require "bundler/gem_tasks"
5
7
  require 'rake/extensiontask'
8
+ require 'rubygems/package_task'
6
9
 
7
- require 'jeweler'
8
- $jeweler = Jeweler::Tasks.new do |gem|
9
- gem.name = "ruby-stemmer"
10
- gem.version = File.read(File.expand_path(File.join(File.dirname(__FILE__),"VERSION"))).strip!
11
- gem.summary = %Q{Expose libstemmer_c to Ruby.}
12
- gem.description = %Q{Expose the bundled libstemmer_c library to Ruby.}
13
- gem.email = "oancea@gmail.com"
14
- gem.homepage = "http://github.com/aurelian/ruby-stemmer"
15
- gem.authors = ["Aurelian Oancea", "Yury Korolev"]
16
- gem.extensions = ["ext/lingua/extconf.rb"]
17
- gem.rubyforge_project = "ruby-stemmer"
18
- gem.files = FileList['lib/**/*.rb', 'README.rdoc', 'MIT-LICENSE', 'VERSION', 'Rakefile', 'libstemmer_c/**/*', 'ext/**/*', 'test/**/*']
19
- %w(ext/lingua/*.so ext/lingua/*.bundle ext/lingua/Makefile ext/lingua/mkmf.log ext/lingua/*.o libstemmer_c/**/*.o libstemmer_c/stemwords).each do | f |
20
- gem.files.exclude f
21
- end
22
- end
10
+ CLOBBER.include("libstemmer_c/**/*.o")
23
11
 
24
- Jeweler::GemcutterTasks.new
12
+ GEMSPEC = Gem::Specification.load("ruby-stemmer.gemspec")
25
13
 
26
- require 'rake/testtask'
27
14
  Rake::TestTask.new(:test) do |test|
28
15
  test.libs << 'lib' << 'test'
29
16
  test.pattern = 'test/**/test_*.rb'
30
17
  test.verbose = true
31
18
  end
32
19
 
33
- begin
34
- require 'rcov/rcovtask'
35
- Rcov::RcovTask.new do |test|
36
- test.libs << 'test'
37
- test.pattern = 'test/**/test_*.rb'
38
- test.verbose = true
39
- end
40
- rescue LoadError
41
- task :rcov do
42
- abort "RCov is not available. In order to run rcov, you must: gem install rcov"
43
- end
44
- end
45
-
46
- task :test => :check_dependencies
47
-
48
- task :default => :test
49
-
50
- CLOBBER.include("libstemmer_c/**/*.o")
51
-
52
- Rake::ExtensionTask.new('ruby-stemmer', $jeweler.jeweler.gemspec) do |ext|
20
+ Rake::ExtensionTask.new('ruby-stemmer', GEMSPEC) do |ext|
53
21
  ext.lib_dir = File.join(*['lib', 'lingua', ENV['FAT_DIR']].compact)
54
22
  ext.ext_dir = File.join 'ext', 'lingua'
55
23
  ext.cross_compile = true
56
24
  ext.cross_platform = ['i386-mswin32-60', 'i386-mingw32']
57
- ext.name = 'stemmer_native'
25
+ ext.name = 'stemmer_native'
58
26
  end
59
27
 
60
- require 'rdoc/task'
61
28
  Rake::RDocTask.new do |rdoc|
62
29
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
63
30
  rdoc.rdoc_dir = 'rdoc'
@@ -68,3 +35,6 @@ Rake::RDocTask.new do |rdoc|
68
35
  rdoc.rdoc_files.include('ext/lingua/stemmer.c')
69
36
  rdoc.rdoc_files.include('MIT-LICENSE')
70
37
  end
38
+
39
+ task :default => [:clobber, :compile, :test]
40
+
@@ -10,6 +10,11 @@ make= (RUBY_PLATFORM =~ /freebsd/)? 'gmake' : 'make'
10
10
 
11
11
  # MacOS architecture mess up
12
12
  if RUBY_PLATFORM =~ /darwin/
13
+ # Config has been deprecated since 1.9.3, and removed since 2.2.0
14
+ if defined?(RbConfig)
15
+ Config = RbConfig
16
+ end
17
+
13
18
  # see: #issue/3, #issue/5
14
19
  begin
15
20
  ENV['ARCHFLAGS']= "-arch " + %x[file #{File.expand_path(File.join(Config::CONFIG['bindir'], Config::CONFIG['RUBY_INSTALL_NAME']))}].strip!.match(/executable (.+)$/)[1] unless ENV['ARCHFLAGS'].nil?
@@ -4,6 +4,8 @@ else
4
4
  require 'lingua/stemmer_native'
5
5
  end
6
6
 
7
+ require 'lingua/version'
8
+
7
9
  module Lingua
8
10
  def self.stemmer(o, options={})
9
11
  stemmer = Stemmer.new(options)
@@ -25,7 +27,6 @@ module Lingua
25
27
  end
26
28
 
27
29
  class Stemmer
28
- VERSION = File.read(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "VERSION"))).strip!
29
30
 
30
31
  attr_reader :language
31
32
  attr_reader :encoding
data/test/helper.rb CHANGED
@@ -1,3 +1,8 @@
1
1
  require 'rubygems'
2
- require 'test/unit'
3
- require 'lingua/stemmer'
2
+ require 'bundler/setup'
3
+
4
+ require 'minitest/autorun'
5
+
6
+ $LOAD_PATH.unshift File.expand_path '../lib', __FILE__
7
+ require "lingua/stemmer"
8
+
@@ -1,27 +1,27 @@
1
1
  # encoding: utf-8
2
2
  require 'helper'
3
3
 
4
- class TestStemmer < Test::Unit::TestCase
4
+ class TestStemmer < Minitest::Test
5
5
 
6
6
  def test_stemmer_creation
7
7
  assert_kind_of ::Lingua::Stemmer, ::Lingua::Stemmer.new
8
8
  end
9
9
 
10
10
  def test_exceptions
11
- assert_raise ::Lingua::StemmerError do
11
+ assert_raises ::Lingua::StemmerError do
12
12
  # invalid encoding for language
13
13
  ::Lingua::Stemmer.new :language => "ro", :encoding => "ISO_8859_1"
14
14
  end
15
- assert_raise ::Lingua::StemmerError do
15
+ assert_raises ::Lingua::StemmerError do
16
16
  # invalid language
17
17
  ::Lingua::Stemmer.new :language => "cat"
18
18
  end
19
19
  end
20
20
 
21
21
  def test_latin
22
- assert_nothing_raised do
23
- ::Lingua::Stemmer.new :language => "latin", :encoding => "ISO_8859_1"
24
- end
22
+ ::Lingua::Stemmer.new :language => "latin", :encoding => "ISO_8859_1"
23
+ rescue StandardError => error
24
+ flunk "Expected latin to be loaded but failed with #{error}"
25
25
  end
26
26
 
27
27
  def test_stem
metadata CHANGED
@@ -1,38 +1,69 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-stemmer
3
- version: !ruby/object:Gem::Version
4
- hash: 61
5
- prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 3
10
- version: 0.9.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.4
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Aurelian Oancea
14
8
  - Yury Korolev
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2011-11-06 00:00:00 Z
20
- dependencies: []
21
-
12
+ date: 2015-02-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake-compiler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 0.9.2
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 0.9.2
28
+ - !ruby/object:Gem::Dependency
29
+ name: minitest
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 5.5.1
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 5.5.1
42
+ - !ruby/object:Gem::Dependency
43
+ name: rdoc
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 4.2.0
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 4.2.0
22
56
  description: Expose the bundled libstemmer_c library to Ruby.
23
57
  email: oancea@gmail.com
24
58
  executables: []
25
-
26
- extensions:
59
+ extensions:
27
60
  - ext/lingua/extconf.rb
28
- extra_rdoc_files:
61
+ extra_rdoc_files:
29
62
  - README.rdoc
30
- - TODO
31
- files:
63
+ files:
32
64
  - MIT-LICENSE
33
65
  - README.rdoc
34
66
  - Rakefile
35
- - VERSION
36
67
  - ext/lingua/extconf.rb
37
68
  - ext/lingua/stemmer.c
38
69
  - lib/lingua/stemmer.rb
@@ -122,39 +153,28 @@ files:
122
153
  - libstemmer_c/src_c/stem_UTF_8_turkish.h
123
154
  - test/helper.rb
124
155
  - test/lingua/test_stemmer.rb
125
- - TODO
126
156
  homepage: http://github.com/aurelian/ruby-stemmer
127
- licenses: []
128
-
157
+ licenses:
158
+ - MIT
159
+ metadata: {}
129
160
  post_install_message:
130
161
  rdoc_options: []
131
-
132
- require_paths:
162
+ require_paths:
133
163
  - lib
134
- required_ruby_version: !ruby/object:Gem::Requirement
135
- none: false
136
- requirements:
164
+ required_ruby_version: !ruby/object:Gem::Requirement
165
+ requirements:
137
166
  - - ">="
138
- - !ruby/object:Gem::Version
139
- hash: 3
140
- segments:
141
- - 0
142
- version: "0"
143
- required_rubygems_version: !ruby/object:Gem::Requirement
144
- none: false
145
- requirements:
167
+ - !ruby/object:Gem::Version
168
+ version: 1.8.7
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
+ requirements:
146
171
  - - ">="
147
- - !ruby/object:Gem::Version
148
- hash: 3
149
- segments:
150
- - 0
151
- version: "0"
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
152
174
  requirements: []
153
-
154
- rubyforge_project: ruby-stemmer
155
- rubygems_version: 1.8.11
175
+ rubyforge_project:
176
+ rubygems_version: 2.4.6
156
177
  signing_key:
157
- specification_version: 3
178
+ specification_version: 4
158
179
  summary: Expose libstemmer_c to Ruby.
159
180
  test_files: []
160
-
data/TODO DELETED
File without changes
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.9.3