ivanvc-pft 0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/pft/oauth.rb +6 -1
  2. metadata +1 -1
data/lib/pft/oauth.rb CHANGED
@@ -26,7 +26,12 @@ module Pft
26
26
  raise "Cannot authorize the account" if authorize.downcase == "n"
27
27
  consumer = OAuth::Consumer.new(@key, @secret, {:site => 'http://twitter.com'})
28
28
  request_token = consumer.get_request_token
29
- system "open #{request_token.authorize_url}"
29
+ url = request_token.authorize_url
30
+ if RUBY_PLATFORM =~ /darwin/
31
+ system "open #{url}"
32
+ elsif !system("firefox #{url}")
33
+ puts "Please point your browser to: \n\n#{url}\n\n"
34
+ end
30
35
  puts "Please enter the provided PIN:"
31
36
  pin = Base.input.gets.chomp
32
37
  access_token = request_token.get_access_token(:oauth_verifier => pin) rescue false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ivanvc-pft
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Iv\xC3\xA1n Vald\xC3\xA9s"