hubspot-ruby 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hubspot-ruby.gemspec +2 -1
- data/lib/hubspot/owner.rb +7 -0
- data/spec/lib/hubspot/connection_spec.rb +3 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0aea65fece03765b9fee8f2e307c295ee11b6a6764f9501559d80e69bbf28f0
|
4
|
+
data.tar.gz: 0e528ca98fdb034a285f79998d333fff62691652bf5e3b2ecdd673e69912e252
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e51b6aa117c18e86a3f5a8cf62f1e77f9ed52f93d37457fc4a7558130788334b5be876185cdbee4d50372992a55b5b77e8c43b2a07af0c448098321a6de414dc
|
7
|
+
data.tar.gz: d7e3ac2cf81f012b5f10e517d9ad90eeccacf40e2fd24e05aec7ae69cc09f3ce67fe67f9188e41d7eeb049c3d249c1078a522cb5d659cc85b64682509141d662
|
data/hubspot-ruby.gemspec
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "hubspot-ruby"
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.8.0"
|
4
4
|
s.require_paths = ["lib"]
|
5
5
|
s.authors = ["Andrew DiMichele", "Chris Bisnett"]
|
6
6
|
s.description = "hubspot-ruby is a wrapper for the HubSpot REST API"
|
7
|
+
s.licenses = ["MIT"]
|
7
8
|
s.files = [".rspec", "Gemfile", "Guardfile", "LICENSE.txt", "README.md", "RELEASING.md", "Rakefile", "hubspot-ruby.gemspec"]
|
8
9
|
s.files += Dir["lib/**/*.rb"]
|
9
10
|
s.files += Dir["lib/**/*.rake"]
|
data/lib/hubspot/owner.rb
CHANGED
@@ -8,6 +8,7 @@ module Hubspot
|
|
8
8
|
# TODO: Update an Owner
|
9
9
|
# TODO: Delete an Owner
|
10
10
|
class Owner
|
11
|
+
GET_OWNER_PATH = '/owners/v2/owners/:owner_id' # GET
|
11
12
|
GET_OWNERS_PATH = '/owners/v2/owners' # GET
|
12
13
|
CREATE_OWNER_PATH = '/owners/v2/owners' # POST
|
13
14
|
UPDATE_OWNER_PATH = '/owners/v2/owners/:owner_id' # PUT
|
@@ -34,6 +35,12 @@ module Hubspot
|
|
34
35
|
response.map { |r| new(r) }
|
35
36
|
end
|
36
37
|
|
38
|
+
def find(id, include_inactive=false)
|
39
|
+
response = Hubspot::Connection.get_json(path, owner_id: id,
|
40
|
+
include_inactive: include_inactive)
|
41
|
+
new(response)
|
42
|
+
end
|
43
|
+
|
37
44
|
def find_by_email(email, include_inactive=false)
|
38
45
|
path = GET_OWNERS_PATH
|
39
46
|
params = { email: email, includeInactive: include_inactive }
|
@@ -12,7 +12,7 @@ describe Hubspot::Connection do
|
|
12
12
|
@http_response.body { 'mocked response' }
|
13
13
|
|
14
14
|
mock(Hubspot::Connection).generate_url(@url, {}) { @url }
|
15
|
-
mock(Hubspot::Connection).get(@url, format: :json) { @http_response }
|
15
|
+
mock(Hubspot::Connection).get(@url, format: :json, read_timeout: nil, open_timeout: nil) { @http_response }
|
16
16
|
Hubspot::Connection.get_json(@url, {})
|
17
17
|
end
|
18
18
|
end
|
@@ -25,7 +25,7 @@ describe Hubspot::Connection do
|
|
25
25
|
@http_response.body { 'mocked response' }
|
26
26
|
|
27
27
|
mock(Hubspot::Connection).generate_url(@url, {}) { @url }
|
28
|
-
mock(Hubspot::Connection).post(@url, body: "{}", headers: {"Content-Type"=>"application/json"}, format: :json) { @http_response }
|
28
|
+
mock(Hubspot::Connection).post(@url, body: "{}", headers: {"Content-Type"=>"application/json"}, format: :json, read_timeout: nil, open_timeout: nil) { @http_response }
|
29
29
|
Hubspot::Connection.post_json(@url, params: {}, body: {})
|
30
30
|
end
|
31
31
|
end
|
@@ -37,7 +37,7 @@ describe Hubspot::Connection do
|
|
37
37
|
@http_response.body { 'mocked response' }
|
38
38
|
|
39
39
|
mock(Hubspot::Connection).generate_url(@url, {}) { @url }
|
40
|
-
mock(Hubspot::Connection).delete(@url, format: :json) { @http_response }
|
40
|
+
mock(Hubspot::Connection).delete(@url, format: :json, read_timeout: nil, open_timeout: nil) { @http_response }
|
41
41
|
Hubspot::Connection.delete_json(@url, {})
|
42
42
|
end
|
43
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubspot-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew DiMichele
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -259,7 +259,8 @@ files:
|
|
259
259
|
- spec/support/tests_helper.rb
|
260
260
|
- spec/support/vcr.rb
|
261
261
|
homepage: http://github.com/adimichele/hubspot-ruby
|
262
|
-
licenses:
|
262
|
+
licenses:
|
263
|
+
- MIT
|
263
264
|
metadata:
|
264
265
|
changelog_uri: https://github.com/adimichele/hubspot-ruby/blob/master/History.md
|
265
266
|
post_install_message:
|