Permalink
Browse files

Update setup instructions

Closes #168.
  • Loading branch information...
1 parent fe5c2f7 commit 94070d7d6a99a9c11e038398372dd6ed0d18f9d4 @sferik committed Mar 6, 2014
Showing with 18 additions and 19 deletions.
  1. +9 −10 lib/t/cli.rb
  2. +8 −8 spec/cli_spec.rb
  3. +1 −1 spec/helper.rb
View
@@ -56,14 +56,13 @@ def authorize
if @rcfile.empty?
say "Welcome! Before you can use t, you'll first need to register an"
say 'application with Twitter. Just follow the steps below:'
- say ' 1. Sign in to the Twitter Developer site and click'
- say " \"Create a new application\"."
+ say ' 1. Sign in to the Twitter Application Management site and click'
+ say ' "Create New App".'
say ' 2. Complete the required fields and submit the form.'
say ' Note: Your application must have a unique name.'
- say " We recommend: \"<your handle>/t\"."
- say ' 3. Go to the Settings tab of your application, and change the'
- say " Access setting to \"Read, Write and Access direct messages\"."
- say ' 4. Go to the Details tab to view the consumer key and secret,'
+ say ' 3. Go to the Permissions tab of your application, and change the'
+ say ' Access setting to "Read, Write and Access direct messages".'
+ say ' 4. Go to the API Keys tab to view the consumer key and secret,'
say " which you'll need to copy and paste below when prompted."
say
ask 'Press [Enter] to open the Twitter Developer site.'
@@ -79,17 +78,17 @@ def authorize
say
end
require 'launchy'
- open_or_print('https://dev.twitter.com/apps', :dry_run => options['display-uri'])
- key = ask 'Enter your consumer key:'
- secret = ask 'Enter your consumer secret:'
+ open_or_print('https://apps.twitter.com', :dry_run => options['display-uri'])
+ key = ask 'Enter your API key:'
+ secret = ask 'Enter your API secret:'
consumer = OAuth::Consumer.new(key, secret, :site => Twitter::REST::Client::ENDPOINT)
request_token = consumer.get_request_token
uri = generate_authorize_uri(consumer, request_token)
say
say 'In a moment, you will be directed to the Twitter app authorization page.'
say 'Perform the following steps to complete the authorization process:'
say ' 1. Sign in to Twitter.'
- say " 2. Press \"Authorize app\"."
+ say ' 2. Press "Authorize app".'
say ' 3. Copy and paste the supplied PIN below when prompted.'
say
ask 'Press [Enter] to open the Twitter app authorization page.'
View
@@ -52,9 +52,9 @@
it 'requests the correct resource' do
expect($stdout).to receive(:print)
expect($stdin).to receive(:gets).and_return("\n")
- expect($stdout).to receive(:print).with('Enter your consumer key: ')
+ expect($stdout).to receive(:print).with('Enter your API key: ')
expect($stdin).to receive(:gets).and_return('abc123')
- expect($stdout).to receive(:print).with('Enter your consumer secret: ')
+ expect($stdout).to receive(:print).with('Enter your API secret: ')
expect($stdin).to receive(:gets).and_return('asdfasd223sd2')
expect($stdout).to receive(:print).with('Press [Enter] to open the Twitter app authorization page. ')
expect($stdin).to receive(:gets).and_return("\n")
@@ -69,9 +69,9 @@
expect do
expect($stdout).to receive(:print)
expect($stdin).to receive(:gets).and_return("\n")
- expect($stdout).to receive(:print).with('Enter your consumer key: ')
+ expect($stdout).to receive(:print).with('Enter your API key: ')
expect($stdin).to receive(:gets).and_return('abc123')
- expect($stdout).to receive(:print).with('Enter your consumer secret: ')
+ expect($stdout).to receive(:print).with('Enter your API secret: ')
expect($stdin).to receive(:gets).and_return('asdfasd223sd2')
expect($stdout).to receive(:print).with('Press [Enter] to open the Twitter app authorization page. ')
expect($stdin).to receive(:gets).and_return("\n")
@@ -90,9 +90,9 @@
it 'requests the correct resource' do
expect($stdout).to receive(:print)
expect($stdin).to receive(:gets).and_return("\n")
- expect($stdout).to receive(:print).with('Enter your consumer key: ')
+ expect($stdout).to receive(:print).with('Enter your API key: ')
expect($stdin).to receive(:gets).and_return('abc123')
- expect($stdout).to receive(:print).with('Enter your consumer secret: ')
+ expect($stdout).to receive(:print).with('Enter your API secret: ')
expect($stdin).to receive(:gets).and_return('asdfasd223sd2')
expect($stdout).to receive(:print).with('Press [Enter] to open the Twitter app authorization page. ')
expect($stdin).to receive(:gets).and_return("\n")
@@ -107,9 +107,9 @@
expect do
expect($stdout).to receive(:print)
expect($stdin).to receive(:gets).and_return("\n")
- expect($stdout).to receive(:print).with('Enter your consumer key: ')
+ expect($stdout).to receive(:print).with('Enter your API key: ')
expect($stdin).to receive(:gets).and_return('abc123')
- expect($stdout).to receive(:print).with('Enter your consumer secret: ')
+ expect($stdout).to receive(:print).with('Enter your API secret: ')
expect($stdin).to receive(:gets).and_return('asdfasd223sd2')
expect($stdout).to receive(:print).with('Press [Enter] to open the Twitter app authorization page. ')
expect($stdin).to receive(:gets).and_return("\n")
View
@@ -10,7 +10,7 @@
SimpleCov.start do
add_filter '/spec/'
- minimum_coverage(99.25)
+ minimum_coverage(99.26)
end
require 't'

0 comments on commit 94070d7

Please sign in to comment.