easy_hubspot 0.1.1 → 0.1.3

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
2
  SHA256:
3
- metadata.gz: 8fd7179bffcf2ea73c1de127ae1033cfbeef160d9224ce8381a6767bae2cac42
4
- data.tar.gz: dc13337d5dff75615f027b46672055ecc387b5628df2a394f01fb4736eff692f
3
+ metadata.gz: 2516cce1efa500bfa9ba3e4bcbeaa867f3c7a247bb4d1124169f50fc11f7176a
4
+ data.tar.gz: eb893c31abc5cfd6b6e839e596628c031f9210af449efc5cb7b997c811ac00f2
5
5
  SHA512:
6
- metadata.gz: 957e481127873f3187712961df8e8c69670d18da51b1d8eeed5fc34d526054ec2971110765fde2bafe720adeaa3eafaf9b115da79a4464de6bd07a6b4e9b9a3c
7
- data.tar.gz: b25c67d185397aa13e72c6ae653d0e093fc5cd500f3f017d8d5ac781e03ec9fd0faad4c76cefc6d18cbd4d2a804db5f5412eced3827bb9f5b7fb2a11e3ac70bf
6
+ metadata.gz: 37ef0372ad8d0866297dfe1d598eb543c6ea323692d8a418c3235ed206c8d1c4776506f73ee6bb09707da9ef19416e38e5d28d96b66a95cafed778f66f4efaad
7
+ data.tar.gz: acea1e334af4f0fbbaf5ce466e86062f562ee94b59855addb91063e93b1553fc74cadf0ebedcec229b4137240ea919f5092214326cdde263d44b9f00c0660a22
data/Gemfile CHANGED
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in easy_hubspot.gemspec
6
6
  gemspec
7
7
 
8
8
  group :development, :test do
9
- gem "bundler", "~> 2.2"
10
- gem "rake", "~> 13.0"
11
- gem "rspec", "~> 3.0"
12
- gem "rubocop", "~> 1.21"
9
+ gem 'bundler', '~> 2.2'
13
10
  gem 'pry', '~> 0.13.1'
14
- end
11
+ gem 'rake', '~> 13.0'
12
+ gem 'rspec', '~> 3.0'
13
+ gem 'rubocop', '~> 1.21'
14
+ end
data/Rakefile CHANGED
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- require "rubocop/rake_task"
8
+ require 'rubocop/rake_task'
9
9
 
10
10
  RuboCop::RakeTask.new
11
11
 
data/easy_hubspot.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = 'An easier way to integrate with the Hubspot API'
12
12
  spec.description = 'This gem is designed to make it easier to integrate with the Hubspot API'
13
- spec.homepage = "https://github.com/oroth8/easy-hubspot"
13
+ spec.homepage = 'https://github.com/oroth8/easy-hubspot'
14
14
  spec.license = 'MIT'
15
15
  spec.required_ruby_version = '>= 2.6.0'
16
16
 
@@ -31,19 +31,17 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
- # runtime dependencies
35
- spec.add_runtime_dependency 'json', '~> 2.6.3'
36
- spec.add_runtime_dependency 'uri', '~> 0.12.0'
37
-
38
34
  # dependencies
39
35
  spec.add_dependency 'httparty', '~> 0.21.0'
40
36
 
41
37
  # development dependencies
42
38
  spec.add_development_dependency 'bundler', '~> 2.0'
39
+ spec.add_development_dependency 'capybara', '~> 2.7'
43
40
  spec.add_development_dependency 'pry', '~> 0.13.1'
44
41
  spec.add_development_dependency 'rake', '~> 13.0'
45
42
  spec.add_development_dependency 'rspec', '~> 3.4.0'
46
43
  spec.add_development_dependency 'rubocop', '~> 1.2'
44
+ spec.add_development_dependency 'rubocop-rake', '~> 0.6.0'
45
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.18.1'
47
46
  spec.add_development_dependency 'webmock', '~> 3.14'
48
- spec.add_development_dependency 'capybara', '~> 2.7'
49
47
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyHubspot
2
4
  # class EasyHubspot::Base
3
5
  class Base
@@ -1,43 +1,46 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyHubspot
4
+ # EasyHubspot::Client
2
5
  class Client
3
6
  class << self
4
7
  def do_get(path = nil, headers = {}, format_plain: true)
5
8
  if format_plain
