-
-
Save hSATAC/716c6f48e8425d399724 to your computer and use it in GitHub Desktop.
Revisions
-
monde revised this gist
Jan 26, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ } ) request_token = consumer.get_request_token(:exclude_callback => true) puts <<WORDS Open the following authorization url in a web browser to fetch the oauth -
monde revised this gist
Jan 20, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,8 @@ require 'bundler/setup' require 'oauth' readme = File.join(File.dirname(__FILE__), 'README.md') lines = open(readme).readlines[14..32] puts lines.join oauth_consumer_key = Readline.readline("enter your OAuth Consumer Key: ", true).strip -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,5 @@ Gem::Specification.new do |s| s.require_path = '.' s.bindir = '.' s.executables << 'generate-token' s.post_install_message = "\nto generate a your Tumblr OAuth token run the following command:\n\nbundle exec generate-token" end -
monde revised this gist
Jan 20, 2013 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,8 @@ Gem::Specification.new do |s| s.email = 'mikemondragon@gmail.com' s.summary = 'Generate a OAuth token and secret for the Tumblr.com API' s.description = 'This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.' s.files = ['generate-tumblr-oauth-token.rb', 'generate-token'] s.require_path = '.' s.bindir = '.' s.executables << 'generate-token' end -
monde revised this gist
Jan 20, 2013 . 3 changed files with 64 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Gemfile.lock This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,10 @@ # Generate a OAuth token and secret for the Tumblr.com API This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog. Make a directory, cd into it, download the microgem's Gemfile and run bundle install ```shell mkdir /path/to/some/new/dir @@ -11,10 +13,12 @@ wget https://gist.github.com/raw/4577106/6bc9befedcd5238ce9f2ee562cace666dece460 bundle install ``` Go to the Tumblr OAuth Applications panel, http://www.tumblr.com/oauth/apps and log in if prompted. Click the "+ Register application" button to grant access to your application and fill in the following to register a new application. Unless you know otherwise, use this URL for the "Default callback URL" http://sasquatch.github.com/tumblr.html * Application name @@ -23,11 +27,11 @@ http://sasquatch.github.com/tumblr.html * Administrative contact email * Default callback URL Click "Register" and you'll be redirected back to http://www.tumblr.com/oauth/apps Make note of your new "OAuth Consumer Key" and "Show secret key / Secret Key" for the application you've just registered. Now generate an OAuth token and secret that your application will use to post to your tumblr in the following manner. ```shell bundle exec generate-token This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,54 @@ require 'pp' require 'readline' require 'rubygems' require 'bundler/setup' require 'oauth' lines = open('README.md').readlines[14..32] puts lines.join oauth_consumer_key = Readline.readline("enter your OAuth Consumer Key: ", true).strip oauth_secret_key = Readline.readline(" enter your Secret Key: ", true).strip consumer = OAuth::Consumer.new( oauth_consumer_key, oauth_secret_key, { :site => 'http://www.tumblr.com', :request_token_path => '/oauth/request_token', :authorize_path => '/oauth/authorize', :access_token_path => '/oauth/access_token', :http_method => :get } ) request_token = consumer.get_request_token puts <<WORDS Open the following authorization url in a web browser to fetch the oauth verification key. Select the "Allow" option if you would like to "Grant this application read and write access to your Tumblr account?". After you do so you will be redirected to the URL that was previously saved as the 'Default callback URL'. You are looking for a URL parameter named 'oauth_verifier'. Your authorization URL:\n\n#{request_token.authorize_url} WORDS verifier = Readline.readline("enter your oauth_verifier: ", true).strip access_token = request_token.get_access_token(:oauth_verifier => verifier) puts <<WORDS Save these OAuth values for the application that you have authorized to interact with your Tumblr account via their API. OAuth Consumer Key: #{oauth_consumer_key} OAuth Consumer Secret: #{oauth_secret_key} OAuth Token: #{access_token.token} OAuth Token Secret: #{access_token.secret} Bye, bye. WORDS -
monde revised this gist
Jan 20, 2013 . 2 changed files with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,6 +30,5 @@ just registered. Now generate OAuth token and secret that your application will use to post to your tumblr in the following manner. ```shell bundle exec generate-token ``` File renamed without changes. -
monde revised this gist
Jan 20, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,4 +31,5 @@ Now generate OAuth token and secret that your application will use to post to yo ```shell bundle exec generate ``` -
monde revised this gist
Jan 20, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,8 @@ Gem::Specification.new do |s| s.email = 'mikemondragon@gmail.com' s.summary = 'Generate a OAuth token and secret for the Tumblr.com API' s.description = 'This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.' s.files = ['generate-tumblr-oauth-token.rb', 'generate'] s.require_path = '.' s.bindir = '.' s.executables << 'generate' end -
monde revised this gist
Jan 20, 2013 . 3 changed files with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,5 +30,5 @@ just registered. Now generate OAuth token and secret that your application will use to post to your tumblr in the following manner. ```shell bundle exec generate ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ #!/usr/bin/env ruby require 'generate-tumblr-oauth-token.rb' puts "running generate" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,6 @@ Gem::Specification.new do |s| s.summary = 'Generate a OAuth token and secret for the Tumblr.com API' s.description = 'This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.' s.executables << 'generate' s.files = ['generate-tumblr-oauth-token.rb', 'generate'] s.require_path = '.' end -
monde revised this gist
Jan 20, 2013 . 2 changed files with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!/usr/bin/env ruby require 'generate-tumblr-oauth-token.rb' puts "running bin/generate" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ require 'pp' require 'rubygems' require 'bundler/setup' require 'oauth' puts "loaded generate-tumblr-oauth-token.rb" -
monde revised this gist
Jan 20, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.email = 'mikemondragon@gmail.com' s.summary = 'Generate a OAuth token and secret for the Tumblr.com API' s.description = 'This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.' s.executables << 'generate' s.files = ['generate-tumblr-oauth-token.rb', 'bin/generate'] s.require_path = '.' end -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #!/usr/bin/env ruby require 'pp' require 'rubygems' require 'bundler/setup' -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Gem::Specification.new do |s| s.email = 'mikemondragon@gmail.com' s.summary = 'Generate a OAuth token and secret for the Tumblr.com API' s.description = 'This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.' s.executables << 'generate-tumblr-oauth-token.rb' s.files = ['generate-tumblr-oauth-token.rb'] s.require_path = '.' end -
monde renamed this gist
Jan 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Gem::Specification.new do |s| s.name = 'generate-tumblr-oauth-token' s.version = '0.0.1' s.platform = Gem::Platform::RUBY s.author = 'Mike Mondragon' -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Gem::Specification.new do |s| s.name = 'generate-tumblr-oauth-token.rb' s.version = '0.0.1' s.platform = Gem::Platform::RUBY s.author = 'Mike Mondragon' -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Make a directory, cd into it, download the microgem's Gemfile and run bundle ins ```shell mkdir /path/to/some/new/dir cd /path/to/some/new/dir wget https://gist.github.com/raw/4577106/6bc9befedcd5238ce9f2ee562cace666dece460c/Gemfile bundle install ``` -
monde revised this gist
Jan 20, 2013 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #!/usr/bin/env ruby -w require 'pp' require 'rubygems' require 'bundler/setup' require 'oauth' puts "hello" -
monde revised this gist
Jan 20, 2013 . No changes.There are no files selected for viewing
-
monde revised this gist
Jan 20, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,4 @@ source "http://rubygems.org" gem "generate-tumblr-oauth-token", :git => "https://gist.github.com/4577106.git" gem "oauth" -
monde revised this gist
Jan 20, 2013 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ Gem::Specification.new do |s| s.name = 'generate-tumblr-oauth-token' s.version = '0.0.1' s.platform = Gem::Platform::RUBY s.author = 'Mike Mondragon' s.email = 'mikemondragon@gmail.com' s.summary = 'Generate a OAuth token and secret for the Tumblr.com API' s.description = 'This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.' s.files = ['generate-tumblr-oauth-token.rb'] s.require_path = '.' end -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Make a directory, cd into it, download the microgem's Gemfile and run bundle ins ```shell mkdir /path/to/some/new/dir cd /path/to/some/new/dir wget https://gist.github.com/raw/4577106/42ea3b90e0a111063e56cde9ddf74328df66dc91/Gemfile bundle install ``` -
monde revised this gist
Jan 20, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ gem "generate-tumblr-oauth-token", :git => "https://gist.github.com/4577106.git" -
monde created this gist
Jan 20, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ # Generate a OAuth token and secret for the Tumblr.com API This is a micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog. Make a directory, cd into it, download the microgem's Gemfile and run bundle install ```shell mkdir /path/to/some/new/dir cd /path/to/some/new/dir wget http://xxxxxxxxx/Gemfile bundle install ``` Go to the Tumblr OAuth Applications panel, http://www.tumblr.com/oauth/apps, log in if prompted. Click the "+ Register application" button to grant access to your application and fill in the following to register a new application. Unless you know otherwise, use this URL for the "Default callback URL" http://sasquatch.github.com/tumblr.html * Application name * Application website * Application description * Administrative contact email * Default callback URL Click "Register" and you'll be redirected back to http://www.tumblr.com/oauth/apps . Make note of your new "OAuth Consumer Key" and "Show secret key / Secret Key" for the application you've just registered. Now generate OAuth token and secret that your application will use to post to your tumblr in the following manner. ```shell bundle exec generate-tumblr-oauth-token.rb ```