Permalink
Browse files

Upgrade to bundler 1.0, use gemspec

  • Loading branch information...
1 parent 0ef9c39 commit 6ac9fa7b5a41b294f3c700df11d1f14ff94cbc3f Andy Delcambre committed Dec 1, 2010
Showing with 34 additions and 52 deletions.
  1. +3 −10 Gemfile
  2. +2 −40 Rakefile
  3. +25 −0 dm-salesforce.gemspec
  4. +4 −2 lib/dm-salesforce/version.rb
View
13 Gemfile
@@ -1,20 +1,13 @@
source :gemcutter
-group :runtime do
- gem "httpclient", "=2.1.5.2"
- gem "extlib", "~> 0.9.9"
- gem "dm-core", "~> 0.10.1"
- gem "dm-validations", "~> 0.10.1"
- gem "dm-types", "~> 0.10.1"
- gem "soap4r", "~> 1.5.8", :require => [ ]
-end
+gemspec
group :test do
- gem 'rspec', :require => %w(spec)
+ gem 'rspec', '~>1.0', :require => %w(spec)
gem 'rake'
gem 'rcov'
gem 'ruby-debug'
- gem 'bundler', '~>0.9.1'
+ gem 'bundler', '~>1.0.0'
gem 'ParseTree', :require => 'parse_tree'
gem 'dm-sweatshop'
end
View
@@ -1,50 +1,12 @@
require 'rake/gempackagetask'
require 'rubygems/specification'
-require 'bundler'
require 'date'
require 'pp'
require 'tmpdir'
-Bundler.require(:default, :runtime)
-require File.dirname(__FILE__) + '/lib/dm-salesforce'
+require 'bundler/setup'
-GEM = "dm-salesforce"
-GEM_VERSION = DataMapper::Salesforce::VERSION
-AUTHORS = ["Yehuda Katz", 'Tim Carey-Smith']
-EMAIL = "wycats@gmail.com"
-HOMEPAGE = "http://www.yehudakatz.com"
-SUMMARY = "A DataMapper adapter to the Salesforce API"
-
-@spec = Gem::Specification.new do |s|
- s.name = GEM
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["README.markdown", "LICENSE"]
- s.summary = SUMMARY
- s.description = s.summary
- s.authors = AUTHORS
- s.email = EMAIL
- s.homepage = HOMEPAGE
-
- bundle = Bundler::Definition.from_gemfile('Gemfile')
- bundle.dependencies.each do |dep|
- next unless dep.groups.include?(:runtime)
- s.add_dependency(dep.name, dep.version_requirements.to_s)
- end
-
- s.require_path = 'lib'
- s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("lib/**/*")
-end
-
-Rake::GemPackageTask.new(@spec) do |pkg|
- pkg.gem_spec = @spec
-end
-
-desc "install the gem locally"
-task :install => [:package] do
- sh %{gem install pkg/#{GEM}-#{GEM_VERSION} --no-ri --no-rdoc}
-end
+Bundler.require
task :default => 'spec'
require 'spec'
View
@@ -0,0 +1,25 @@
+$:.unshift "lib"
+require "dm-salesforce/version"
+
+Gem::Specification.new do |s|
+ s.name = "dm-salesforce"
+ s.version = DataMapper::Salesforce::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.markdown", "LICENSE"]
+ s.summary = "A DataMapper adapter to the Salesforce API"
+ s.description = s.summary
+ s.authors = ["Yehuda Katz", "Tim Carey-Smith", "Andy Delcambre"]
+ s.email = "tcareysmith@engineyard.com"
+ s.homepage = "http://github.com/tcareysmith/dm-salesforce"
+
+ s.add_dependency "httpclient", "=2.1.5.2"
+ s.add_dependency "extlib", "~> 0.9.9"
+ s.add_dependency "dm-core", "~> 0.10.1"
+ s.add_dependency "dm-validations", "~> 0.10.1"
+ s.add_dependency "dm-types", "~> 0.10.1"
+ s.add_dependency "soap4r", "~> 1.5.8"
+
+ s.require_path = 'lib'
+ s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("lib/**/*")
+end
@@ -1,3 +1,5 @@
-module DataMapper::Salesforce
- VERSION = "0.10.5"
+module DataMapper
+ module Salesforce
+ VERSION = "0.10.5"
+ end
end

0 comments on commit 6ac9fa7

Please sign in to comment.