postini 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,9 @@
1
- == 0.0.1 Work in progress
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( Potini.endpoint_uri( address ) )
42
- request = Postini::API::AutmatedBatch::Deleteuser.new( Postini.auth, address )
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
- # TODO: Add support for sending a welcome message and assigning to an org
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
- request = Postini::API::AutomatedBatch::Adduser.new( Postini.auth, @address )
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
 
@@ -2,7 +2,7 @@ module Postini
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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.1
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-18 00:00:00 +02:00
12
+ date: 2008-08-19 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency