Permalink
Browse files

Change itunes paths to tunes

  • Loading branch information...
1 parent bc6895b commit 0826640160417bf399bc664c6b869ff359f0a5cd @dewski committed Apr 18, 2012
Showing with 22 additions and 23 deletions.
  1. +1 −1 Gemfile
  2. +3 −3 itunes.gemspec
  3. +18 −19 lib/tunes/request.rb
View
2 Gemfile
@@ -1,3 +1,3 @@
-source "http://rubygems.org"
+source 'http://rubygems.org'
gemspec
View
6 itunes.gemspec
@@ -1,14 +1,14 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path('../lib', __FILE__)
-require 'itunes/version'
+require 'tunes/version'
Gem::Specification.new do |s|
- s.name = 'itunes'
+ s.name = 'tunes'
s.version = Tunes::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ['Garrett Bjerkhoel', 'Steve Agalloco']
s.email = %q{me@garrettbjerkhoel.com}
- s.homepage = %q{http://github.com/dewski/itunes}
+ s.homepage = %q{http://github.com/dewski/tunes}
s.summary = %q{iTunes API}
s.rubyforge_project = 'itunes'
View
37 lib/tunes/request.rb
@@ -8,29 +8,28 @@ module Request
# @private
private
- # Perform an HTTP GET request
- def request(request_type, params)
- url = '/WebObjects/MZStoreServices.woa/wa/ws' + request_type
+ # Perform an HTTP GET request
+ def request(request_type, params)
+ url = '/WebObjects/MZStoreServices.woa/wa/ws' + request_type
- response = connection.get do |req|
- req.url url, params
- req.options = REQUEST_OPTIONS
- end
- response.body
+ response = connection.get do |req|
+ req.url url, params
+ req.options = REQUEST_OPTIONS
end
+ response.body
+ end
- def connection
- options = {
- :headers => {'Accept' => 'application/json', 'User-Agent' => user_agent},
- :url => api_endpoint,
- }
+ def connection
+ options = {
+ :headers => {'Accept' => 'application/json', 'User-Agent' => user_agent},
+ :url => api_endpoint,
+ }
- Faraday.new(options) do |builder|
- builder.use Faraday::Response::Rashify
- builder.use Faraday::Response::ParseJson
- builder.adapter(adapter)
- end
+ Faraday.new(options) do |builder|
+ builder.use Faraday::Response::Rashify
+ builder.use Faraday::Response::ParseJson
+ builder.adapter(adapter)
end
-
+ end
end
end

0 comments on commit 0826640

Please sign in to comment.