Permalink
Browse files

now a gem too

  • Loading branch information...
1 parent 37d3b26 commit fa179d5ca272340ab5b53ea7271b02f8fe86e5ce @grosser committed Aug 25, 2009
Showing with 18 additions and 7 deletions.
  1. +16 −7 Rakefile.rb
  2. +1 −0 VERSION
  3. +1 −0 init.rb
  4. 0 random_records.gemspec
View
@@ -1,12 +1,21 @@
-require 'rubygems'
-require 'spec'
-
-desc 'Default: run spec.'
-task :default => :spec
-
desc "Run all specs in spec directory"
-task :spec do |t|
+task :default do
options = "--colour --format progress --loadby --reverse"
files = FileList['spec/**/*_spec.rb']
system("spec #{options} #{files}")
+end
+
+begin
+ require 'jeweler'
+ project_name = 'random_records'
+ Jeweler::Tasks.new do |gem|
+ gem.name = project_name
+ gem.description = gem.summary = "Rails/AR: Fast random records for ActiveRecord"
+ gem.email = "grosser.michael@gmail.com"
+ gem.homepage = "http://github.com/grosser/#{project_name}"
+ gem.authors = ["Michael Grosser"]
+ gem.add_dependency ['activerecord']
+ end
+rescue LoadError
+ puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
View
@@ -0,0 +1 @@
+0.2.0
View
@@ -1 +1,2 @@
+#only needed wen used as Rails plugin
require 'random_records'
No changes.

0 comments on commit fa179d5

Please sign in to comment.