mage-hand 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -6
- data/VERSION +1 -1
- data/mage-hand.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -18,7 +18,8 @@ gem 'mage-hand'
|
|
18
18
|
|
19
19
|
== Usage
|
20
20
|
|
21
|
-
|
21
|
+
MageHand handles the OAuth authentication to Obsidian Portal for you. To do that from a Rails controller
|
22
|
+
try this...
|
22
23
|
|
23
24
|
class CoolController < ApplicationController
|
24
25
|
include MageHand
|
@@ -26,16 +27,19 @@ class CoolController < ApplicationController
|
|
26
27
|
|
27
28
|
This will handle all of the authenticate and redirecting etc. You will be returned to the original requested action after authentication.
|
28
29
|
|
29
|
-
|
30
|
+
You can get objects from Obsidian Portal by calling the obsidian_portal object. obsidian_portal is a method that gets added to your controller by the include.
|
30
31
|
|
31
|
-
obsidian_portal.get
|
32
|
+
obsidian_portal.current_user will get the currently authenticated user. obsidian_portal.me will
|
33
|
+
do the same thing.
|
32
34
|
|
33
|
-
|
35
|
+
To make a direct call to the API, you have to do it through the access token.
|
34
36
|
|
35
|
-
|
37
|
+
obsidian_portal.access_token.get('/v1/users/me.json').body
|
36
38
|
|
37
|
-
|
39
|
+
== Known Issues
|
38
40
|
|
41
|
+
1. Only finding a user through current_user or me is currently supported.
|
42
|
+
2. Should hide accesss token and have get work correctly on the obsidian_portal instance
|
39
43
|
|
40
44
|
== Contributing to mage-hand
|
41
45
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/mage-hand.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mage-hand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steven Hammond
|