oneview 0.0.7 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 04df1d92f090b2ec6650d15318893970addf3235
4
- data.tar.gz: 2ef2e2f7e80737b305b3158c8b644cf4e2f747cb
2
+ SHA256:
3
+ metadata.gz: 1857bba3aac752fce075e2650e6539f78aed654dce1606ead5e321d1a1d45cbd
4
+ data.tar.gz: a32f66a7ed8c420062e0d0aab328b87c550f2e0942793273fd478bcedda38840
5
5
  SHA512:
6
- metadata.gz: 93b6b0be44b4476720145b0624d0efb30041e72f54d11b33dc90cd3238fd40378f20f6cb15906bc58becf36b8f5417616297631fb9b1658862b36955fa0d1d03
7
- data.tar.gz: 75001d5c6463ce9993c7c0d116e5f3a51c255d7487593df6857c7ceaf3719357a0e6589d5f4e0ce77df3ee71f29c8ad1d5aabae0049cd71b54b57ae8ffda1287
6
+ metadata.gz: 5956a4b6c292587295ce697a03a5ed9d1e6aba51895222d451b8c4bac5771d1e387bf0807de9518b340ed8421eac7c47fe09828b3bb930e08bf5dd16c3f03b02
7
+ data.tar.gz: 3a5a5e4999b732f61150325e9a938d0950b463bc5f0bad030627a04210162ca772dec30170e9185d6bb8938d71bd4bf90d0d7e3d16456d5e847d6fb09c265366
@@ -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 "http://www.oneview.com.br/api/contacts"
6
+ base_uri "https://oneview.com.br/api/contacts"
7
7
 
8
8
  def create(data)
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)
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, :body => build_body(data), :headers => header)) if data.is_a?(Hash)
17
- return parse_response(self.class.patch("/" + id, :body => build_body(data.as_parameter), :headers => header)) if data.is_a?(Oneview::Entity::Contact)
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
- def build_body(parameters)
23
- super({:contact => parameters})
24
- end
24
+
25
+ def build_body(parameters)
26
+ super(contact: parameters)
27
+ end
25
28
  end
26
29
  end
27
30
  end
@@ -3,19 +3,21 @@ module Oneview
3
3
  class Emails < Client
4
4
  require_all 'oneview/entity', 'email'
5
5
 
6
- base_uri "http://www.oneview.com.br/api/senders/send_email"
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("/", :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)
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
- def build_body(parameters)
17
- super(parameters)
18
- end
17
+
18
+ def build_body(parameters)
19
+ super(parameters)
20
+ end
19
21
  end
20
22
  end
21
23
  end
@@ -3,19 +3,21 @@ module Oneview
3
3
  class Sms < Client
4
4
  require_all 'oneview/entity', 'sms'
5
5
 
6
- base_uri "http://www.oneview.com.br/api/senders/send_sms"
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("/", :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)
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
- def build_body(parameters)
17
- super(parameters)
18
- end
17
+
18
+ def build_body(parameters)
19
+ super(parameters)
20
+ end
19
21
  end
20
22
  end
21
23
  end
@@ -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
- def header
37
- {"Content-Type" => "application/json", "Accept" => "application/json"}
38
- end
39
-
40
- def build_body(parameters)
41
- parameters.merge(:access_token => @access_token).to_json
42
- end
43
-
44
- def parse_response(response)
45
- return Oneview::Client::Response.new(response)
46
- end
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
- 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)]
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
 
@@ -1,3 +1,3 @@
1
1
  module Oneview
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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) {{:contact => {:name => "name", :email => "email"}, :access_token => "abc"}}
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(:each) do
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, "http://www.oneview.com.br/api/contacts/").to_return(:status => 200)
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 "should post to the contacts url" do
33
- expect(Oneview::Api::Contacts).to receive(:post).with("/", :body => contact_params.to_json, :headers => header).and_call_original
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({:name => "name", :email => "email"})
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 "should post to the contacts url" do
41
- expect(Oneview::Api::Contacts).to receive(:post).with("/", :body => {:contact => @contact.as_parameter, :access_token => "abc"}.to_json, :headers => header).and_call_original
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 "should raise ArgumentError when passing neither a Hash nor a Contact" do
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) {{:contact => {:name => "name", :email => "email", :id => "23" }, :access_token => "abc"}}
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, "http://www.oneview.com.br/api/contacts/23").to_return(:status => 200)
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 "should 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
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",{:name => "name", :email => "email", :id => "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 "should 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
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 "should raise ArgumentError when passing neither a Hash nor a Contact" do
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) {{: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"}}
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, "http://www.oneview.com.br/api/senders/send_email/").to_return(:status => 200)
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 "should 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
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 "should 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
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 "should raise ArgumentError when passing neither a Hash nor an Email" do
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) {{:numbers => "55129985587", :message => "message", :schedule => "14/05/2014 15:30", :access_token => "abc"}}
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, "http://www.oneview.com.br/api/senders/send_sms/").to_return(:status => 200)
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 "should 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
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 "should 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
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 "should raise ArgumentError when passing neither a Hash nor an Sms" do
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
@@ -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 "should raise 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")
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 "should return the correct headers" do
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 "should append 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)
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 "should return an Oneview::Client::Response with the status" do
21
- stub_request(:post, "http://www.oneview.com.br/api/contacts/").to_return(:status => 200)
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({:name => "name"})
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) {{"name" => "name", "email" => "email@email.com", "birthday" => "14/10/2014", "city" => "city", "state" => "state",
6
- "zip_code" => "12233-444", "phone_attributes" => {"country_code" => "+55", "area_code" => "12", "number" => "998998789"},
7
- "dynamic_field" => "123"}}
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 "should return the contact as parameter" do
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 "should return the dynamic_field as parameter" do
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 "should return the email as parameter" do
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 "should return the phone as parameter" do
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 "should return the sms as parameter" do
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
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe Oneview do
4
- it "should return a new Oneview::Client" do
4
+ it "returns a new Oneview::Client" do
5
5
  expect(Oneview.new("abc").class).to eq(Oneview::Client)
6
6
  end
7
7
  end
data/spec/spec_helper.rb CHANGED
@@ -4,7 +4,7 @@ CodeClimate::TestReporter.start
4
4
  require 'oneview'
5
5
  require 'webmock/rspec'
6
6
 
7
- WebMock.disable_net_connect!(:allow => "codeclimate.com")
7
+ WebMock.disable_net_connect!(allow: "codeclimate.com")
8
8
 
9
9
  RSpec.configure do |config|
10
10
  config.mock_with :rspec
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.7
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: 2016-11-04 00:00:00.000000000 Z
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
- rubyforge_project:
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/)