geni 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +16 -7
  2. data/geni.gemspec +2 -2
  3. data/lib/geni/client.rb +5 -2
  4. metadata +4 -3
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # About
2
2
 
3
- Simple Ruby client to the geni.com REST/OAuth API.
4
-
5
- This library needs some specs !
3
+ Simple Ruby client to the [Geni](http://www.geni.com) REST/OAuth API.
6
4
 
7
5
  # Installation
8
6
 
@@ -23,14 +21,25 @@ This library needs some specs !
23
21
  puts profile.name
24
22
  puts profile.birth_date
25
23
 
26
- geni.parents.each do |profile|
24
+ profile.parents.each do |profile|
27
25
  puts profile.name
28
26
  end
29
27
 
30
- geni.children.each do |profile|
28
+ profile.children.each do |profile|
31
29
  puts profile.name
32
30
  end
33
31
 
34
- geni.siblings.each do |profile|
32
+ profile.siblings.each do |profile|
35
33
  puts profile.name
36
- end
34
+ end
35
+
36
+ I've also put [a demo Rails app](https://github.com/aurels/geni-rails-example) online to show the usage of the gem with Rails or Sinatra.
37
+
38
+ # Not done yet
39
+
40
+ + This gem needs some specs
41
+ + This gem only access profile and immediate family information. I don't have a paid account, I cannot implement everything now.
42
+
43
+ # Feedback and help
44
+
45
+ Please send [me](http://aurelien.malisart.be) your feedback if you are using the Gem and have any remarks (or not).
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{geni}
5
- s.version = "0.0.4"
5
+ s.version = "0.0.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Aurélien Malisart"]
8
+ s.authors = ["Aurélien Malisart","Matt Johnston"]
9
9
  s.date = %q{2011-02-03}
10
10
  s.description = %q{A Ruby client to the geni.com API}
11
11
  s.email = %q{aurelien.malisart@gmail.com}
@@ -4,9 +4,12 @@ module Geni
4
4
  SITE = 'https://www.geni.com'
5
5
  ACCESS_TOKEN_PATH = '/oauth/token'
6
6
 
7
- attr_reader :oauth_client, :access_token
7
+ attr_reader :oauth_client, :access_token, :callback
8
8
 
9
9
  def initialize(params = {})
10
+
11
+ @callback = params[:callback] ? params[:callback] : '/callback'
12
+
10
13
  @oauth_client = OAuth2::Client.new(params[:app_id], params[:app_secret],
11
14
  :site => SITE,
12
15
  :parse_json => true,
@@ -44,7 +47,7 @@ module Geni
44
47
 
45
48
  def redirect_uri(request)
46
49
  uri = URI.parse(request.url)
47
- uri.path = '/callback'
50
+ uri.path = @callback
48
51
  uri.query = nil
49
52
  uri.to_s
50
53
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geni
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Aur\xC3\xA9lien Malisart"
14
+ - Matt Johnston
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []