flickr_airlift 0.0.2 → 0.0.3

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/flickr_airlift.rb +12 -4
  2. metadata +3 -3
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'flickraw'
3
3
  require 'net/http'
4
+ require 'cgi'
4
5
 
5
6
  module FlickrAirlift
6
7
 
@@ -12,11 +13,18 @@ module FlickrAirlift
12
13
  frob = flickr.auth.getFrob
13
14
  auth_url = FlickRaw.auth_url :frob => frob, :perms => 'read'
14
15
 
15
- # TODO: Use open if it's supported
16
16
  puts " "
17
- puts "Open this url in your process to complete the authication process:"
18
- puts auth_url
19
- puts "Press Enter when you are finished."
17
+ if system("which open")
18
+ puts "opening your browser..."
19
+ sleep 1
20
+ puts "Come back and press Enter when you are finished"
21
+ sleep 2
22
+ system("open '#{auth_url}'")
23
+ else
24
+ puts "Open this url in your process to complete the authication process:"
25
+ puts auth_url
26
+ puts "Press Enter when you are finished."
27
+ end
20
28
  STDIN.getc
21
29
 
22
30
  # Authentication
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flickr_airlift
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stephen Schor