postini 0.0.1 → 0.0.2
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.
- data/History.txt +6 -1
- data/lib/postini/user.rb +8 -6
- data/lib/postini/version.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
== 0.0.
|
1
|
+
== 0.0.2 2008-08-19
|
2
|
+
|
3
|
+
* Fixed broken code for adding new users, with the most basic of validations
|
4
|
+
* Fixed broken code for removing existing users
|
5
|
+
|
6
|
+
== 0.0.1 2008-08-18
|
2
7
|
|
3
8
|
* Initial release
|
4
9
|
* Support for the Postini Endpoint Resolver API
|
data/lib/postini/user.rb
CHANGED
@@ -38,8 +38,8 @@ module Postini
|
|
38
38
|
|
39
39
|
# Permanently remove the user from Postini
|
40
40
|
def destroy( address )
|
41
|
-
remote = Postini::API::AutomatedBatch::AutomatedBatchPort.new(
|
42
|
-
request = Postini::API::
|
41
|
+
remote = Postini::API::AutomatedBatch::AutomatedBatchPort.new( Postini.endpoint_uri( address ) )
|
42
|
+
request = Postini::API::AutomatedBatch::Deleteuser.new( Postini.auth, address )
|
43
43
|
remote.deleteuser( request )
|
44
44
|
end
|
45
45
|
|
@@ -56,15 +56,17 @@ module Postini
|
|
56
56
|
@id.nil?
|
57
57
|
end
|
58
58
|
|
59
|
-
# Create the new user.
|
60
|
-
#
|
61
|
-
def create
|
59
|
+
# Create the new user. Pass +welcome+ as '1' to have a welcome mail sent
|
60
|
+
# to the user. The org for the user will be pulled from the org attribute
|
61
|
+
def create( welcome = 0 )
|
62
62
|
return false unless new?
|
63
63
|
|
64
64
|
# TODO: Add missing validations here
|
65
|
+
return false if @address.nil? || @org.nil?
|
65
66
|
|
66
67
|
remote = Postini::API::AutomatedBatch::AutomatedBatchPort.new( Postini.endpoint_uri )
|
67
|
-
|
68
|
+
args = Postini::API::AutomatedBatch::Adduserargs.new( @org, welcome )
|
69
|
+
request = Postini::API::AutomatedBatch::Adduser.new( Postini.auth, @address, args )
|
68
70
|
remote.adduser( request )
|
69
71
|
end
|
70
72
|
|
data/lib/postini/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth Kalmer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-19 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|