Permalink
Browse files

Added rakefile

  • Loading branch information...
1 parent 23d55b3 commit cd3d8cd7a96bf63e4a7bd916aa5b77b3d4318412 @jamesotron committed Mar 10, 2009
Showing with 51 additions and 0 deletions.
  1. +38 −0 Rakefile
  2. +13 −0 lib/digitalnz/version.rb
View
38 Rakefile
@@ -0,0 +1,38 @@
+require 'rubygems'
+require 'rake/gempackagetask'
+require 'rake/testtask'
+
+require 'lib/digitalnz/version'
+
+task :default => :test
+
+spec = Gem::Specification.new do |s|
+ s.name = 'digitalnz'
+ s.version = DigitalNZ::Version.to_s
+ s.has_rdoc = true
+ s.extra_rdoc_files = %w(README.rdoc)
+ s.rdoc_options = %w(--main README.rdoc)
+ s.summary = "A small gem to interface with the DigitalNZ API"
+ s.author = 'James Harton'
+ s.email = 'jamesotron@gmail.com'
+ s.homepage = 'http://www.helicopter.geek.nz/'
+ s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib,test}/**/*")
+
+end
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+Rake::TestTask.new do |t|
+ t.libs << 'test'
+ t.test_files = FileList["test/**/*_test.rb"]
+ t.verbose = true
+end
+
+desc 'Generate the gemspec to serve this Gem from Github'
+task :github do
+ file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
+ File.open(file, 'w') {|f| f << spec.to_ruby }
+ puts "Created gemspec: #{file}"
+end
View
13 lib/digitalnz/version.rb
@@ -0,0 +1,13 @@
+module DigitalNZ
+ module Version # :nodoc:
+
+ MAJOR = 0
+ MINOR = 1
+ TINY = 1
+
+ def self.to_s
+ [MAJOR, MINOR, TINY].join('.')
+ end
+
+ end
+end

0 comments on commit cd3d8cd

Please sign in to comment.