6
- response = HTTParty.get("#{EasyHubspot.configuration.base_url}#{path}", headers:,
9
+ response = HTTParty.get("#{EasyHubspot.configuration.base_url}#{path}", headers: headers,
7
10
  format: :plain)
8
11
  parse_response(response)
9
12
  else
10
- HTTParty.get("#{EasyHubspot.configuration.base_url}#{path}", headers:)
13
+ HTTParty.get("#{EasyHubspot.configuration.base_url}#{path}", headers: headers)
11
14
  end
12
15
  end
13
16
 
14
17
  def do_post(path = nil, body = {}, headers = {}, format_plain: true)
15
18
  if format_plain
16
- response = HTTParty.post("#{EasyHubspot.configuration.base_url}#{path}", body:, headers:,
19
+ response = HTTParty.post("#{EasyHubspot.configuration.base_url}#{path}", body: body, headers: headers,
17
20
  format: :plain)
18
21
  parse_response(response)
19
22
  else
20
- HTTParty.post("#{EasyHubspot.configuration.base_url}#{path}", body:, headers:)
23
+ HTTParty.post("#{EasyHubspot.configuration.base_url}#{path}", body: body, headers: headers)
21
24
  end
22
25
  end
23
26
 
24
27
  def do_patch(path = nil, body = {}, headers = {}, format_plain: true)
25
28
  if format_plain
26
- response = HTTParty.patch("#{EasyHubspot.configuration.base_url}#{path}", body:, headers:,
29
+ response = HTTParty.patch("#{EasyHubspot.configuration.base_url}#{path}", body: body, headers: headers,
27
30
  format: :plain)
28
31
  parse_response(response)
29
32
  else
30
- HTTParty.patch("#{EasyHubspot.configuration.base_url}#{path}", body:, headers:)
33
+ HTTParty.patch("#{EasyHubspot.configuration.base_url}#{path}", body: body, headers: headers)
31
34
  end
32
35
  end
33
36
 
34
37
  def do_delete(path = nil, headers = {}, format_plain: true)
35
38
  if format_plain
36
- response = HTTParty.delete("#{EasyHubspot.configuration.base_url}#{path}", headers:,
39
+ response = HTTParty.delete("#{EasyHubspot.configuration.base_url}#{path}", headers: headers,
37
40
  format: :plain)
38
41
  parse_response(response)
39
42
  else
40
- HTTParty.delete("#{EasyHubspot.configuration.base_url}#{path}", headers:)
43
+ HTTParty.delete("#{EasyHubspot.configuration.base_url}#{path}", headers: headers)
41
44
  end
42
45
  end
43
46
 
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyHubspot
2
4
  # class EasyHubspot::Contact
3
5
  class Contact < EasyHubspot::Base
4
6
  class << self
5
- CONTACT_ENDPOINT = 'crm/v3/objects/contacts'.freeze
7
+ CONTACT_ENDPOINT = 'crm/v3/objects/contacts'
6
8
 
7
9
  def get_contact(contact_id)
8
10
  path = merge_path(determine_endpoint(contact_id))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyHubspot
4
- VERSION = "0.1.1"
4
+ VERSION = '0.1.3'
5
5
  end
data/lib/easy_hubspot.rb CHANGED
@@ -9,6 +9,7 @@ require 'httparty'
9
9
  require 'json'
10
10
  require 'uri'
11
11
 
12
+ # EasyHubspot
12
13
  module EasyHubspot
13
14
  class << self
14
15
  attr_accessor :configuration
@@ -19,6 +20,7 @@ module EasyHubspot
19
20
  yield(configuration)
20
21
  end
21
22
 
23
+ # EasyHubspot::Configuration
22
24
  class Configuration
23
25
  attr_accessor :access_token, :base_url
24
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_hubspot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Roth
@@ -11,61 +11,47 @@ cert_chain: []
11
11
  date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: json
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 2.6.3
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 2.6.3
27
- - !ruby/object:Gem::Dependency
28
- name: uri
14
+ name: httparty
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 0.12.0
19
+ version: 0.21.0
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 0.12.0
26
+ version: 0.21.0
41
27
  - !ruby/object:Gem::Dependency
42
- name: httparty
28
+ name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 0.21.0
48
- type: :runtime
33
+ version: '2.0'
34
+ type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 0.21.0
40
+ version: '2.0'
55
41
  - !ruby/object:Gem::Dependency
56
- name: bundler
42
+ name: capybara
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '2.0'
47
+ version: '2.7'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '2.0'
54
+ version: '2.7'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: pry
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -123,33 +109,47 @@ dependencies:
123
109
  - !ruby/object:Gem::Version
124
110
  version: '1.2'
125
111
  - !ruby/object:Gem::Dependency
126
- name: webmock
112
+ name: rubocop-rake
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: '3.14'
117
+ version: 0.6.0
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: '3.14'
124
+ version: 0.6.0
139
125
  - !ruby/object:Gem::Dependency
140
- name: capybara
126
+ name: rubocop-rspec
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: '2.7'
131
+ version: 2.18.1
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: '2.7'
138
+ version: 2.18.1
139
+ - !ruby/object:Gem::Dependency
140
+ name: webmock
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.14'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.14'
153
153
  description: This gem is designed to make it easier to integrate with the Hubspot
154
154
  API
155
155
  email: