mage-hand 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mage-hand.rb +24 -0
- data/mage-hand.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/lib/mage-hand.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'ob_port/client'
|
2
|
+
|
3
|
+
module ObPort
|
4
|
+
|
5
|
+
protected
|
6
|
+
|
7
|
+
def ob_port_login_required
|
8
|
+
@ob_client = ObPort::Client.new(session[:request_token], session[:access_token], request.url, params)
|
9
|
+
store_tokens
|
10
|
+
return true if logged_in?
|
11
|
+
|
12
|
+
redirect_to @ob_client.request_token.authorize_url
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
16
|
+
def logged_in?
|
17
|
+
@ob_client.logged_in?
|
18
|
+
end
|
19
|
+
|
20
|
+
def store_tokens
|
21
|
+
session[:request_token] = @ob_client.request_token
|
22
|
+
session[:access_token] = @ob_client.access_token
|
23
|
+
end
|
24
|
+
end
|
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: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steven Hammond
|