Skip to content

Commit

Permalink
Service is not a singleton by default anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
danlucraft committed Jul 2, 2013
1 parent 8465e63 commit 45ccb79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/songkick/transport/service.rb
Expand Up @@ -70,12 +70,14 @@ def self.new_transport
timeout: get_timeout)
end

include Singleton

def http
@http ||= self.class.new_transport
end

def stub_transport(http)
@http = http
end

def rescue_404(response=nil)
yield
rescue Songkick::Transport::HttpError => e
Expand Down
2 changes: 1 addition & 1 deletion songkick-transport.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "songkick-transport"
s.version = "0.3.2"
s.version = "1.0.0"
s.summary = "HTTP client abstraction for service clients"
s.author = "James Coglan"
s.email = "james@songkick.com"
Expand Down

0 comments on commit 45ccb79

Please sign in to comment.