cadun 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cadun/user.rb CHANGED
@@ -41,15 +41,15 @@ module Cadun
41
41
  end
42
42
 
43
43
  def country
44
- pais['nome']
44
+ pais['nome'] if pais.present?
45
45
  end
46
46
 
47
47
  def city
48
- cidade['nome']
48
+ cidade['nome'] if cidade.present?
49
49
  end
50
50
 
51
51
  def state
52
- estado['sigla']
52
+ estado['sigla'] if estado.present?
53
53
  end
54
54
 
55
55
  def to_hash
data/lib/cadun/version.rb CHANGED
@@ -2,7 +2,7 @@ module Cadun
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH] * '.'
8
8
  end
@@ -75,8 +75,11 @@ describe Cadun::User do
75
75
  end
76
76
 
77
77
  context "when the user has minimal data" do
78
- subject { Cadun::User.find_by_email("fulano_adm_campanha@globomail.com").to_hash }
79
- specify { should include(:cadun_id => "23370159") }
78
+ subject { Cadun::User.find_by_email("fulano_adm_campanha@globomail.com") }
79
+ specify { subject.id.should == "23370159" }
80
+ specify { subject.city.should == nil }
81
+ specify { subject.state.should == nil }
82
+ specify { subject.country.should == nil }
80
83
  end
81
84
  end
82
85
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-08-03 00:00:00.000000000Z
14
+ date: 2011-08-04 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
18
- requirement: &2168462760 !ruby/object:Gem::Requirement
18
+ requirement: &2152231800 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 3.0.0
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2168462760
26
+ version_requirements: *2152231800
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
- requirement: &2168462260 !ruby/object:Gem::Requirement
29
+ requirement: &2152231300 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 2.1.2
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2168462260
37
+ version_requirements: *2152231300
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rest-client
40
- requirement: &2168461880 !ruby/object:Gem::Requirement
40
+ requirement: &2152230920 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2168461880
48
+ version_requirements: *2152230920
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: json
51
- requirement: &2168461420 !ruby/object:Gem::Requirement
51
+ requirement: &2152230460 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *2168461420
59
+ version_requirements: *2152230460
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: i18n
62
- requirement: &2168461000 !ruby/object:Gem::Requirement
62
+ requirement: &2152230040 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *2168461000
70
+ version_requirements: *2152230040
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rake
73
- requirement: &2168460580 !ruby/object:Gem::Requirement
73
+ requirement: &2152229620 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *2168460580
81
+ version_requirements: *2152229620
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: rspec
84
- requirement: &2168460160 !ruby/object:Gem::Requirement
84
+ requirement: &2152229200 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *2168460160
92
+ version_requirements: *2152229200
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: rr
95
- requirement: &2168459740 !ruby/object:Gem::Requirement
95
+ requirement: &2152228780 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0'
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *2168459740
103
+ version_requirements: *2152228780
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: fakeweb
106
- requirement: &2168459320 !ruby/object:Gem::Requirement
106
+ requirement: &2152228360 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,7 +111,7 @@ dependencies:
111
111
  version: '0'
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *2168459320
114
+ version_requirements: *2152228360
115
115
  description: A wrapper for the Globo.com's authentication/authorization API
116
116
  email:
117
117
  - bruno@azisaka.com.br