email_vision 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +1 -1
- data/VERSION +1 -1
- data/email_vision.gemspec +2 -2
- data/lib/email_vision.rb +2 -5
- data/spec/email_vision_spec.rb +8 -10
- metadata +3 -3
data/Readme.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/email_vision.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{email_vision}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-05}
|
13
13
|
s.email = %q{grosser.michael@gmail.com}
|
14
14
|
s.files = [
|
15
15
|
".gitignore",
|
data/lib/email_vision.rb
CHANGED
@@ -29,10 +29,6 @@ class EmailVision
|
|
29
29
|
execute_by_obj(:update_member_by_obj, attributes)
|
30
30
|
end
|
31
31
|
|
32
|
-
def update_email(old, new)
|
33
|
-
execute(:update_member, :email => old, :field => :email, :value => new)
|
34
|
-
end
|
35
|
-
|
36
32
|
def create(attributes)
|
37
33
|
execute_by_obj(:insert_member_by_obj, attributes)
|
38
34
|
end
|
@@ -91,8 +87,9 @@ class EmailVision
|
|
91
87
|
end
|
92
88
|
|
93
89
|
def execute_by_obj(method, attributes)
|
90
|
+
existing_email = attributes.delete(:email_was) || attributes[:email]
|
94
91
|
entries = attributes.map{|k,v| {:entry => {:key => k, :value => v}}}
|
95
|
-
execute(method, :member => {:email =>
|
92
|
+
execute(method, :member => {:email => existing_email, :dynContent => entries})
|
96
93
|
end
|
97
94
|
|
98
95
|
def execute(method, options={})
|
data/spec/email_vision_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe "EmailVision" do
|
|
21
21
|
def reset_email
|
22
22
|
email = client.find(changeable_user[:member_id])[:email]
|
23
23
|
wait_for_job_to_finish do
|
24
|
-
client.
|
24
|
+
client.update(:email_was => email, :email => changeable_user[:email])
|
25
25
|
end
|
26
26
|
email = client.find(changeable_user[:member_id])[:email]
|
27
27
|
email.should == changeable_user[:email]
|
@@ -83,18 +83,16 @@ describe "EmailVision" do
|
|
83
83
|
job_id = client.update(:email => changeable_user[:email], :firstname => random_value)
|
84
84
|
client.job_status(job_id).should == 'Insert'
|
85
85
|
end
|
86
|
-
end
|
87
|
-
|
88
|
-
describe :update_email do
|
89
|
-
after do
|
90
|
-
reset_email
|
91
|
-
end
|
92
86
|
|
93
87
|
it "updates the email" do
|
94
|
-
|
95
|
-
|
88
|
+
begin
|
89
|
+
wait_for_job_to_finish do
|
90
|
+
client.update(:email_was => changeable_user[:email], :email => email)
|
91
|
+
end
|
92
|
+
client.find(email)[:email].should == email
|
93
|
+
ensure
|
94
|
+
reset_email
|
96
95
|
end
|
97
|
-
client.find(email)[:email].should == email
|
98
96
|
end
|
99
97
|
end
|
100
98
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michael Grosser
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-08-05 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|