Permalink
Browse files

Refactored to a Bundle Style Gem

  • Loading branch information...
rposborne committed Jan 3, 2012
1 parent 50a566b commit 42b6148ac42a9b4777b2aeb418f8cca923e0f1a1
View
16 Gemfile
@@ -1,16 +1,4 @@
source "http://rubygems.org"
-# Add dependencies required to use your gem here.
-# Example:
- gem "activesupport", ">= 2.3.5"
- gem 'rubyjedi-soap4r', '1.5.8.20100619003610'
- gem 'quickbooks_api', "~> 0.1.6"
-
-# Add dependencies to develop your gem here.
-# Include everything needed to run rake, tests, features, etc.
-group :development do
- gem "shoulda", ">= 0"
- gem "bundler", "~> 1.0.0"
- gem "jeweler", "~> 1.6.4"
- gem "rcov", ">= 0"
-end
+# Specify your gem's dependencies in qbwc.gemspec
+gemspec
View
@@ -1,53 +1 @@
-# encoding: utf-8
-
-require 'rubygems'
-require 'bundler'
-begin
- 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 is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
- gem.name = "qbwc"
- gem.homepage = "http://github.com/skylr/qbwc"
- gem.license = "MIT"
- gem.summary = %Q{A Ruby/Rails Implementation of Quickbook Web Connector }
- gem.description = %Q{TODO: longer description of your gem}
- gem.email = "rut216@gmail.com, russell@burningpony.com"
- gem.authors = ["Alex Skryl", "Russell Osborne"]
- # dependencies defined in Gemfile
-end
-Jeweler::RubygemsDotOrgTasks.new
-
-require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
-end
-
-require 'rcov/rcovtask'
-Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
- test.rcov_opts << '--exclude "gems/*"'
-end
-
-task :default => :test
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "qbwc #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
+require "bundler/gem_tasks"
View
@@ -1,4 +1,5 @@
#TODO: replace with ruby 1.9 external iterator
+require "qbwc/version"
module QBWC
@@ -43,12 +44,12 @@ def self.setup
end
-ROOT_PATH = File.dirname(__FILE__)
-LIB_PATH = File.join(ROOT_PATH, 'lib')
-LIB_FILES = %w( soap_wrapper/default
- soap_wrapper/defaultMappingRegistry
- soap_wrapper/defaultServant
- soap_wrapper/QBWebConnectorSvc
- interface templates session )
+#ROOT_PATH = File.dirname(__FILE__)
+#LIB_FILES = %w( soap_wrapper/default
+# soap_wrapper/defaultMappingRegistry
+# soap_wrapper/defaultServant
+# soap_wrapper/QBWebConnectorSvc
+# generators/install_generator
+# interface templates session )
-LIB_FILES.each { |f| require File.join(LIB_PATH, f) }
+#LIB_FILES.each { |f| require File.join(ROOT_PATH, f) }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,11 +5,11 @@ def self.[](template)
end
def self.quickbooks_sync_specific_records
- QBWC.quickbooks_sync_specific_records.call
+ return QBWC.quickbooks_sync_specific_records.call
end
def self.quickbooks_sync
- QBWC.quickbooks_sync.call
+ return QBWC.quickbooks_sync.call
end
end
View
@@ -0,0 +1,3 @@
+module Qbwc
+ VERSION = "0.0.1"
+end
View
@@ -0,0 +1,26 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "qbwc/version"
+
+Gem::Specification.new do |s|
+ s.name = "qbwc"
+ s.version = Qbwc::VERSION
+ s.authors = ["Alex Skryl", "Russell Osborne"]
+ s.email = ["rut216@gmail.com", "russell@burningpony.com"]
+ s.homepage = ""
+ s.summary = %q{A Rails interface for Intuit's Quickbooks Web Connector}
+ s.description = %q{A Rails interface for Intuit's Quickbooks Web Connector that's OPEN SOURCE!}
+
+ s.rubyforge_project = "qbwc"
+
+ 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"]
+
+ # specify any dependencies here; for example:
+ # s.add_development_dependency "rspec"
+ s.add_dependency "quickbooks_api", [">= 0.1.6"]
+ s.add_dependency "rubyjedi-soap4r", [">= 1.5.8.20100619003610"]
+
+end

0 comments on commit 42b6148

Please sign in to comment.