Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle dependencies

  • Loading branch information...
commit 80080059e42814d018deb652dfcfd11f63935f03 1 parent 6843180
@anibalcucco authored
Showing with 3 additions and 30 deletions.
  1. +3 −2 basecamp.gemspec
  2. +0 −28 lib/basecamp.rb
View
5 basecamp.gemspec
@@ -9,10 +9,11 @@ Gem::Specification.new do |gem|
gem.homepage = "http://github.com/anibalcucco/basecamp-wrapper"
gem.authors = ['Anibal Cucco', 'James A. Rosen']
- gem.files = Dir.glob("{lib}/**/*") + %w(readme)
+ gem.files = Dir.glob("{lib}/**/*") + %w(README.rdoc)
- gem.add_dependency 'oauth2', '~> 0.0.8'
+ gem.add_dependency 'oauth2', '~> 0.0.8'
gem.add_dependency 'xml-simple'
+ gem.add_dependency 'activerecord'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'mg', '~> 0.0.8'
View
28 lib/basecamp.rb
@@ -3,34 +3,6 @@
require 'date'
require 'time'
-begin
- require 'xmlsimple'
-rescue LoadError
- begin
- require 'rubygems'
- require 'xmlsimple'
- rescue LoadError
- abort <<-ERROR
-The 'xml-simple' library could not be loaded. If you have RubyGems installed
-you can install xml-simple by doing "gem install xml-simple".
-ERROR
- end
-end
-
-begin
- require 'active_resource'
-rescue LoadError
- begin
- require 'rubygems'
- require 'active_resource'
- rescue LoadError
- abort <<-ERROR
-The 'active_resource' library could not be loaded. If you have RubyGems
-installed you can install ActiveResource by doing "gem install activeresource".
-ERROR
- end
-end
-
module Basecamp
class Connection #:nodoc:
def initialize(master)

2 comments on commit 8008005

@defeated

just a note:

this change means the consumer has to add require 'active_resource' to their code, otherwise I get an exception:

/Users/defeated/.rvm/gems/ruby-1.9.2-p136/gems/basecamp-0.0.4/lib/basecamp.rb:28:in `<module:Basecamp>':
uninitialized constant Basecamp::ActiveResource (NameError)
@anibalcucco

You're right. Pushed a fix and version bumped to 0.0.5. Thanks for the heads up!

Please sign in to comment.
Something went wrong with that request. Please try again.