oneview 0.0.7 → 0.1.0
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.
- checksums.yaml +5 -5
- data/lib/oneview/api/contacts.rb +11 -8
- data/lib/oneview/api/emails.rb +8 -6
- data/lib/oneview/api/sms.rb +8 -6
- data/lib/oneview/client.rb +13 -11
- data/lib/oneview/entity/contact.rb +5 -5
- data/lib/oneview/version.rb +1 -1
- data/spec/oneview/api/contacts_spec.rb +21 -21
- data/spec/oneview/api/emails_spec.rb +9 -9
- data/spec/oneview/api/sms_spec.rb +9 -9
- data/spec/oneview/client_spec.rb +8 -8
- data/spec/oneview/entity/contact_spec.rb +8 -4
- data/spec/oneview/entity/dynamic_field_spec.rb +2 -2
- data/spec/oneview/entity/email_spec.rb +2 -3
- data/spec/oneview/entity/phone_spec.rb +2 -2
- data/spec/oneview/entity/sms_spec.rb +2 -2
- data/spec/oneview_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1857bba3aac752fce075e2650e6539f78aed654dce1606ead5e321d1a1d45cbd
|
4
|
+
data.tar.gz: a32f66a7ed8c420062e0d0aab328b87c550f2e0942793273fd478bcedda38840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5956a4b6c292587295ce697a03a5ed9d1e6aba51895222d451b8c4bac5771d1e387bf0807de9518b340ed8421eac7c47fe09828b3bb930e08bf5dd16c3f03b02
|
7
|
+
data.tar.gz: 3a5a5e4999b732f61150325e9a938d0950b463bc5f0bad030627a04210162ca772dec30170e9185d6bb8938d71bd4bf90d0d7e3d16456d5e847d6fb09c265366
|
data/lib/oneview/api/contacts.rb
CHANGED
@@ -3,25 +3,28 @@ module Oneview
|
|
3
3
|
class Contacts < Client
|
4
4
|
require_all 'oneview/entity', 'contact', 'dynamic_field', 'phone'
|
5
5
|
|
6
|
-
base_uri "
|
6
|
+
base_uri "https://oneview.com.br/api/contacts"
|
7
7
|
|
8
8
|
def create(data)
|
9
|
-
return parse_response(self.class.post("/", :
|
10
|
-
return parse_response(self.class.post("/", :
|
9
|
+
return parse_response(self.class.post("/", body: build_body(data), headers: header)) if data.is_a?(Hash)
|
10
|
+
return parse_response(self.class.post("/", body: build_body(data.as_parameter), headers: header)) if data.is_a?(Oneview::Entity::Contact)
|
11
|
+
|
11
12
|
raise ArgumentError
|
12
13
|
end
|
13
14
|
alias :new :create
|
14
15
|
|
15
16
|
def update(id, data)
|
16
|
-
return parse_response(self.class.patch("/" + id, :
|
17
|
-
return parse_response(self.class.patch("/" + id, :
|
17
|
+
return parse_response(self.class.patch("/" + id, body: build_body(data), headers: header)) if data.is_a?(Hash)
|
18
|
+
return parse_response(self.class.patch("/" + id, body: build_body(data.as_parameter), headers: header)) if data.is_a?(Oneview::Entity::Contact)
|
19
|
+
|
18
20
|
raise ArgumentError
|
19
21
|
end
|
20
22
|
|
21
23
|
private
|
22
|
-
|
23
|
-
|
24
|
-
|
24
|
+
|
25
|
+
def build_body(parameters)
|
26
|
+
super(contact: parameters)
|
27
|
+
end
|
25
28
|
end
|
26
29
|
end
|
27
30
|
end
|
data/lib/oneview/api/emails.rb
CHANGED
@@ -3,19 +3,21 @@ module Oneview
|
|
3
3
|
class Emails < Client
|
4
4
|
require_all 'oneview/entity', 'email'
|
5
5
|
|
6
|
-
base_uri "
|
6
|
+
base_uri "https://oneview.com.br/api/senders/send_email"
|
7
7
|
|
8
8
|
def create(data)
|
9
|
-
return parse_response(self.class.post("/", :
|
10
|
-
return parse_response(self.class.post("/", :
|
9
|
+
return parse_response(self.class.post("/", body: build_body(data), headers: header)) if data.is_a?(Hash)
|
10
|
+
return parse_response(self.class.post("/", body: build_body(data.as_parameter), headers: header)) if data.is_a?(Oneview::Entity::Email)
|
11
|
+
|
11
12
|
raise ArgumentError
|
12
13
|
end
|
13
14
|
alias :new :create
|
14
15
|
|
15
16
|
private
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
|
18
|
+
def build_body(parameters)
|
19
|
+
super(parameters)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
data/lib/oneview/api/sms.rb
CHANGED
@@ -3,19 +3,21 @@ module Oneview
|
|
3
3
|
class Sms < Client
|
4
4
|
require_all 'oneview/entity', 'sms'
|
5
5
|
|
6
|
-
base_uri "
|
6
|
+
base_uri "https://oneview.com.br/api/senders/send_sms"
|
7
7
|
|
8
8
|
def create(data)
|
9
|
-
return parse_response(self.class.post("/", :
|
10
|
-
return parse_response(self.class.post("/", :
|
9
|
+
return parse_response(self.class.post("/", body: build_body(data), headers: header)) if data.is_a?(Hash)
|
10
|
+
return parse_response(self.class.post("/", body: build_body(data.as_parameter), headers: header)) if data.is_a?(Oneview::Entity::Sms)
|
11
|
+
|
11
12
|
raise ArgumentError
|
12
13
|
end
|
13
14
|
alias :new :create
|
14
15
|
|
15
16
|
private
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
|
18
|
+
def build_body(parameters)
|
19
|
+
super(parameters)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
data/lib/oneview/client.rb
CHANGED
@@ -17,6 +17,7 @@ module Oneview
|
|
17
17
|
|
18
18
|
def initialize(access_token)
|
19
19
|
raise NoAccessTokenError if access_token.nil? || access_token.strip == ""
|
20
|
+
|
20
21
|
@access_token = access_token
|
21
22
|
end
|
22
23
|
|
@@ -33,17 +34,18 @@ module Oneview
|
|
33
34
|
end
|
34
35
|
|
35
36
|
protected
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
|
38
|
+
def header
|
39
|
+
{"Content-Type" => "application/json", "Accept" => "application/json"}
|
40
|
+
end
|
41
|
+
|
42
|
+
def build_body(parameters)
|
43
|
+
parameters.merge(:access_token => @access_token).to_json
|
44
|
+
end
|
45
|
+
|
46
|
+
def parse_response(response)
|
47
|
+
return Oneview::Client::Response.new(response)
|
48
|
+
end
|
47
49
|
|
48
50
|
class Response
|
49
51
|
attr_accessor :status, :payload, :raw_response
|
@@ -11,11 +11,11 @@ module Oneview
|
|
11
11
|
def as_parameter
|
12
12
|
variables = instance_variables.map do |name|
|
13
13
|
case name
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
when :@phone
|
15
|
+
["phone_attributes", instance_variable_get(name).as_parameter]
|
16
|
+
when :@dynamic_fields
|
17
|
+
else
|
18
|
+
[name.to_s.tr("@", ""), instance_variable_get(name)]
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
data/lib/oneview/version.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Api::Contacts do
|
4
|
+
let(:header) { { "Content-Type" => "application/json", "Accept" => "application/json" } }
|
5
|
+
|
4
6
|
describe "creating" do
|
5
|
-
let(:contact_params) {{:
|
6
|
-
let(:header) {{"Content-Type" => "application/json", "Accept" => "application/json"}}
|
7
|
+
let(:contact_params) { { contact: { name: "name", email: "email" }, access_token: "abc" } }
|
7
8
|
|
8
|
-
before
|
9
|
+
before do
|
9
10
|
dynamic_field = Oneview::Entity::DynamicField.new
|
10
11
|
dynamic_field.name = "dynamic_field"
|
11
12
|
dynamic_field.value = "123"
|
@@ -25,35 +26,34 @@ RSpec.describe Oneview::Api::Contacts do
|
|
25
26
|
@contact.phone = phone
|
26
27
|
@contact.dynamic_fields << dynamic_field
|
27
28
|
|
28
|
-
stub_request(:post, "
|
29
|
+
stub_request(:post, "https://oneview.com.br/api/contacts/").to_return(status: 200)
|
29
30
|
end
|
30
31
|
|
31
32
|
describe "with raw parameters" do
|
32
|
-
it "
|
33
|
-
expect(Oneview::Api::Contacts).to receive(:post).with("/", :
|
33
|
+
it "issues a post to the contacts url" do
|
34
|
+
expect(Oneview::Api::Contacts).to receive(:post).with("/", body: contact_params.to_json, headers: header).and_call_original
|
34
35
|
|
35
|
-
Oneview.new("abc").contacts.create({:
|
36
|
+
Oneview.new("abc").contacts.create({ name: "name", email: "email"})
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
39
40
|
describe "with entity parameter" do
|
40
|
-
it "
|
41
|
-
expect(Oneview::Api::Contacts).to receive(:post).with("/", :
|
41
|
+
it "issues a post to the contacts url" do
|
42
|
+
expect(Oneview::Api::Contacts).to receive(:post).with("/", body: { contact: @contact.as_parameter, access_token: "abc" }.to_json, headers: header).and_call_original
|
42
43
|
|
43
44
|
Oneview.new("abc").contacts.create(@contact)
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
47
48
|
describe "with invalid parameter" do
|
48
|
-
it "
|
49
|
-
expect{Oneview.new("abc").contacts.create(Array.new)}.to raise_error(ArgumentError)
|
49
|
+
it "raises ArgumentError when passing neither a Hash nor a Contact" do
|
50
|
+
expect { Oneview.new("abc").contacts.create(Array.new) }.to raise_error(ArgumentError)
|
50
51
|
end
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
54
55
|
describe "updating" do
|
55
|
-
let(:contact_params) {{:
|
56
|
-
let(:header) {{"Content-Type" => "application/json", "Accept" => "application/json"}}
|
56
|
+
let(:contact_params) { { contact: { name: "name", email: "email", id: "23" }, access_token: "abc" } }
|
57
57
|
|
58
58
|
before(:each) do
|
59
59
|
phone = Oneview::Entity::Phone.new
|
@@ -71,28 +71,28 @@ RSpec.describe Oneview::Api::Contacts do
|
|
71
71
|
@contact.zip_code = "12233-444"
|
72
72
|
@contact.phone = phone
|
73
73
|
|
74
|
-
stub_request(:patch, "
|
74
|
+
stub_request(:patch, "https://oneview.com.br/api/contacts/23").to_return(status: 200)
|
75
75
|
end
|
76
76
|
|
77
77
|
describe "with raw parameters" do
|
78
|
-
it "
|
79
|
-
expect(Oneview::Api::Contacts).to receive(:patch).with("/" + contact_params[:contact][:id], :
|
78
|
+
it "issues a patch to the contacts url" do
|
79
|
+
expect(Oneview::Api::Contacts).to receive(:patch).with("/" + contact_params[:contact][:id], body: contact_params.to_json, headers: header).and_call_original
|
80
80
|
|
81
|
-
Oneview.new("abc").contacts.update("23",{:
|
81
|
+
Oneview.new("abc").contacts.update("23", { name: "name", email: "email", id: "23" })
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
85
|
describe "with entity parameter" do
|
86
|
-
it "
|
87
|
-
expect(Oneview::Api::Contacts).to receive(:patch).with("/" + @contact.id, :
|
86
|
+
it "issues a patch to the contacts url" do
|
87
|
+
expect(Oneview::Api::Contacts).to receive(:patch).with("/" + @contact.id, body: { contact: @contact.as_parameter, access_token: "abc" }.to_json, headers: header).and_call_original
|
88
88
|
|
89
89
|
Oneview.new("abc").contacts.update(@contact.id, @contact)
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
93
|
describe "with invalid parameter" do
|
94
|
-
it "
|
95
|
-
expect{Oneview.new("abc").contacts.create(Array.new)}.to raise_error(ArgumentError)
|
94
|
+
it "raises ArgumentError when passing neither a Hash nor a Contact" do
|
95
|
+
expect { Oneview.new("abc").contacts.create(Array.new) }.to raise_error(ArgumentError)
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
@@ -2,8 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Api::Emails do
|
4
4
|
describe "creating" do
|
5
|
-
let(:email_params) {{:
|
6
|
-
let(:header) {{"Content-Type" => "application/json", "Accept" => "application/json"}}
|
5
|
+
let(:email_params) { { from: "from@email.com", to: "to@email.com", body: "body", subject: "subject", schedule: "14/05/2014 15:30", access_token: "abc" } }
|
6
|
+
let(:header) { { "Content-Type" => "application/json", "Accept" => "application/json" } }
|
7
7
|
|
8
8
|
before(:each) do
|
9
9
|
@email = Oneview::Entity::Email.new
|
@@ -13,28 +13,28 @@ RSpec.describe Oneview::Api::Emails do
|
|
13
13
|
@email.subject = "subject"
|
14
14
|
@email.schedule = "14/05/2014 15:30"
|
15
15
|
|
16
|
-
stub_request(:post, "
|
16
|
+
stub_request(:post, "https://oneview.com.br/api/senders/send_email/").to_return(status: 200)
|
17
17
|
end
|
18
18
|
|
19
19
|
describe "with raw parameters" do
|
20
|
-
it "
|
21
|
-
expect(Oneview::Api::Emails).to receive(:post).with("/", :
|
20
|
+
it "issues a post to the send email url" do
|
21
|
+
expect(Oneview::Api::Emails).to receive(:post).with("/", body: email_params.to_json, headers: header).and_call_original
|
22
22
|
|
23
23
|
Oneview.new("abc").emails.create(email_params)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "with entity parameter" do
|
28
|
-
it "
|
29
|
-
expect(Oneview::Api::Emails).to receive(:post).with("/", :
|
28
|
+
it "issues a post to the send email url" do
|
29
|
+
expect(Oneview::Api::Emails).to receive(:post).with("/", body: @email.as_parameter.merge(access_token: "abc").to_json, headers: header).and_call_original
|
30
30
|
|
31
31
|
Oneview.new("abc").emails.create(@email)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
describe "with invalid parameter" do
|
36
|
-
it "
|
37
|
-
expect{Oneview.new("abc").emails.create(Array.new)}.to raise_error(ArgumentError)
|
36
|
+
it "raises ArgumentError when passing neither a Hash nor an Email" do
|
37
|
+
expect { Oneview.new("abc").emails.create(Array.new) }.to raise_error(ArgumentError)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -2,8 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Api::Sms do
|
4
4
|
describe "creating" do
|
5
|
-
let(:sms_params) {{:
|
6
|
-
let(:header) {{"Content-Type" => "application/json", "Accept" => "application/json"}}
|
5
|
+
let(:sms_params) { { numbers: "55129985587", message: "message", schedule: "14/05/2014 15:30", access_token: "abc" } }
|
6
|
+
let(:header) { { "Content-Type" => "application/json", "Accept" => "application/json" } }
|
7
7
|
|
8
8
|
before(:each) do
|
9
9
|
@sms = Oneview::Entity::Sms.new
|
@@ -11,28 +11,28 @@ RSpec.describe Oneview::Api::Sms do
|
|
11
11
|
@sms.message = "message"
|
12
12
|
@sms.schedule = "14/05/2014 15:30"
|
13
13
|
|
14
|
-
stub_request(:post, "
|
14
|
+
stub_request(:post, "https://oneview.com.br/api/senders/send_sms/").to_return(status: 200)
|
15
15
|
end
|
16
16
|
|
17
17
|
describe "with raw parameters" do
|
18
|
-
it "
|
19
|
-
expect(Oneview::Api::Sms).to receive(:post).with("/", :
|
18
|
+
it "issues a post to the send sms url" do
|
19
|
+
expect(Oneview::Api::Sms).to receive(:post).with("/", body: sms_params.to_json, headers: header).and_call_original
|
20
20
|
|
21
21
|
Oneview.new("abc").sms.create(sms_params)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "with entity parameter" do
|
26
|
-
it "
|
27
|
-
expect(Oneview::Api::Sms).to receive(:post).with("/", :
|
26
|
+
it "issues a post to the send sms url" do
|
27
|
+
expect(Oneview::Api::Sms).to receive(:post).with("/", body: @sms.as_parameter.merge(access_token: "abc").to_json, headers: header).and_call_original
|
28
28
|
|
29
29
|
Oneview.new("abc").sms.create(@sms)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "with invalid parameter" do
|
34
|
-
it "
|
35
|
-
expect{Oneview.new("abc").sms.create(Array.new)}.to raise_error(ArgumentError)
|
34
|
+
it "raises ArgumentError when passing neither a Hash nor an Sms" do
|
35
|
+
expect { Oneview.new("abc").sms.create(Array.new) }.to raise_error(ArgumentError)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
data/spec/oneview/client_spec.rb
CHANGED
@@ -5,22 +5,22 @@ RSpec.describe Oneview::Client do
|
|
5
5
|
Oneview::Client.send(:public, *Oneview::Client.protected_instance_methods)
|
6
6
|
end
|
7
7
|
|
8
|
-
it "
|
9
|
-
expect{Oneview::Client.new("")}.to raise_error(Oneview::Client::NoAccessTokenError, "Please provide an access token")
|
8
|
+
it "raises NoAccessTokenError when creating a new client without the access token" do
|
9
|
+
expect { Oneview::Client.new("") }.to raise_error(Oneview::Client::NoAccessTokenError, "Please provide an access token")
|
10
10
|
end
|
11
11
|
|
12
|
-
it "
|
12
|
+
it "returns the correct headers" do
|
13
13
|
expect(Oneview::Client.new("abc").header).to eq({"Content-Type" => "application/json", "Accept" => "application/json"})
|
14
14
|
end
|
15
15
|
|
16
|
-
it "
|
17
|
-
expect(Oneview::Client.new("abc").build_body(
|
16
|
+
it "appends the access token to the parameters" do
|
17
|
+
expect(Oneview::Client.new("abc").build_body(abc: "abc", def: "def")).to eq({ abc: "abc", def: "def", access_token: "abc" }.to_json)
|
18
18
|
end
|
19
19
|
|
20
|
-
it "
|
21
|
-
stub_request(:post, "
|
20
|
+
it "returns an Oneview::Client::Response with the status" do
|
21
|
+
stub_request(:post, "https://oneview.com.br/api/contacts/").to_return(status: 200)
|
22
22
|
|
23
|
-
response = Oneview.new("abc").contacts.create(
|
23
|
+
response = Oneview.new("abc").contacts.create(name: "name")
|
24
24
|
|
25
25
|
expect(response.class).to eq(Oneview::Client::Response)
|
26
26
|
expect(response.status).to eq(200)
|
@@ -2,11 +2,15 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Entity::Contact do
|
4
4
|
describe "as_parameter" do
|
5
|
-
let(:contact_as_parameter)
|
6
|
-
|
7
|
-
|
5
|
+
let(:contact_as_parameter) do
|
6
|
+
{
|
7
|
+
"name" => "name", "email" => "email@email.com", "birthday" => "14/10/2014", "city" => "city", "state" => "state",
|
8
|
+
"zip_code" => "12233-444", "phone_attributes" => { "country_code" => "+55", "area_code" => "12", "number" => "998998789" },
|
9
|
+
"dynamic_field" => "123"
|
10
|
+
}
|
11
|
+
end
|
8
12
|
|
9
|
-
it "
|
13
|
+
it "returns the contact as parameter" do
|
10
14
|
contact = Oneview::Entity::Contact.new
|
11
15
|
|
12
16
|
contact.name = "name"
|
@@ -2,9 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Entity::DynamicField do
|
4
4
|
describe "as_parameter" do
|
5
|
-
let(:dynamic_field_as_parameter) {{"name" => "dynamic_field", "value" => "abc"}}
|
5
|
+
let(:dynamic_field_as_parameter) { { "name" => "dynamic_field", "value" => "abc" } }
|
6
6
|
|
7
|
-
it "
|
7
|
+
it "returns the dynamic_field as parameter" do
|
8
8
|
dynamic_field = Oneview::Entity::DynamicField.new
|
9
9
|
dynamic_field.name = "dynamic_field"
|
10
10
|
dynamic_field.value = "abc"
|
@@ -2,10 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Entity::Email do
|
4
4
|
describe "as_parameter" do
|
5
|
-
let(:email_as_parameter) {{"from" => "test@test.com", "to" => "test2@test2.com", "body" => "Bodys Test",
|
6
|
-
"subject" => "Subjects Test"}}
|
5
|
+
let(:email_as_parameter) { { "from" => "test@test.com", "to" => "test2@test2.com", "body" => "Bodys Test", "subject" => "Subjects Test" } }
|
7
6
|
|
8
|
-
it "
|
7
|
+
it "returns the email as parameter" do
|
9
8
|
email = Oneview::Entity::Email.new
|
10
9
|
|
11
10
|
email.from = "test@test.com"
|
@@ -2,9 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Entity::Phone do
|
4
4
|
describe "as_parameter" do
|
5
|
-
let(:phone_as_parameter) {{"number" => "999999999", "area_code" => "12", "country_code" => "+55"}}
|
5
|
+
let(:phone_as_parameter) { { "number" => "999999999", "area_code" => "12", "country_code" => "+55" } }
|
6
6
|
|
7
|
-
it "
|
7
|
+
it "returns the phone as parameter" do
|
8
8
|
phone = Oneview::Entity::Phone.new
|
9
9
|
phone.country_code = "+55"
|
10
10
|
phone.area_code = "12"
|
@@ -2,9 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
RSpec.describe Oneview::Entity::Sms do
|
4
4
|
describe "as_parameter" do
|
5
|
-
let(:sms_as_parameter) {{"numbers" => "5512998998798", "message" => "Bodys Test"}}
|
5
|
+
let(:sms_as_parameter) { { "numbers" => "5512998998798", "message" => "Bodys Test" } }
|
6
6
|
|
7
|
-
it "
|
7
|
+
it "returns the sms as parameter" do
|
8
8
|
sms = Oneview::Entity::Sms.new
|
9
9
|
|
10
10
|
sms.message = "Bodys Test"
|
data/spec/oneview_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oneview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gustavo Berdugo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -95,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
|
99
|
-
rubygems_version: 2.4.8
|
98
|
+
rubygems_version: 3.0.8
|
100
99
|
signing_key:
|
101
100
|
specification_version: 4
|
102
101
|
summary: This gem provides integration with Oneview APIs (http://www.oneview.com.br/)
|