Skip to content

Commit 6fb3c08

Browse files
raethlosmaeda-ks
authored andcommitted
Fix PIN authorization (#111)
* Use STDIN.gets for pin prompt * Fix invalid README reference in gemspec
1 parent 65632de commit 6fb3c08

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/twurl/oauth_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def client_auth_parameters
144144
def perform_pin_authorize_workflow
145145
@request_token = consumer.get_request_token
146146
CLI.puts("Go to #{generate_authorize_url} and paste in the supplied PIN")
147-
pin = gets
147+
pin = STDIN.gets
148148
access_token = @request_token.get_access_token(:oauth_verifier => pin.chomp)
149149
{:oauth_token => access_token.token, :oauth_token_secret => access_token.secret}
150150
end

twurl.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Gem::Specification.new do |spec|
99
spec.description = %q{Curl for the Twitter API}
1010
spec.email = ['[email protected]']
1111
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12-
spec.extra_rdoc_files = %w(COPYING INSTALL README)
12+
spec.extra_rdoc_files = %w(COPYING INSTALL README.md)
1313
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with?('test/') }
1414
spec.homepage = 'http://github.com/twitter/twurl'
1515
spec.licenses = ['MIT']
1616
spec.name = 'twurl'
17-
spec.rdoc_options = ['--title', 'twurl -- OAuth-enabled curl for the Twitter API', '--main', 'README', '--line-numbers', '--inline-source']
17+
spec.rdoc_options = ['--title', 'twurl -- OAuth-enabled curl for the Twitter API', '--main', 'README.md', '--line-numbers', '--inline-source']
1818
spec.require_paths = ['lib']
1919
spec.required_ruby_version = '>= 2.4.0'
2020
spec.rubyforge_project = 'twurl'

0 commit comments

Comments
 (0)