bin/tumblr in tumblr_client-0.7.1 vs bin/tumblr in tumblr_client-0.7.2

- old
+ new

@@ -7,10 +7,13 @@ require 'irb' require 'irb/completion' path = File.join ENV['HOME'], '.tumblr' +host = Tumblr::Client.default_api_host.dup +host.gsub! 'api.', 'www.' + if File.exist?(path) # Load configuration from data configuration = YAML.load_file path Tumblr.configure do |config| @@ -21,19 +24,19 @@ else Tumblr.configure do |config| - puts "Register an application at: http://www.tumblr.com/oauth/apps" + puts "Register an application at: http://#{host}/oauth/apps" print 'OAuth Consumer key: ' config.consumer_key = gets.chomp print 'OAuth Consumer secret: ' config.consumer_secret = gets.chomp - site = 'http://www.tumblr.com' + site = "http://#{host}" consumer = OAuth::Consumer.new(config.consumer_key, config.consumer_secret, :site => site) - request_token = consumer.get_request_token + request_token = consumer.get_request_token :oauth_callback => 'http://localhost/' puts puts request_token.authorize_url puts "Post-redirect, copy the oauth_verifier"