Commits

Michael Granger committed 677cc65

Update build environment.

Comments (0)

Files changed (8)

+#!/usr/bin/env ruby
+# vim: set nosta noet ts=4 sw=4:
+
+BEGIN {
+    require 'pathname'
+	$LOAD_PATH.unshift( Pathname.new( __FILE__ ).dirname + 'lib' )
+}
+
+begin
+	require 'linguistics'
+	Linguistics.use( :en )
+rescue Exception => err
+	$stderr.puts "Linguistics failed to load: %p: %s" % [ err.class, err.message ]
+	$stderr.puts( err.backtrace )
+end
+
+hoe-deveiate -v'~>0.1'
+linkparser -v'~>1.1'
+wordnet 
-echo "Switching to Ruby 1.9.2"
-rvm 1.9.2
+#!/usr/bin/env bash
+
+# This is an RVM Project .rvmrc file, used to automatically load the ruby
+# development environment upon cd'ing into the directory
+
+environment_id="ruby-1.9.3@linguistics"
+rvmdir=${rvm_path:-$HOME/.rvm}
+gemset_file=".rvm.gems"
+
+if [[ -d "${rvmdir}/environments" && -s "${rvmdir}/environments/$environment_id" ]]; then
+	echo "Using ${environment_id}"
+	. "${rvmdir}/environments/$environment_id"
+
+	if [[ -s "${rvmdir}/hooks/after_use" ]]; then
+		. "${rvmdir}/hooks/after_use"
+	fi
+else
+	# If the environment file has not yet been created, use the RVM CLI to select.
+	if ! rvm --create use  "$environment_id"; then
+		echo "Failed to create RVM environment '${environment_id}'."
+		exit 1
+	fi
+fi
+
+if [[ -s "$gemset_file" ]]; then
+	rvm gemset import "$gemset_file"
+fi
+
+echo "ObjectSpace.each_object.map( &:class ).en.conjunction"
+echo

History.md

-
-## 2.0.0 [2010-12-15] Michael Granger  <ged@FaerieMUD.org>
-
-Rewritten to be more modular, easier to extend and maintain, and to work under 1.9.
-
+
+## 2.0.0 [2010-12-15] Michael Granger  <ged@FaerieMUD.org>
+
+Rewritten to be more modular, easier to extend and maintain, and to work under 1.9.
+

README.md

-
-# Linguistics
-
-http://deveiate.org/projects/Linguistics
-
-
-## Description
-
-Linguistics is a framework for building linguistic utilities for Ruby objects
-in any language. It includes a generic language-independant front end, a
-module for mapping language codes into language names, and a module which
-contains various English-language utilities.
-
-
-## General Information
-
-### Method Interface
-
-The Linguistics module comes with a language-independant mechanism for
-extending core Ruby classes with linguistic methods.
-
-It consists of three parts: a core linguistics module which contains the
-class-extension framework for languages, a generic inflector class that serves
-as an extension point for linguistic methods on Ruby objects, and one or more
-language-specific modules which contain the actual linguistic functions.
-
-The module works by adding a single instance method for each language named
-after the language's two-letter code (or three-letter code, if no two-letter
-code is defined by ISO639) to various Ruby classes. This allows many
-language-specific methods to be added to objects without cluttering up the
-interface or risking collision between them, albeit at the cost of three or four
-more characters per method invocation. For example:
-
-	Linguistics::use( :en )
-	"goose".en.plural
-	# => "geese"
-
-
-### Adding Language Modules
-
-To add a new language to the framework, define a module that will act as the top-level namespace for all your linguistic functions, and then register it as being available, like so:
-
-	module Linguistics::TLH
-	
-		# Add Klingon to the list of default languages
-		Linguistics.register_language( :tlh, self )
-
-	end
-
-The first argument is either the two- or three-letter [ISO 639.2] (http://www.loc.gov/standards/iso639-2/php/code_list.php) language code for the language you're registering.
-
-The second is the container module itself.
-
-After you register your language, each class that Linguistics is told to extend will have a method for your language code/s:
-
-	irb> Linguistics.use( :tlh, :classes => Object )
-	# => [Object]
-	irb> Object.new.tlh
-	# => #<(Klingon; tlhIngan-Hol-language inflector) for <Object:0x402d9674> >
-
-If you use RSpec 2, you can test out any API requirements of the module by requiring  'linguistics/languagebehavior' and adding a shared behavior to your spec:
-
-	require 'rspec'
-    require 'linguistics/languagebehavior'
-	
-	describe Linguistics::TLH do
-	
-	  it_should_behave_like "a Linguistics language module"
-	
-	  # ... any other specs for your module
-	
-	end
-
-If you wish to use the logging subsystem set up by Linguistics, you can do so one of two ways: by logging to the logger directly:
-
-	Linguistics.log.debug "Registering Klingon language extension"
-
-or by mixing the `Linguistics::Loggable' module into your class/module, which will give you a 'log' method that prepends the object class on each log message so it's easy to filter out the ones you want:
-
-	require 'linguistics/mixins'
-	class Linguistics::TLH::Generator
-		include Linguistics::Loggable
-
-		def generate_it
-			self.log.debug "starting generation..."
-		end
-	end
-
-
-
-## English Language Module
-
-Linguistics comes with an English-language module; see the API documentation for 
-Linguistics::EN for more information about it.
-
-
-## Authors
-
-* Michael Granger <ged@FaerieMUD.org>
-* Martin Chase <stillflame@FaerieMUD.org>
-
-
-## Contributors
-
-* Robert Berry (bdigital on github) - English conjugation ported from MorphAdorner
-
-
-## Requirements
-
-* Ruby >= 1.9.2
-
-It may work under earlier versions, but I'll only be testing it on 1.9.2 or later.
-
-
-## Optional
-
-* [linkparser](http://deveiate.org/projects/Ruby-LinkParser) (>= 1.1.0) - Ruby high-level interface to the CMU Link Grammar library
-
-* [wordnet](http://deveiate.org/projects/Ruby-WordNet) (>= 1.1.0) - adds integration for the Ruby binding for the WordNet® lexical refrence system.
-
-
-
+= Linguistics
+
+home :: http://deveiate.org/projects/Linguistics
+source :: http://repo.deveiate.org/Linguistics
+issues :: https://bitbucket.org/ged/linguistics
+github :: https://github.com/ged/linguistics
+
+
+== Description
+
+Linguistics is a framework for building linguistic utilities for Ruby objects
+in any language. It includes a generic language-independant front end, a
+module for mapping language codes into language names, and a module which
+contains various English-language utilities.
+
+Here are a few whimsical examples:
+
+  Linguistics.use( :en )
+  # 
+  
+  puts "Head of State".en.quantify( 11 )'
+
+== Requirements
+
+* Ruby >= 1.9.2
+
+It may work under earlier versions, but I'll only be testing it on 1.9.2 or later.
+
+
+== Optional
+
+The English-language module for Linguistics has support for a few other
+optional natural-language libraries:
+
+linkparser[http://deveiate.org/projects/Ruby-LinkParser] ::
+  Ruby high-level interface to the CMU Link Grammar library
+
+wordnet[http://deveiate.org/projects/Ruby-WordNet] ::
+  Adds integration for the Ruby binding for the WordNet®
+  lexical refrence system.
+
+
+== Usage
+
+The Linguistics module comes with a language-independant mechanism for
+extending core Ruby classes with linguistic methods.
+
+It consists of three parts: a core linguistics module which contains the
+class-extension framework for languages, a generic inflector class that serves
+as an extension point for linguistic methods on Ruby objects, and one or more
+language-specific modules which contain the actual linguistic functions.
+
+The module works by adding a single instance method for each language named
+after the language's two-letter code (or three-letter code, if no two-letter
+code is defined by ISO639) to various Ruby classes. This allows many
+language-specific methods to be added to objects without cluttering up the
+interface or risking collision between them, albeit at the cost of three or four
+more characters per method invocation. For example:
+
+	Linguistics::use( :en )
+	"goose".en.plural
+	# => "geese"
+
+
+=== Adding Language Modules
+
+To add a new language to the framework, define a module that will act as the top-level namespace for all your linguistic functions, and then register it as being available, like so:
+
+	module Linguistics::TLH
+	
+		# Add Klingon to the list of default languages
+		Linguistics.register_language( :tlh, self )
+
+	end
+
+The first argument is either the two- or three-letter [ISO 639.2] (http://www.loc.gov/standards/iso639-2/php/code_list.php) language code for the language you're registering.
+
+The second is the container module itself.
+
+After you register your language, each class that Linguistics is told to extend will have a method for your language code/s:
+
+	irb> Linguistics.use( :tlh, :classes => Object )
+	# => [Object]
+	irb> Object.new.tlh
+	# => #<(Klingon; tlhIngan-Hol-language inflector) for <Object:0x402d9674> >
+
+If you use RSpec 2, you can test out any API requirements of the module by requiring  'linguistics/languagebehavior' and adding a shared behavior to your spec:
+
+	require 'rspec'
+    require 'linguistics/languagebehavior'
+	
+	describe Linguistics::TLH do
+	
+	  it_should_behave_like "a Linguistics language module"
+	
+	  # ... any other specs for your module
+	
+	end
+
+If you wish to use the logging subsystem set up by Linguistics, you can do so one of two ways: by logging to the logger directly:
+
+	Linguistics.log.debug "Registering Klingon language extension"
+
+or by mixing the `Linguistics::Loggable' module into your class/module, which will give you a 'log' method that prepends the object class on each log message so it's easy to filter out the ones you want:
+
+	require 'linguistics/mixins'
+	class Linguistics::TLH::Generator
+		include Linguistics::Loggable
+
+		def generate_it
+			self.log.debug "starting generation..."
+		end
+	end
+
+
+
+== English Language Module
+
+Linguistics comes with an English-language module; see the API documentation for
+Linguistics::EN for more information about it.
+
+
+== Authors
+
+* Michael Granger <ged@FaerieMUD.org>
+* Martin Chase <stillflame@FaerieMUD.org>
+
+
+== Contributors
+
+* Robert Berry (bdigital on github) - English conjugation ported from MorphAdorner
+
+
 
 hoespec = Hoe.spec 'linguistics' do
 	self.name = 'linguistics'
-	self.readme_file = 'README.md'
-	self.history_file = 'History.md'
+	self.readme_file = 'README.rdoc'
+	self.history_file = 'History.rdoc'
+	self.extra_rdoc_files = FileList[ '*.rdoc' ]
 
 	self.developer 'Michael Granger', 'ged@FaerieMUD.org'
 
-	self.dependency 'rspec', '~> 2.6.0', :development
-	self.dependency 'linkparser', '~> 1.1.3', :development
-	self.dependency 'wordnet', '~> 0.99.0', :development
+	self.dependency 'hoe-deveiate', '~> 0.1', :development
+	self.dependency 'linkparser', '~> 1.1', :development
+	self.dependency 'wordnet', '~> 0.99', :development
 
 	self.spec_extras[:licenses] = ["BSD"]
+	self.spec_extras[:rdoc_options] = ['-f', 'fivefish', '-t', 'Ruby Linguistics Toolkit']
 	self.spec_extras[:post_install_message] = [
 			"This library also presents tie-ins for the 'linkparser' and",
 			"'wordnet' libraries, which you can enable by installing the",
 		  ].join( "\n" )
 
 	self.require_ruby_version( '>=1.9.2' )
+	self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
+	self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
+
+	self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
 end
 
 ENV['VERSION'] ||= hoespec.spec.version.to_s