Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify Rakefile, use Bundler install tasks

  • Loading branch information...
commit 6c0f9266c37b5c04ba349d51fa0f072df058f7a5 1 parent fbb62eb
Ian White authored
Showing with 50 additions and 76 deletions.
  1. +35 −35 Gemfile.lock.development
  2. +15 −41 Rakefile
70 Gemfile.lock.development
View
@@ -6,25 +6,25 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- activemodel (3.1.3)
- activesupport (= 3.1.3)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- arel (~> 2.2.1)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activesupport (3.1.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
multi_json (~> 1.0)
- addressable (2.2.6)
- arel (2.2.1)
+ addressable (2.2.7)
+ arel (3.0.2)
bcrypt-ruby (3.0.1)
- bson (1.5.2)
- bson_ext (1.5.2)
- bson (= 1.5.2)
+ bson (1.6.2)
+ bson_ext (1.6.2)
+ bson (~> 1.6.2)
builder (3.0.0)
- data_objects (0.10.7)
+ data_objects (0.10.8)
addressable (~> 2.1)
datamapper (1.2.0)
dm-aggregates (~> 1.2.0)
@@ -37,8 +37,8 @@ GEM
dm-types (~> 1.2.0)
dm-validations (~> 1.2.0)
diff-lcs (1.1.3)
- dm-active_model (1.2.0)
- activemodel (~> 3.1.0)
+ dm-active_model (1.2.1)
+ activemodel (~> 3.0)
dm-core (~> 1.2.0)
dm-aggregates (1.2.0)
dm-core (~> 1.2.0)
@@ -74,40 +74,40 @@ GEM
uuidtools (~> 2.1.2)
dm-validations (1.2.0)
dm-core (~> 1.2.0)
- do_sqlite3 (0.10.7)
- data_objects (= 0.10.7)
+ do_sqlite3 (0.10.8)
+ data_objects (= 0.10.8)
fastercsv (1.5.4)
git (1.2.5)
i18n (0.6.0)
- json (1.6.4)
- json_pure (1.6.4)
- mongo (1.5.2)
- bson (= 1.5.2)
- mongo_mapper (0.10.1)
+ json (1.6.6)
+ json_pure (1.6.6)
+ mongo (1.6.2)
+ bson (~> 1.6.2)
+ mongo_mapper (0.11.1)
activemodel (~> 3.0)
activesupport (~> 3.0)
plucky (~> 0.4.0)
- mongoid (2.4.0)
+ mongoid (2.4.7)
activemodel (~> 3.1)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
multi_json (1.0.4)
- plucky (0.4.3)
- mongo (~> 1.3)
+ plucky (0.4.4)
+ mongo (~> 1.5)
rake (0.9.2.2)
- rspec (2.8.0)
- rspec-core (~> 2.8.0)
- rspec-expectations (~> 2.8.0)
- rspec-mocks (~> 2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.8.0)
+ rspec (2.9.0)
+ rspec-core (~> 2.9.0)
+ rspec-expectations (~> 2.9.0)
+ rspec-mocks (~> 2.9.0)
+ rspec-core (2.9.0)
+ rspec-expectations (2.9.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.9.0)
sqlite3 (1.3.5)
stringex (1.3.0)
tzinfo (0.3.31)
uuidtools (2.1.2)
- yard (0.7.4)
+ yard (0.7.5)
PLATFORMS
ruby
56 Rakefile
View
@@ -1,4 +1,10 @@
-require 'rubygems'
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+
require 'rake'
require 'rspec/core/rake_task'
$:.push File.expand_path("../lib", __FILE__)
@@ -19,45 +25,13 @@ rescue LoadError
end
end
-task :build do
- system "gem build orm_adapter.gemspec"
-end
+Bundler::GemHelper.install_tasks
-namespace :release do
- task :rubygems => :pre do
- system "gem push orm_adapter-#{OrmAdapter::VERSION}.gem"
- end
-
- task :github => :pre do
- require 'git'
- tag = "v#{OrmAdapter::VERSION}"
- git = Git.open('.')
-
- if (git.tag(tag) rescue nil)
- raise "** repo is already tagged with: #{tag}"
- end
-
- git.add_tag(tag)
- git.push('origin', tag)
- end
-
- task :pre => [:spec, :build] do
- require 'git'
- git = Git.open('.')
-
- if File.exists?("Gemfile.lock") && File.read("Gemfile.lock") != File.read("Gemfile.lock.development")
- cp "Gemfile.lock", "Gemfile.lock.development"
- raise "** Gemfile.lock.development has been updated, please commit these changes."
- end
-
- if git.status.changed.any? || git.status.added.any? || git.status.deleted.any?
- raise "** repo is not clean, try committing some files"
- end
-
- if git.object('HEAD').sha != git.object('origin/master').sha
- raise "** origin does not match HEAD, have you pushed?"
- end
+task :release => :check_gemfile
+
+task :check_gemfile do
+ if File.exists?("Gemfile.lock") && File.read("Gemfile.lock") != File.read("Gemfile.lock.development")
+ cp "Gemfile.lock", "Gemfile.lock.development"
+ raise "** Gemfile.lock.development has been updated, please commit these changes."
end
-
- task :all => ['release:github', 'release:rubygems']
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.