-require 'rubygems'\r
-require 'rake'\r
-require 'rake/clean'\r
-require 'rake/testtask'\r
-require 'rake/rdoctask'\r
-require 'rake/packagetask'\r
-require 'rake/gempackagetask'\r
-require 'rake/contrib/rubyforgepublisher'\r
-require 'fileutils'\r
-require 'hoe'\r
-include FileUtils\r
-require File.join(File.dirname(__FILE__), 'lib', 'composite_primary_keys', 'version')\r
-\r
-AUTHOR = "Dr Nic Williams"\r
-EMAIL = "drnicwilliams@gmail.com"\r
-DESCRIPTION = "Composite key support for ActiveRecords"\r
-GEM_NAME = "composite_primary_keys" # what ppl will type to install your gem\r
-if File.exists?("~/.rubyforge/user-config.yml")\r
- # TODO this should prob go in a local/ file\r
- config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))\r
- RUBYFORGE_USERNAME = config["username"]\r
-end\r
-RUBYFORGE_PROJECT = "compositekeys"\r
-HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"\r
-\r
-REV = nil #File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil\r
-VERS = ENV['VERSION'] || (CompositePrimaryKeys::VERSION::STRING + (REV ? ".#{REV}" : ""))\r
-CLEAN.include ['**/.*.sw?', '*.gem', '.config','debug.log','*.db','logfile','log/**/*','**/.DS_Store', '.project']\r
-RDOC_OPTS = ['--quiet', '--title', "newgem documentation",\r
- "--opname", "index.html",\r
- "--line-numbers", \r
- "--main", "README",\r
- "--inline-source"]\r
-\r
-class Hoe\r
- def extra_deps \r
- @extra_deps.reject { |x| Array(x).first == 'hoe' } \r
- end \r
-end\r
-\r
-# Generate all the Rake tasks\r
-# Run 'rake -T' to see list of generated tasks (from gem root directory)\r
-hoe = Hoe.new(GEM_NAME, VERS) do |p|\r
- p.author = AUTHOR \r
- p.description = DESCRIPTION\r
- p.email = EMAIL\r
- p.summary = DESCRIPTION\r
- p.url = HOMEPATH\r
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT\r
- p.test_globs = ["test/**/test*.rb"]\r
- p.clean_globs |= CLEAN #An array of file patterns to delete on clean.\r
-\r
- # == Optional\r
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")\r
- p.extra_deps = [['activerecord', '>= 2.2.0']] #An array of rubygem dependencies.\r
- #p.spec_extras - A hash of extra values to set in the gemspec.\r
-end\r
-\r
-CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n")\r
-PATH = RUBYFORGE_PROJECT\r
-hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')\r
-\r
-PROJECT_ROOT = File.expand_path(".")\r
-\r
-require 'loader'\r
+require 'rubygems'
+require 'rake'
+require 'rake/clean'
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rake/packagetask'
+require 'rake/gempackagetask'
+require 'rake/contrib/rubyforgepublisher'
+require 'fileutils'
+require 'hoe'
+include FileUtils
+require File.join(File.dirname(__FILE__), 'lib', 'composite_primary_keys', 'version')
+
+AUTHOR = "Dr Nic Williams"
+EMAIL = "drnicwilliams@gmail.com"
+DESCRIPTION = "Composite key support for ActiveRecords"
+GEM_NAME = "composite_primary_keys" # what ppl will type to install your gem
+if File.exists?("~/.rubyforge/user-config.yml")
+ # TODO this should prob go in a local/ file
+ config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
+ RUBYFORGE_USERNAME = config["username"]
+end
+RUBYFORGE_PROJECT = "compositekeys"
+HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
+
+REV = nil #File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil
+VERS = ENV['VERSION'] || (CompositePrimaryKeys::VERSION::STRING + (REV ? ".#{REV}" : ""))
+CLEAN.include ['**/.*.sw?', '*.gem', '.config','debug.log','*.db','logfile','log/**/*','**/.DS_Store', '.project']
+RDOC_OPTS = ['--quiet', '--title', "newgem documentation",
+ "--opname", "index.html",
+ "--line-numbers",
+ "--main", "README",
+ "--inline-source"]
+
+class Hoe
+ def extra_deps
+ @extra_deps.reject { |x| Array(x).first == 'hoe' }
+ end
+end
+
+# Generate all the Rake tasks
+# Run 'rake -T' to see list of generated tasks (from gem root directory)
+hoe = Hoe.new(GEM_NAME, VERS) do |p|
+ p.author = AUTHOR
+ p.description = DESCRIPTION
+ p.email = EMAIL
+ p.summary = DESCRIPTION
+ p.url = HOMEPATH
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
+ p.test_globs = ["test/**/test*.rb"]
+ p.clean_globs |= CLEAN #An array of file patterns to delete on clean.
+
+ # == Optional
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
+ p.extra_deps = [['activerecord', '>= 2.2.0']] #An array of rubygem dependencies.
+ #p.spec_extras - A hash of extra values to set in the gemspec.
+end
+
+CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n")
+PATH = RUBYFORGE_PROJECT
+hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
+
+PROJECT_ROOT = File.expand_path(".")
+
+require 'loader'