omniauth-douban 1.0.0.rc2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +36 -0
- data/lib/omniauth-douban/version.rb +1 -1
- data/lib/omniauth/strategies/douban.rb +5 -5
- data/omniauth-douban.gemspec +2 -2
- metadata +61 -85
- data/README +0 -0
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Scott Ballantyne, Transi.st
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
= omniauth-douban
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
13
|
+
* Send me a pull request. Bonus points for topic branches.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2011 Scott Ballantyne, Transi.st
|
18
|
+
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
20
|
+
a copy of this software and associated documentation files (the
|
21
|
+
"Software"), to deal in the Software without restriction, including
|
22
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
23
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
24
|
+
permit persons to whom the Software is furnished to do so, subject to
|
25
|
+
the following conditions:
|
26
|
+
|
27
|
+
The above copyright notice and this permission notice shall be
|
28
|
+
included in all copies or substantial portions of the Software.
|
29
|
+
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
31
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
32
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
33
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
34
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
35
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
36
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -14,7 +14,7 @@ module OmniAuth
|
|
14
14
|
:authorize_path => '/service/auth/authorize',
|
15
15
|
:realm => 'OmniAuth',
|
16
16
|
:request_token_path => '/service/auth/request_token',
|
17
|
-
:site => 'http://www.douban.com'
|
17
|
+
:site => 'http://www.douban.com'
|
18
18
|
}
|
19
19
|
end
|
20
20
|
|
@@ -23,18 +23,18 @@ module OmniAuth
|
|
23
23
|
consumer
|
24
24
|
end
|
25
25
|
|
26
|
-
uid { access_token.params[:
|
26
|
+
uid { access_token.params[:douban_user_id] }
|
27
27
|
|
28
28
|
# adapted from https://github.com/intridea/omniauth/blob/0-3-stable/oa-oauth/lib/omniauth/strategies/oauth/douban.rb#L38-53
|
29
29
|
info do
|
30
30
|
{
|
31
31
|
:nickname => raw_info['db:uid']['$t'],
|
32
32
|
:name => raw_info['title']['$t'],
|
33
|
-
:location => raw_info['location'] ? raw_info['location']['$t'] : nil,
|
33
|
+
:location => raw_info['db:location'] ? raw_info['db:location']['$t'] : nil,
|
34
34
|
:image => raw_info['link'].find{|l| l['@rel'] == 'icon'}['@href'],
|
35
35
|
:description => raw_info['content']['$t'],
|
36
36
|
:urls => {
|
37
|
-
'Douban' => raw_info['link'].find{|l| l['@rel'] == 'alternate'}['@href']
|
37
|
+
'Douban' => raw_info['link'].find{|l| l['@rel'] == 'alternate'}['@href']
|
38
38
|
}
|
39
39
|
}
|
40
40
|
end
|
@@ -68,4 +68,4 @@ module OmniAuth
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
71
|
-
end
|
71
|
+
end
|
data/omniauth-douban.gemspec
CHANGED
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = %q{an omniauth strategy for douban}
|
13
13
|
|
14
14
|
s.rubyforge_project = "omniauth-douban"
|
15
|
-
s.add_dependency 'omniauth', '~> 1.
|
16
|
-
|
15
|
+
s.add_dependency 'omniauth', '~> 1.1.0'
|
16
|
+
s.add_dependency 'omniauth-oauth', '~> 1.0.1'
|
17
17
|
s.add_dependency 'multi_json'
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,126 +1,102 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-douban
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
- rc
|
11
|
-
- 2
|
12
|
-
version: 1.0.0.rc2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
prerelease:
|
13
6
|
platform: ruby
|
14
|
-
authors:
|
7
|
+
authors:
|
15
8
|
- Scott Ballantyne
|
16
9
|
autorequire:
|
17
10
|
bindir: bin
|
18
11
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-07-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
23
15
|
name: omniauth
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
26
17
|
none: false
|
27
|
-
requirements:
|
18
|
+
requirements:
|
28
19
|
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 1
|
33
|
-
- 0
|
34
|
-
- 0
|
35
|
-
- rc
|
36
|
-
- 2
|
37
|
-
version: 1.0.0.rc2
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.1.0
|
38
22
|
type: :runtime
|
39
|
-
version_requirements: *id001
|
40
|
-
- !ruby/object:Gem::Dependency
|
41
|
-
name: omniauth-oauth
|
42
23
|
prerelease: false
|
43
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: omniauth-oauth
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
44
33
|
none: false
|
45
|
-
requirements:
|
34
|
+
requirements:
|
46
35
|
- - ~>
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
|
49
|
-
segments:
|
50
|
-
- 1
|
51
|
-
- 0
|
52
|
-
- 0
|
53
|
-
- rc
|
54
|
-
- 2
|
55
|
-
version: 1.0.0.rc2
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.0.1
|
56
38
|
type: :runtime
|
57
|
-
version_requirements: *id002
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: multi_json
|
60
39
|
prerelease: false
|
61
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
41
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.0.1
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: multi_json
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
70
54
|
type: :runtime
|
71
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
72
62
|
description: an omniauth strategy for douban
|
73
|
-
email:
|
63
|
+
email:
|
74
64
|
- ussballantyne@gmail.com
|
75
65
|
executables: []
|
76
|
-
|
77
66
|
extensions: []
|
78
|
-
|
79
67
|
extra_rdoc_files: []
|
80
|
-
|
81
|
-
files:
|
68
|
+
files:
|
82
69
|
- .gitignore
|
83
70
|
- Gemfile
|
84
|
-
-
|
71
|
+
- LICENSE
|
72
|
+
- README.rdoc
|
85
73
|
- Rakefile
|
86
74
|
- lib/omniauth-douban.rb
|
87
75
|
- lib/omniauth-douban/version.rb
|
88
76
|
- lib/omniauth/strategies/douban.rb
|
89
77
|
- omniauth-douban.gemspec
|
90
|
-
homepage:
|
78
|
+
homepage: ''
|
91
79
|
licenses: []
|
92
|
-
|
93
80
|
post_install_message:
|
94
81
|
rdoc_options: []
|
95
|
-
|
96
|
-
require_paths:
|
82
|
+
require_paths:
|
97
83
|
- lib
|
98
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
85
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
105
|
-
- 0
|
106
|
-
version: "0"
|
107
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
91
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
segments:
|
114
|
-
- 1
|
115
|
-
- 3
|
116
|
-
- 1
|
117
|
-
version: 1.3.1
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
118
96
|
requirements: []
|
119
|
-
|
120
97
|
rubyforge_project: omniauth-douban
|
121
|
-
rubygems_version: 1.8.
|
98
|
+
rubygems_version: 1.8.21
|
122
99
|
signing_key:
|
123
100
|
specification_version: 3
|
124
101
|
summary: an omniauth strategy for douban
|
125
102
|
test_files: []
|
126
|
-
|
data/README
DELETED
File without changes
|