Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rakefile updated

  • Loading branch information...
commit 656bb0831a3490f85f6c79a743b5933929ed585e 1 parent 9a622f4
@martinciu authored
Showing with 52 additions and 38 deletions.
  1. +3 −0  Gemfile
  2. +24 −14 Gemfile.lock
  3. +25 −24 Rakefile
View
3  Gemfile
@@ -6,4 +6,7 @@ gem "activemodel", ">=3.0.0", :require => "active_model"
group :development do
gem "rspec", ">= 2.0.0"
+ gem "bundler", "~> 1.0.0"
+ gem "jeweler", "~> 1.5.0.pre5"
+ gem "rcov", ">= 0"
end
View
38 Gemfile.lock
@@ -10,24 +10,31 @@ GEM
bson_ext (1.1.1)
builder (2.1.2)
diff-lcs (1.1.2)
- i18n (0.4.1)
- mongo (1.0.9)
- bson (>= 1.0.5)
- mongoid (2.0.0.beta.19)
+ git (1.2.5)
+ i18n (0.4.2)
+ jeweler (1.5.0.pre5)
+ bundler (~> 1.0.0)
+ git (>= 1.2.5)
+ rake
+ mongo (1.1.1)
+ bson (>= 1.1.1)
+ mongoid (2.0.0.beta.20)
activemodel (~> 3.0)
- mongo (= 1.0.9)
+ mongo (~> 1.1)
tzinfo (~> 0.3.22)
will_paginate (~> 3.0.pre)
- rspec (2.0.0)
- rspec-core (= 2.0.0)
- rspec-expectations (= 2.0.0)
- rspec-mocks (= 2.0.0)
- rspec-core (2.0.0)
- rspec-expectations (2.0.0)
+ rake (0.8.7)
+ rcov (0.9.9)
+ rspec (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+ rspec-mocks (~> 2.0.1)
+ rspec-core (2.0.1)
+ rspec-expectations (2.0.1)
diff-lcs (>= 1.1.2)
- rspec-mocks (2.0.0)
- rspec-core (= 2.0.0)
- rspec-expectations (= 2.0.0)
+ rspec-mocks (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
state_machine (0.9.4)
tzinfo (0.3.23)
will_paginate (3.0.pre2)
@@ -38,6 +45,9 @@ PLATFORMS
DEPENDENCIES
activemodel (>= 3.0.0)
bson_ext (>= 1.0.4)
+ bundler (~> 1.0.0)
+ jeweler (~> 1.5.0.pre5)
mongoid (>= 2.0.0.beta.16)
+ rcov
rspec (>= 2.0.0)
state_machine (>= 0.9.2)
View
49 Rakefile
@@ -1,37 +1,38 @@
require 'rubygems'
-require 'rake'
require 'bundler'
-
begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "state_machine-mongoid"
- gem.summary = %Q{state_machine mongoid integration}
- gem.description = %Q{a little lack of tests but it works!}
- gem.email = "marcin.ciunelis@gmail.com"
- gem.homepage = "http://github.com/martinciu/state_machine-mongoid"
- gem.authors = ["Marcin Ciunelis"]
- gem.add_bundler_dependencies
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+ Bundler.setup(:default, :development)
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
+end
+require 'rake'
+
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ gem.name = "state_machine-mongoid"
+ gem.summary = %Q{state_machine mongoid integration}
+ gem.description = %Q{a little lack of tests but it works!}
+ gem.email = "marcin.ciunelis@gmail.com"
+ gem.homepage = "http://github.com/martinciu/state_machine-mongoid"
+ gem.authors = ["Marcin Ciunelis"]
+ gem.add_bundler_dependencies
end
+Jeweler::GemcutterTasks.new
+Jeweler::RubygemsDotOrgTasks.new
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.spec_files = FileList['spec/**/*_spec.rb']
+require 'rspec/core'
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
end
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
+RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end
-task :spec => :check_dependencies
-
task :default => :spec
require 'rake/rdoctask'
@@ -39,7 +40,7 @@ Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "state_machine-mongoid #{version}"
+ rdoc.title = "test_gem #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
Please sign in to comment.
Something went wrong with that request. Please try again.