diff --git a/README.md b/README.md index 22df33f..b54c515 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,3 @@ With exception-throwing variants: Copyright (c) 2010 Darcy Laycock. See LICENSE for details. Australia Post and other assorted trademarks are copyright Australia Post. - - - diff --git a/Rakefile b/Rakefile index a69977e..05076f5 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,8 @@ require 'rubygems' require 'rake' +require "lib/aus_post/drc" + begin require 'jeweler' Jeweler::Tasks.new do |gem| @@ -10,6 +12,7 @@ begin gem.email = "sutto@sutto.net" gem.homepage = "http://github.com/Sutto/auspost-drc" gem.authors = ["Darcy Laycock"] + gem.version = AusPost::DRC::VERSION gem.add_development_dependency "shoulda", ">= 0" end Jeweler::GemcutterTasks.new @@ -24,19 +27,6 @@ Rake::TestTask.new(:test) do |test| test.verbose = true end -begin - require 'rcov/rcovtask' - Rcov::RcovTask.new do |test| - test.libs << 'test' - test.pattern = 'test/**/test_*.rb' - test.verbose = true - end -rescue LoadError - task :rcov do - abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" - end -end - task :test => :check_dependencies task :default => :test diff --git a/auspost-drc.gemspec b/auspost-drc.gemspec new file mode 100644 index 0000000..96b41f1 --- /dev/null +++ b/auspost-drc.gemspec @@ -0,0 +1,55 @@ +# Generated by jeweler +# DO NOT EDIT THIS FILE DIRECTLY +# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = %q{auspost-drc} + s.version = "0.1.0" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Darcy Laycock"] + s.date = %q{2010-05-07} + s.description = %q{Gem for AusPost Delivery Rate Calculator - Making it easy to calculate shipping} + s.email = %q{sutto@sutto.net} + s.extra_rdoc_files = [ + "LICENSE", + "README.md" + ] + s.files = [ + ".document", + ".gitignore", + "LICENSE", + "README.md", + "Rakefile", + "lib/aus_post/drc.rb", + "lib/aus_post/drc/calculator.rb", + "lib/aus_post/drc/parcel.rb", + "lib/aus_post/drc/service_type.rb", + "test/helper.rb", + "test/test_auspost_drc.rb" + ] + s.homepage = %q{http://github.com/Sutto/auspost-drc} + s.rdoc_options = ["--charset=UTF-8"] + s.require_paths = ["lib"] + s.rubygems_version = %q{1.3.6} + s.summary = %q{AusPost Delivery Rate Calculator Gem} + s.test_files = [ + "test/helper.rb", + "test/test_auspost_drc.rb" + ] + + if s.respond_to? :specification_version then + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION + s.specification_version = 3 + + if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + s.add_development_dependency(%q, [">= 0"]) + else + s.add_dependency(%q, [">= 0"]) + end + else + s.add_dependency(%q, [">= 0"]) + end +end + diff --git a/lib/aus_post/drc.rb b/lib/aus_post/drc.rb index 567ccc0..62c357d 100644 --- a/lib/aus_post/drc.rb +++ b/lib/aus_post/drc.rb @@ -1,7 +1,8 @@ module AusPost module DRC - Error = Class.new(StandardError) + VERSION = "0.1.0".freeze + Error = Class.new(StandardError) autoload :Parcel, 'aus_post/drc/parcel' autoload :Calculator, 'aus_post/drc/calculator'