geni 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{geni}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Aurélien Malisart"]
@@ -42,13 +42,23 @@ module Geni
42
42
  id_or_ids.kind_of?(Array) ? profiles : profiles.first
43
43
  end
44
44
 
45
- class << self
46
- def redirect_uri(request)
47
- uri = URI.parse(request.url)
48
- uri.path = '/callback'
49
- uri.query = nil
50
- uri.to_s
51
- end
45
+ def redirect_uri(request)
46
+ uri = URI.parse(request.url)
47
+ uri.path = '/callback'
48
+ uri.query = nil
49
+ uri.to_s
50
+ end
51
+
52
+ def authorize_url(request)
53
+ oauth_client.web_server.authorize_url({
54
+ :redirect_uri => redirect_uri(request)
55
+ })
56
+ end
57
+
58
+ def get_token(code, request)
59
+ oauth_client.web_server.get_access_token(code, {
60
+ :redirect_uri => redirect_uri(request)
61
+ }).token
52
62
  end
53
63
  end
54
64
  end
@@ -28,6 +28,9 @@ module Geni
28
28
  attr_reader :url
29
29
  attr_reader :language
30
30
  attr_reader :curator
31
+ attr_reader :mugshot_urls
32
+ attr_reader :birth_date_parts
33
+ attr_reader :relationship
31
34
 
32
35
  def parents
33
36
  immediate_family.parents
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geni
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Aur\xC3\xA9lien Malisart"