racked 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/racked.rb +15 -5
- data/racked.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/racked.rb
CHANGED
@@ -3,13 +3,16 @@ require 'json'
|
|
3
3
|
require './lib/racked/server.rb'
|
4
4
|
|
5
5
|
class Mailbox
|
6
|
-
|
6
|
+
|
7
|
+
attr_accessor :attributes
|
8
|
+
|
7
9
|
def initialize(attributes)
|
8
10
|
@attributes = attributes #JSON.parse(json)
|
11
|
+
puts @attributes.keys.inspect
|
9
12
|
end
|
10
13
|
|
11
14
|
def method_missing(method, *args)
|
12
|
-
#x =
|
15
|
+
#x = name.to_s.camelize(:lower)
|
13
16
|
x = method.to_s
|
14
17
|
#return @attributes[access_key] if(@attributes.keys.include?(access_key))
|
15
18
|
if(@attributes.keys.include?(x))
|
@@ -45,13 +48,20 @@ class Racked
|
|
45
48
|
# end
|
46
49
|
mailboxes = []
|
47
50
|
response["rsMailboxes"].each do |mailbox|
|
48
|
-
|
51
|
+
puts 'mailbox - ' + mailbox["name"]
|
52
|
+
#mailboxes << Mailbox.new(mailbox)
|
53
|
+
mailboxes << mailbox
|
49
54
|
end
|
50
55
|
end
|
51
56
|
|
52
|
-
def create_mailbox
|
57
|
+
def create_mailbox(msisdn_number, fields_array)
|
53
58
|
#create a customer mailbox
|
54
|
-
|
59
|
+
response = @server.post '/customers/856863/domains/econetmail.com/rs/mailboxes/' + msisdn_number, fields_array
|
60
|
+
# puts response.inspect
|
61
|
+
# puts response['x-error-message']
|
62
|
+
# puts response.body.inspect
|
63
|
+
return response
|
64
|
+
#response = JSON.parse(response.body )
|
55
65
|
end
|
56
66
|
|
57
67
|
end
|
data/racked.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{racked}
|
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 = ["Noto Modungwa"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-08}
|
13
13
|
s.description = %q{Allows you to manage your rackspace hosted mailboxes, eg. create a new mailbox.}
|
14
14
|
s.email = %q{notomodungwa@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
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
|
- Noto Modungwa
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-08 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
hash:
|
112
|
+
hash: -880027759
|
113
113
|
segments:
|
114
114
|
- 0
|
115
115
|
version: "0"
|