fireeagle 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +9 -0
- data/README.txt +5 -5
- data/Rakefile +1 -1
- data/lib/fireeagle/application.rb +11 -3
- data/lib/fireeagle/version.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -7,14 +7,14 @@ FireEagle[http://fireeagle.research.yahoo.com/] (FE) is a system providing centr
|
|
7
7
|
== Usage
|
8
8
|
|
9
9
|
require 'fireeagle'
|
10
|
-
f = FireEagle.new(:token => "foo", :secret => "bar")
|
10
|
+
f = FireEagle::Base.new(:token => "foo", :secret => "bar")
|
11
11
|
user = FireEagle::User.new(f,"token")
|
12
12
|
l = FireEagle::Location.new(:country => "Belize")
|
13
13
|
user.location = l
|
14
14
|
user.location
|
15
15
|
=> #<FireEagle::Location:0x15ba0d0 @details={:country=>"Belize"}>
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
Rubyforge Project Page:: http://rubyforge.org/projects/fireeagle
|
18
|
+
Author:: Jesse Newland (http://soylentfoo.jnewland.com) (jnewland@gmail.com[mailto:jnewland@gmail.com])
|
19
|
+
Copyright:: Copyright (c) 2007 Jesse Newland
|
20
|
+
License:: Distributes under the same terms as Ruby
|
data/Rakefile
CHANGED
@@ -77,7 +77,7 @@ end
|
|
77
77
|
|
78
78
|
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\n\n")
|
79
79
|
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
80
|
-
hoe.remote_rdoc_dir =
|
80
|
+
hoe.remote_rdoc_dir = ''
|
81
81
|
|
82
82
|
desc 'Generate website files'
|
83
83
|
task :website_generate do
|
@@ -5,10 +5,18 @@ class FireEagle::Application < FireEagle::APIBase
|
|
5
5
|
#2. User token displayed onscreen (this is good for testing, but will likely be phased out or modified in the future)
|
6
6
|
#3. User token is exchanged at a later time (good for mobile devices where a user may not want to enter their Yahoo! username/password)
|
7
7
|
#
|
8
|
-
def authorize_url(callback_url =
|
9
|
-
|
8
|
+
def authorize_url(callback_url = nil)
|
9
|
+
if callback_url.nil?
|
10
|
+
return "http://#{FireEagle::API_DOMAIN}/authorize.php?appid=#{@fireeagle.token}"
|
11
|
+
else
|
12
|
+
return "http://#{FireEagle::API_DOMAIN}/authorize.php?appid=#{@fireeagle.token}&callback=#{CGI::escape(callback_url)}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# URL needed to obtain a token to pass to exchange_token
|
17
|
+
def token_url
|
18
|
+
"http://#{FireEagle::API_DOMAIN}/displayToken.php?appid=#{@fireeagle.token}"
|
10
19
|
end
|
11
|
-
|
12
20
|
|
13
21
|
#Applications which do not maintain a user repository (for example, a lightweight mobile application) may not wish to use the callback mechanism described above. These applications still must send users to authorize.php, but do not expect an immediate response (though at the moment, the authorize page will display the user token for easy testing and debugging). After the user has authorized an application, the application can later retrieve the user token in exchange for a short code obtained by the user from the Fire Eagle site. The user would retrieve a short code from the FE site and enter the code into the application which would then use the exchangeToken.php to exchange the short code for a full user token.
|
14
22
|
#
|
data/lib/fireeagle/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: fireeagle
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-06-
|
6
|
+
version: 0.0.2
|
7
|
+
date: 2007-06-22 00:00:00 -04:00
|
8
8
|
summary: Fire Eagle is a site that keeps track of your current location and helps you share it with other sites and services safely. There are hundreds of potential applications. This gem exposes the FireEagle API as Ruby Classes
|
9
9
|
require_paths:
|
10
10
|
- lib
|