Michael Granger avatar Michael Granger committed a7cda4b

Prep for release.

Comments (0)

Files changed (7)

-== v2.0.0 [2011-11-01] Michael Granger  <ged@FaerieMUD.org>
- 
+== v2.0.0 [2012-10-10] Michael Granger  <ged@FaerieMUD.org>
+
 Rewritten to be more modular, easier to extend and maintain, and to work under
 1.9.
- 
+
 
 === v1.0.9 [2011-09-01] Michael Granger  <ged@FaerieMUD.org>
 
 lib/linguistics/en/numbers.rb
 lib/linguistics/en/participles.rb
 lib/linguistics/en/pluralization.rb
+lib/linguistics/en/stemmer.rb
 lib/linguistics/en/titlecase.rb
 lib/linguistics/en/wordnet.rb
 lib/linguistics/inflector.rb
 spec/linguistics/en/numbers_spec.rb
 spec/linguistics/en/participles_spec.rb
 spec/linguistics/en/pluralization_spec.rb
+spec/linguistics/en/stemmer_spec.rb
 spec/linguistics/en/titlecase_spec.rb
 spec/linguistics/en/wordnet_spec.rb
 spec/linguistics/en_spec.rb

lib/linguistics.rb

 		end
 
 		# Load in plugins for the language
-		Gem.find_files( "linguistics/#{language}/**.rb" ).each do |extension|
+		Gem.find_files( "linguistics/#{language}/*.rb" ).each do |extension|
+			next if extension.include?( '/spec/' ) # Skip specs
 			extension.sub!( %r{.*/linguistics/}, 'linguistics/' )
 			self.log.debug "  trying to load #{language_entry[:eng_name]} extension %p" % [ extension ]
 			begin

lib/linguistics/en/stemmer.rb

 #!/usr/bin/env ruby
 
+require 'linguistics' unless defined?( Linguistics )
 require 'linguistics/en' unless defined?( Linguistics::EN )
 
 # Ruby-Stemmer support for the English-language Linguistics module. It

spec/lib/helpers.rb

 require 'spec/lib/constants'
 require 'loggability/spechelpers'
 
-
 ### Mock with RSpec
 RSpec.configure do |c|
 	c.mock_with( :rspec )

spec/linguistics/en/articles_spec.rb

 describe Linguistics::EN::Articles do
 
 	before( :all ) do
-		setup_logging( :fatal )
+		setup_logging()
 		Linguistics.use( :en )
 	end
 

spec/linguistics/en/stemmer_spec.rb

 require 'spec/lib/helpers'
 
 require 'linguistics'
+require 'linguistics/en'
 require 'linguistics/en/stemmer'
 
 
 describe Linguistics::EN::Stemmer do
 
 	before( :all ) do
-		setup_logging( :debug )
+		setup_logging()
 		Linguistics.use( :en )
 	end
 
 		before( :all ) do
 			# If the system *does* have stemmer support, pretend it doesn't.
 			if Linguistics::EN.has_stemmer?
-				error = LoadError.new( "no such file to load -- lingua/stemmer" )
+				error = LoadError.new( "simulated exception: no such file to load -- lingua/stemmer" )
 				Linguistics::EN::Stemmer.instance_variable_set( :@has_stemmer, false )
 				Linguistics::EN::Stemmer.instance_variable_set( :@stemmer_error, error )
 			end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.