easy_hubspot 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a389b7b8caa0c0734ed546248987c25dcb996ced3ce484851d02f982201abe6
4
- data.tar.gz: 260d7d05818b8b13352d017c41b90ab3e2e0cadcec20ef993c04c3bcfe2553a9
3
+ metadata.gz: 71b8b8b0adf023816a69c63eabce11490707324ca7f6dd7ad0a4c675079746c2
4
+ data.tar.gz: 415ce8982b292d1c76885629d6c8058fe95334197f233923efac196599c1f584
5
5
  SHA512:
6
- metadata.gz: fb95d7dce8a97124d49c9c7e158ac56356de6ba3eaea3fc107b396a94b68cc06d9e4ed98bb6d5316207ff13f33cd83692b3d96fe07e7dc33beccc3c405fb347f
7
- data.tar.gz: 467deef0357abba5b66fab33a33b87fc8acfc7d1b004bb34f4d24cffa0f2c11e1cafc28969b839f664a47f3eca0e61d41c089040a4c51ea07c68fc1d81efcfa8
6
+ metadata.gz: 39589dcd934069589f8c345df8d60a54b2c047d000318e7491c90e54d9f7abe1bd15109df5a01ca5616bd110f4ace578cea138dd09fd7d03a74cf8156dafe873
7
+ data.tar.gz: 4ec10d8960dc10c34cc44671804ebd8c2db6ced6559b3739d37ebaf4534db640b62c499cab339f113ab3bb55a0def2c17657bd30121fe8f714dec95623dbc3bd
data/.rubocop.yml ADDED
@@ -0,0 +1,31 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rake
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6.0
7
+
8
+ Style/HashSyntax:
9
+ Exclude:
10
+ - 'lib/easy_hubspot/client.rb'
11
+
12
+ Naming/AccessorMethodName:
13
+ Enabled: false
14
+ Include:
15
+ - 'lib/easy_hubspot/client.rb'
16
+
17
+ Layout/LineLength:
18
+ Max: 125
19
+
20
+ RSpec/BeforeAfterAll:
21
+ Enabled: false
22
+
23
+ RSpec/ContextWording:
24
+ Enabled: false
25
+
26
+ RSpec/MultipleExpectations:
27
+ Enabled: false
28
+
29
+ Style/StringLiterals:
30
+ Exclude:
31
+ - 'lib/easy_hubspot/base.rb'
data/easy_hubspot.gemspec CHANGED
@@ -16,9 +16,9 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
18
18
 
19
- # spec.metadata["homepage_uri"] = spec.homepage
20
- # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
21
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = spec.homepage
21
+ spec.metadata['changelog_uri'] = 'https://github.com/oroth8/easy-hubspot/blob/main/CHANGELOG.md'
22
22
 
23
23
  # Specify which files should be added to the gem when it is released.
24
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -12,10 +12,6 @@ module EasyHubspot
12
12
  def email?(string)
13
13
  URI::MailTo::EMAIL_REGEXP.match?(string)
14
14
  end
15
-
16
- def merge_path(path)
17
- EasyHubspot.configuration.base_url + path
18
- end
19
15
  end
20
16
  end
21
17
  end
@@ -7,40 +7,33 @@ module EasyHubspot
7
7
  CONTACT_ENDPOINT = 'crm/v3/objects/contacts'
8
8
 
9
9
  def get_contact(contact_id)
10
- path = merge_path(determine_endpoint(contact_id))
11
- Client.do_get(path, headers)
10
+ Client.do_get(determine_endpoint(contact_id), headers)
12
11
  end
13
12
 
14
13
  def get_contacts
15
- Client.do_get(contact_path, headers)
14
+ Client.do_get(CONTACT_ENDPOINT, headers)
16
15
  end
17
16
 
18
17
  def create_contact(body)
19
- Client.do_post(contact_path, body, headers)
18
+ Client.do_post(CONTACT_ENDPOINT, body, headers)
20
19
  end
21
20
 
22
21
  def update_contact(contact_id, body)
23
- path = merge_path(determine_endpoint(contact_id))
24
- Client.do_patch(path, body, headers)
22
+ Client.do_patch(determine_endpoint(contact_id), body, headers)
25
23
  end
26
24
 
27
25
  def delete_contact(contact_id)
28
- path = merge_path(determine_endpoint(contact_id))
29
- Client.do_delete(path, headers)
26
+ Client.do_delete(determine_endpoint(contact_id), headers)
30
27
  end
31
28
 
32
- def get_associated_contacts(contact_id, object_type, object_id, association_id)
33
- # TODO: Error handling arguments
34
- path = merge_path("#{CONTACT_ENDPOINT}/#{contact_id}/associations/#{object_type}/#{object_id}/#{association_id}")
35
- Client.do_get(path, headers)
36
- end
29
+ # def get_associated_contacts(contact_id, object_type, object_id, association_id)
30
+ # # TODO: Error handling arguments
31
+ # path = merge_path("#{CONTACT_ENDPOINT}/#{contact_id}/associations/#{object_type}/#{object_id}/#{association_id}")
32
+ # Client.do_get(path, headers)
33
+ # end
37
34
 
38
35
  private
39
36
 
40
- def contact_path
41
- merge_path(CONTACT_ENDPOINT)
42
- end
43
-
44
37
  def determine_endpoint(value)
45
38
  email_endpoint = "#{CONTACT_ENDPOINT}/#{value}?idProperty=email"
46
39
  id_endpoint = "#{CONTACT_ENDPOINT}/#{value}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyHubspot
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
data/lib/easy_hubspot.rb CHANGED
@@ -26,7 +26,7 @@ module EasyHubspot
26
26
 
27
27
  def initialize
28
28
  @access_token = ''
29
- @base_url = 'https://api.hubapi.com'
29
+ @base_url = 'https://api.hubapi.com/'
30
30
  end
31
31
  end
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_hubspot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Roth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -158,6 +158,7 @@ executables: []
158
158
  extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
+ - ".rubocop.yml"
161
162
  - CHANGELOG.md
162
163
  - Gemfile
163
164
  - LICENSE.txt
@@ -173,7 +174,10 @@ files:
173
174
  homepage: https://github.com/oroth8/easy-hubspot
174
175
  licenses:
175
176
  - MIT
176
- metadata: {}
177
+ metadata:
178
+ homepage_uri: https://github.com/oroth8/easy-hubspot
179
+ source_code_uri: https://github.com/oroth8/easy-hubspot
180
+ changelog_uri: https://github.com/oroth8/easy-hubspot/blob/main/CHANGELOG.md
177
181
  post_install_message:
178
182
  rdoc_options: []
179
183
  require_paths: