mage-hand 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 0.5.1
2
+ - Renamed User to OPUser to avoid collisions with the user objects in other apps
1
3
  0.5.0
2
4
  - Renamed MageHand to MageHandController for the controller include
3
5
  - Renamed MageHandController::logged_in? to MageHandController::logged_in_op?
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.8
1
+ 0.4.9
@@ -7,4 +7,9 @@ module MageHandUser
7
7
 
8
8
  save!
9
9
  end
10
+
11
+ def obsidian_portal
12
+ @obsidian_portal ||= MageHand.get_client(nil, access_token_key,
13
+ access_token_secret)
14
+ end
10
15
  end
@@ -3,7 +3,7 @@ require 'json'
3
3
  require 'active_support/core_ext/string'
4
4
  require 'ob_port/client'
5
5
  require 'ob_port/base'
6
- require 'ob_port/user'
6
+ require 'ob_port/op_user'
7
7
  require 'ob_port/campaign'
8
8
  require 'ob_port/wiki_page'
9
9
  require 'ob_port/errors'
@@ -40,7 +40,7 @@ module MageHandController
40
40
  end
41
41
 
42
42
  def obsidian_portal
43
- @obsidian_portal ||= Client.get_client(session[:request_token], session[:access_token_key],
43
+ @obsidian_portal ||= MageHand.get_client(session[:request_token], session[:access_token_key],
44
44
  session[:access_token_secret], request.url, params)
45
45
  end
46
46
 
@@ -1,5 +1,5 @@
1
1
  module MageHand
2
- class User < Base
2
+ class OPUser < Base
3
3
  attr_simple :username, :profile_url, :avatar_image_url,
4
4
  :created_at, :last_seen_at, :utc_offset, :locale, :is_ascendant
5
5
  inflate_if_nil :avatar_image_url, :created_at, :last_seen_at, :utc_offset,
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "mage-hand"
8
- s.version = "0.4.8"
8
+ s.version = "0.4.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steven Hammond"]
12
- s.date = "2012-03-23"
12
+ s.date = "2012-03-31"
13
13
  s.description = "mage-hand is a ghostly hand that reaches across the internet to access the Obsidian Portal API."
14
14
  s.email = "shammond@northpub.com"
15
15
  s.extra_rdoc_files = [
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  "lib/ob_port/campaign.rb",
35
35
  "lib/ob_port/client.rb",
36
36
  "lib/ob_port/errors.rb",
37
- "lib/ob_port/user.rb",
37
+ "lib/ob_port/op_user.rb",
38
38
  "lib/ob_port/wiki_page.rb",
39
39
  "mage-hand.gemspec",
40
40
  "test/helper.rb",
@@ -11,6 +11,11 @@ class TestMageHandUser < Test::Unit::TestCase
11
11
  end
12
12
 
13
13
  context 'The Mage Hand User Module' do
14
+ setup do
15
+ MageHand::Client.set_app_keys('asdfasdf', 'asdfasdfasdfasdfasdf')
16
+ stub_request(:post, "https://www.obsidianportal.com/oauth/request_token").
17
+ to_return(:status => 200, :body => "", :headers => {})
18
+ end
14
19
  should 'be able to save op authorization tokens' do
15
20
  user = User.new
16
21
  assert !user.saved
@@ -19,5 +24,10 @@ class TestMageHandUser < Test::Unit::TestCase
19
24
  assert_equal 'abcdefg', user.access_token_key
20
25
  assert_equal '1234567', user.access_token_secret
21
26
  end
27
+
28
+ should 'return an obsidian portal client' do
29
+ user = User.new
30
+ assert user.obsidian_portal.instance_of? MageHand::Client
31
+ end
22
32
  end
23
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mage-hand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-23 00:00:00.000000000 Z
12
+ date: 2012-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth
@@ -197,7 +197,7 @@ files:
197
197
  - lib/ob_port/campaign.rb
198
198
  - lib/ob_port/client.rb
199
199
  - lib/ob_port/errors.rb
200
- - lib/ob_port/user.rb
200
+ - lib/ob_port/op_user.rb
201
201
  - lib/ob_port/wiki_page.rb
202
202
  - mage-hand.gemspec
203
203
  - test/helper.rb
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  segments:
223
223
  - 0
224
- hash: 4023440787944590669
224
+ hash: -4216612953549198741
225
225
  required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements: