grave 1.0.1 → 1.6.1

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 (2) hide show
  1. data/lib/grave.rb +9 -9
  2. metadata +2 -2
data/lib/grave.rb CHANGED
@@ -5,42 +5,42 @@ require 'json'
5
5
 
6
6
  module Grave
7
7
  class User
8
- def self.new(email)
8
+ def initialize(email)
9
9
  hash = Digest::MD5.hexdigest(email)
10
10
  json = JSON.parse(open("http://en.gravatar.com/#{hash}.json").read)
11
11
  json = json["entry"]
12
12
  @@json = json[0]
13
13
  end
14
14
 
15
- def self.hash
15
+ def hash
16
16
  @@json['hash']
17
17
  end
18
18
 
19
- def self.id
19
+ def id
20
20
  @@json['id']
21
21
  end
22
22
 
23
- def self.url
23
+ def url
24
24
  @@json['profileUrl']
25
25
  end
26
26
 
27
- def self.preferred
27
+ def preferred
28
28
  @@json['preferredUsername']
29
29
  end
30
30
 
31
- def self.thumbnail
31
+ def thumbnail
32
32
  @@json['thumbnailUrl']
33
33
  end
34
34
 
35
- def self.display
35
+ def display
36
36
  @@json['displayName']
37
37
  end
38
38
 
39
- def self.bio
39
+ def bio
40
40
  @@json['aboutMe']
41
41
  end
42
42
 
43
- def self.location
43
+ def location
44
44
  @@json['currentLocation']
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grave
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.6.1
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-06-06 00:00:00.000000000 Z
12
+ date: 2012-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json