Permalink
Browse files

Use bundler for gem packaging

  • Loading branch information...
1 parent 3b1cfe3 commit f171f9dd9c2e57c21dce36e80f9240d50c40baa6 @pietern committed Nov 13, 2011
View
@@ -1,10 +1,4 @@
-## PROJECT::GENERAL
-coverage
-rdoc
-pkg
-
-## PROJECT::SPECIFIC
-.gitattributes
-.rvmrc
-script/console
-notes
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
View
@@ -0,0 +1,9 @@
+source "http://rubygems.org"
+
+gemspec
+
+group :test do
+ gem "rspec", "1.2.9"
+ gem "fakeweb", "1.2.8"
+ gem "mocha", "0.9.8"
+end
View
@@ -1,51 +1,8 @@
-require 'rubygems'
-require 'rake'
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "googlecontacts"
- gem.summary = %Q{Contacts API on steroids}
- gem.description = %Q{Google Contacts API implementation}
- gem.email = "pcnoordhuis@gmail.com"
- gem.homepage = "http://github.com/pietern/googlecontacts"
- gem.authors = ["Pieter Noordhuis"]
- gem.add_development_dependency "rspec", ">= 1.2.9"
- gem.add_development_dependency "fakeweb", ">= 1.2.8"
- gem.add_development_dependency "mocha", ">= 0.9.8"
- gem.add_runtime_dependency "activesupport", ">= 2.3.4"
- gem.add_runtime_dependency "nokogiri", ">= 1.4.1"
- gem.add_runtime_dependency "oauth", ">= 0.3.6"
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
-
+require "bundler/gem_tasks"
require 'spec/rake/spectask'
+
Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
- spec.rcov_opts += ['--exclude', ENV['GEM_HOME']]
-end
-
-task :spec => :check_dependencies
-
task :default => :spec
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "googlecontacts #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
@@ -1,96 +1,23 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "google_contacts/version"
Gem::Specification.new do |s|
- s.name = %q{googlecontacts}
- s.version = "0.1.8"
+ s.name = "googlecontacts"
+ s.version = GoogleContacts::VERSION
+ s.authors = ["Pieter Noordhuis"]
+ s.email = ["pcnoordhuis@gmail.com"]
+ s.homepage = ""
+ s.summary = %q{Google Contacts API implementation}
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Pieter Noordhuis"]
- s.date = %q{2011-01-02}
- s.description = %q{Google Contacts API implementation}
- s.email = %q{pcnoordhuis@gmail.com}
- s.extra_rdoc_files = [
- "LICENSE",
- "README.rdoc"
- ]
- s.files = [
- ".autotest",
- ".document",
- "LICENSE",
- "README.rdoc",
- "Rakefile",
- "VERSION",
- "lib/google_contacts.rb",
- "lib/google_contacts/auth.rb",
- "lib/google_contacts/base.rb",
- "lib/google_contacts/contact.rb",
- "lib/google_contacts/group.rb",
- "lib/google_contacts/proxies/array.rb",
- "lib/google_contacts/proxies/emails.rb",
- "lib/google_contacts/proxies/hash.rb",
- "lib/google_contacts/proxies/tag.rb",
- "lib/google_contacts/wrapper.rb",
- "lib/googlecontacts.rb",
- "spec/assets/contacts_full.xml",
- "spec/assets/contacts_full_page1.xml",
- "spec/assets/contacts_full_page2.xml",
- "spec/assets/groups_full.xml",
- "spec/base_spec.rb",
- "spec/contact_spec.rb",
- "spec/group_spec.rb",
- "spec/proxies/array_spec.rb",
- "spec/proxies/emails_spec.rb",
- "spec/proxies/hash_spec.rb",
- "spec/proxies/tag_spec.rb",
- "spec/spec.opts",
- "spec/spec_helper.rb",
- "spec/wrapper_spec.rb"
- ]
- s.homepage = %q{http://github.com/pietern/googlecontacts}
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Contacts API on steroids}
- s.test_files = [
- "spec/base_spec.rb",
- "spec/contact_spec.rb",
- "spec/group_spec.rb",
- "spec/proxies/array_spec.rb",
- "spec/proxies/emails_spec.rb",
- "spec/proxies/hash_spec.rb",
- "spec/proxies/tag_spec.rb",
- "spec/spec_helper.rb",
- "spec/wrapper_spec.rb"
- ]
+ s.rubyforge_project = "googlecontacts"
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
- s.add_development_dependency(%q<fakeweb>, [">= 1.2.8"])
- s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
- s.add_runtime_dependency(%q<activesupport>, [">= 2.3.4"])
- s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.1"])
- s.add_runtime_dependency(%q<oauth>, [">= 0.3.6"])
- else
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
- s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
- s.add_dependency(%q<mocha>, [">= 0.9.8"])
- s.add_dependency(%q<activesupport>, [">= 2.3.4"])
- s.add_dependency(%q<nokogiri>, [">= 1.4.1"])
- s.add_dependency(%q<oauth>, [">= 0.3.6"])
- end
- else
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
- s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
- s.add_dependency(%q<mocha>, [">= 0.9.8"])
- s.add_dependency(%q<activesupport>, [">= 2.3.4"])
- s.add_dependency(%q<nokogiri>, [">= 1.4.1"])
- s.add_dependency(%q<oauth>, [">= 0.3.6"])
- end
+ s.add_runtime_dependency "activesupport", "2.3.4"
+ s.add_runtime_dependency "nokogiri", "1.4.1"
+ s.add_runtime_dependency "oauth", "0.3.6"
end
-
@@ -0,0 +1,3 @@
+module GoogleContacts
+ VERSION = "0.1.8"
+end
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/spec_helper'
+require 'spec_helper'
class GoogleContacts::BaseTester < GoogleContacts::Base
CATEGORY_TERM = "i'm not used here"
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/spec_helper'
+require 'spec_helper'
describe GoogleContacts::Contact do
describe "when loaded" do
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/spec_helper'
+require 'spec_helper'
describe GoogleContacts::Group do
before(:each) do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe GoogleContacts::Proxies::Array do
describe "with existing entries" do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe GoogleContacts::Proxies::Emails do
describe "with existing entries" do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe GoogleContacts::Proxies::Hash do
describe "with existing entries" do
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe GoogleContacts::Proxies::Tag do
describe "with existing entries" do
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/spec_helper'
+require 'spec_helper'
describe GoogleContacts::Wrapper do
describe "fetching" do

0 comments on commit f171f9d

Please sign in to comment.