Permalink
Browse files

New: Rakefile & .rspec

  • Loading branch information...
1 parent a7659b1 commit 37c809da16ee83c3f4146e525e631ddb2fbdbdb6 @maximeg committed Jun 15, 2012
Showing with 36 additions and 0 deletions.
  1. +4 −0 .rspec
  2. +32 −0 Rakefile
View
4 .rspec
@@ -0,0 +1,4 @@
+--tty
+--colour
+--format <%= ENV["CI"] ? 'progress' : 'documentation'%>
+
View
@@ -0,0 +1,32 @@
+require "bundler"
+Bundler.setup
+
+require "rake"
+require "rspec/core/rake_task"
+
+$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+require "mongoid/max/denormalize/version"
+VERSION = Mongoid::Max::Denormalize::Version::STRING
+
+task :gem => :build
+task :build do
+ system "gem build mongoid_max_denormalize.gemspec"
+end
+
+task :release => :build do
+ system "git tag -a #{VERSION} -m 'Version #{VERSION}'"
+ system "git push --tags"
+ system "gem push mongoid_max_denormalize-#{VERSION}.gem"
+end
+
+RSpec::Core::RakeTask.new("spec") do |spec|
+ spec.pattern = "spec/**/*_spec.rb"
+end
+
+RSpec::Core::RakeTask.new('spec:progress') do |spec|
+ spec.rspec_opts = %w(--format progress)
+ spec.pattern = "spec/**/*_spec.rb"
+end
+
+task :default => :spec
+

0 comments on commit 37c809d

Please sign in to comment.