hubspot-ruby 0.1.7 → 0.1.8
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 +4 -4
- data/hubspot-ruby.gemspec +42 -5
- data/lib/hubspot-ruby.rb +3 -0
- data/lib/hubspot/blog.rb +14 -48
- data/lib/hubspot/connection.rb +95 -0
- data/lib/hubspot/contact.rb +74 -91
- data/lib/hubspot/contact_list.rb +127 -0
- data/lib/hubspot/contact_properties.rb +12 -0
- data/lib/hubspot/deal.rb +29 -25
- data/lib/hubspot/exceptions.rb +2 -0
- data/lib/hubspot/form.rb +88 -4
- data/lib/hubspot/topic.rb +8 -24
- data/lib/hubspot/utils.rb +0 -51
- data/lib/hubspot/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/add_contacts_to_lists.yml +281 -0
- data/spec/fixtures/vcr_cassettes/contact_create.yml +34 -2
- data/spec/fixtures/vcr_cassettes/contact_create_existing_email.yml +34 -2
- data/spec/fixtures/vcr_cassettes/contact_create_invalid_email.yml +35 -3
- data/spec/fixtures/vcr_cassettes/contact_create_with_params.yml +34 -2
- data/spec/fixtures/vcr_cassettes/contact_destroy.yml +36 -4
- data/spec/fixtures/vcr_cassettes/contact_find_by_email_batch_mode.yml +509 -0
- data/spec/fixtures/vcr_cassettes/contact_find_by_id_batch_mode.yml +33 -0
- data/spec/fixtures/vcr_cassettes/contact_find_by_utk_batch_mode.yml +33 -0
- data/spec/fixtures/vcr_cassettes/contact_list_batch_find.yml +65 -0
- data/spec/fixtures/vcr_cassettes/contact_list_destroy.yml +63 -0
- data/spec/fixtures/vcr_cassettes/contact_list_example.yml +33 -0
- data/spec/fixtures/vcr_cassettes/contact_list_find.yml +96 -0
- data/spec/fixtures/vcr_cassettes/contact_list_refresh.yml +33 -0
- data/spec/fixtures/vcr_cassettes/contact_list_update.yml +36 -0
- data/spec/fixtures/vcr_cassettes/contacts_among_list.yml +189 -0
- data/spec/fixtures/vcr_cassettes/create_form.yml +39 -0
- data/spec/fixtures/vcr_cassettes/create_list.yml +36 -0
- data/spec/fixtures/vcr_cassettes/create_list_with_filters.yml +36 -0
- data/spec/fixtures/vcr_cassettes/deal_create.yml +29 -0
- data/spec/fixtures/vcr_cassettes/deal_find.yml +56 -0
- data/spec/fixtures/vcr_cassettes/destroy_deal.yml +110 -0
- data/spec/fixtures/vcr_cassettes/fail_to_create_form.yml +35 -0
- data/spec/fixtures/vcr_cassettes/fail_to_create_list.yml +35 -0
- data/spec/fixtures/vcr_cassettes/field_among_form.yml +34 -0
- data/spec/fixtures/vcr_cassettes/fields_among_form.yml +35 -0
- data/spec/fixtures/vcr_cassettes/find_all_contacts.yml +39 -0
- data/spec/fixtures/vcr_cassettes/find_all_dynamic_lists.yml +104 -0
- data/spec/fixtures/vcr_cassettes/find_all_forms.yml +15378 -0
- data/spec/fixtures/vcr_cassettes/find_all_lists.yml +138 -0
- data/spec/fixtures/vcr_cassettes/find_all_recent_contacts.yml +33 -0
- data/spec/fixtures/vcr_cassettes/find_all_stastic_lists.yml +21876 -0
- data/spec/fixtures/vcr_cassettes/form_destroy.yml +64 -0
- data/spec/fixtures/vcr_cassettes/form_example.yml +39 -0
- data/spec/fixtures/vcr_cassettes/form_find.yml +69 -0
- data/spec/fixtures/vcr_cassettes/form_submit_data.yml +130 -0
- data/spec/fixtures/vcr_cassettes/form_update.yml +77 -0
- data/spec/fixtures/vcr_cassettes/one_month_blog_posts_filter_state.yml +5168 -0
- data/spec/fixtures/vcr_cassettes/remove_contacts_from_lists.yml +315 -0
- data/spec/lib/hubspot/blog_spec.rb +4 -3
- data/spec/lib/hubspot/connection_spec.rb +112 -0
- data/spec/lib/hubspot/contact_list_spec.rb +249 -0
- data/spec/lib/hubspot/contact_properties_spec.rb +8 -0
- data/spec/lib/hubspot/contact_spec.rb +110 -54
- data/spec/lib/hubspot/deal_spec.rb +11 -0
- data/spec/lib/hubspot/form_spec.rb +157 -10
- data/spec/lib/hubspot/utils_spec.rb +0 -67
- data/spec/live/deals_integration_spec.rb +35 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/tests_helper.rb +17 -0
- metadata +70 -33
@@ -71,6 +71,7 @@ describe Hubspot::Deal do
|
|
71
71
|
let(:deal) {Hubspot::Deal.create!(62515, [8954037], [27136], {amount: 30})}
|
72
72
|
|
73
73
|
it 'should remove from hubspot' do
|
74
|
+
pending
|
74
75
|
expect(Hubspot::Deal.find(deal.deal_id)).to_not be_nil
|
75
76
|
|
76
77
|
expect(deal.destroy!).to be_true
|
@@ -79,4 +80,14 @@ describe Hubspot::Deal do
|
|
79
80
|
expect(Hubspot::Deal.find(deal.deal_id)).to be_nil
|
80
81
|
end
|
81
82
|
end
|
83
|
+
|
84
|
+
describe '#[]' do
|
85
|
+
subject{ Hubspot::Deal.new(example_deal_hash) }
|
86
|
+
|
87
|
+
it 'should get a property' do
|
88
|
+
subject.properties.each do |property, value|
|
89
|
+
expect(subject[property]).to eql value
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
82
93
|
end
|
@@ -1,18 +1,165 @@
|
|
1
1
|
describe Hubspot::Form do
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
let(:example_form_hash) do
|
3
|
+
VCR.use_cassette("form_example", record: :none) do
|
4
|
+
HTTParty.get("https://api.hubapi.com/contacts/v1/forms/561d9ce9-bb4c-45b4-8e32-21cdeaa3a7f0/?hapikey=demo").parsed_response
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
describe '#initialize' do
|
9
|
+
subject { Hubspot::Form.new(example_form_hash) }
|
10
|
+
|
11
|
+
it { should be_an_instance_of Hubspot::Form }
|
12
|
+
its(:guid) { should be_a(String) }
|
13
|
+
its(:properties) { should be_a(Hash) }
|
14
|
+
end
|
15
|
+
|
16
|
+
before { Hubspot.configure(hapikey: "demo", portal_id: '62515') }
|
17
|
+
|
18
|
+
describe '.all' do
|
19
|
+
cassette 'find_all_forms'
|
20
|
+
|
21
|
+
it 'returns all forms' do
|
22
|
+
forms = Hubspot::Form.all
|
23
|
+
expect(forms.count).to be > 20
|
24
|
+
|
25
|
+
form = forms.first
|
26
|
+
expect(form).to be_a(Hubspot::Form)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '.find' do
|
31
|
+
cassette "form_find"
|
32
|
+
subject { Hubspot::Form.find(guid) }
|
33
|
+
|
34
|
+
context 'when the form is found' do
|
35
|
+
let(:guid) { '561d9ce9-bb4c-45b4-8e32-21cdeaa3a7f0' }
|
36
|
+
it { should be_an_instance_of Hubspot::Form }
|
37
|
+
its(:fields) { should_not be_empty }
|
38
|
+
end
|
39
|
+
|
40
|
+
context 'when the form is not found' do
|
41
|
+
it 'raises an error' do
|
42
|
+
expect { Hubspot::Form.find(-1) }.to raise_error(Hubspot::RequestError)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe '.create' do
|
48
|
+
subject{ Hubspot::Form.create!(params) }
|
49
|
+
|
50
|
+
context 'with all required parameters' do
|
51
|
+
cassette 'create_form'
|
52
|
+
|
53
|
+
let(:params) do
|
54
|
+
{
|
55
|
+
name: "Demo Form #{Time.now.to_i}",
|
56
|
+
action: "",
|
57
|
+
method: "POST",
|
58
|
+
cssClass: "hs-form stacked",
|
59
|
+
redirect: "",
|
60
|
+
submitText: "Sign Up",
|
61
|
+
followUpId: "",
|
62
|
+
leadNurturingCampaignId: "",
|
63
|
+
notifyRecipients: "",
|
64
|
+
embeddedCode: ""
|
65
|
+
}
|
66
|
+
end
|
67
|
+
it { should be_an_instance_of Hubspot::Form }
|
68
|
+
its(:guid) { should be_a(String) }
|
69
|
+
end
|
70
|
+
|
71
|
+
context 'without all required parameters' do
|
72
|
+
cassette 'fail_to_create_form'
|
73
|
+
|
74
|
+
it 'raises an error' do
|
75
|
+
expect { Hubspot::Form.create!({}) }.to raise_error(Hubspot::RequestError)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe '#fields' do
|
81
|
+
context 'returning all the fields' do
|
82
|
+
cassette 'fields_among_form'
|
5
83
|
|
6
|
-
|
7
|
-
|
8
|
-
|
84
|
+
let(:form) { Hubspot::Form.new(example_form_hash) }
|
85
|
+
|
86
|
+
it 'returns by default the fields property if present' do
|
87
|
+
fields = form.fields
|
88
|
+
fields.should_not be_empty
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'updates the fields property and returns it' do
|
92
|
+
fields = form.fields(bypass_cache: true)
|
93
|
+
fields.should_not be_empty
|
94
|
+
end
|
9
95
|
end
|
10
96
|
|
11
|
-
context
|
12
|
-
|
13
|
-
|
14
|
-
|
97
|
+
context 'returning an uniq field' do
|
98
|
+
cassette 'field_among_form'
|
99
|
+
|
100
|
+
let(:form) { Hubspot::Form.new(example_form_hash) }
|
101
|
+
|
102
|
+
it 'returns by default the field if present as a property' do
|
103
|
+
field = form.fields(only: :email)
|
104
|
+
expect(field).to be_a(Hash)
|
105
|
+
expect(field['name']).to be == 'email'
|
106
|
+
end
|
107
|
+
|
108
|
+
it 'makes an API request if specified' do
|
109
|
+
field = form.fields(only: :email, bypass_cache: true)
|
110
|
+
expect(field).to be_a(Hash)
|
111
|
+
expect(field['name']).to be == 'email'
|
15
112
|
end
|
16
113
|
end
|
17
114
|
end
|
115
|
+
|
116
|
+
describe '#submit' do
|
117
|
+
cassette 'form_submit_data'
|
118
|
+
|
119
|
+
let(:form) { Hubspot::Form.find('561d9ce9-bb4c-45b4-8e32-21cdeaa3a7f0') }
|
120
|
+
|
121
|
+
it 'returns true if the form submission is successfull' do
|
122
|
+
params = { }
|
123
|
+
result = form.submit(params)
|
124
|
+
result.should be true
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'returns false in case of errors' do
|
128
|
+
Hubspot.configure(hapikey: "demo", portal_id: '62514')
|
129
|
+
params = { }
|
130
|
+
result = form.submit(params)
|
131
|
+
result.should be false
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
describe '#update!' do
|
136
|
+
cassette "form_update"
|
137
|
+
|
138
|
+
new_name = "updated form name 1424709912"
|
139
|
+
redirect = 'http://hubspot.com'
|
140
|
+
|
141
|
+
let(:form) { Hubspot::Form.find('561d9ce9-bb4c-45b4-8e32-21cdeaa3a7f0') }
|
142
|
+
let(:params) { { name: new_name, redirect: redirect } }
|
143
|
+
subject { form.update!(params) }
|
144
|
+
|
145
|
+
it { should be_an_instance_of Hubspot::Form }
|
146
|
+
it 'updates properties' do
|
147
|
+
subject.properties['name'].should be == new_name
|
148
|
+
subject.properties['redirect'].should be == redirect
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
describe '#destroy!' do
|
153
|
+
cassette "form_destroy"
|
154
|
+
|
155
|
+
# NOTE: form previous created via the create! method
|
156
|
+
let(:form) { Hubspot::Form.find('8291bdd1-0681-4d99-b5f7-76ffffb4f98d') }
|
157
|
+
subject{ form.destroy! }
|
158
|
+
it { should be_true }
|
159
|
+
|
160
|
+
it "should be destroyed" do
|
161
|
+
subject
|
162
|
+
form.destroyed?.should be_true
|
163
|
+
end
|
164
|
+
end
|
18
165
|
end
|
@@ -28,71 +28,4 @@ describe Hubspot::Utils do
|
|
28
28
|
it{ should include({"property" => "firstname", "value" => "Bob"}) }
|
29
29
|
it{ should include({"property" => "lastname", "value" => "Smith"}) }
|
30
30
|
end
|
31
|
-
|
32
|
-
describe ".generate_url" do
|
33
|
-
let(:path){ "/test/:email/profile" }
|
34
|
-
let(:params){{email: "test"}}
|
35
|
-
let(:options){{}}
|
36
|
-
subject{ Hubspot::Utils.generate_url(path, params, options) }
|
37
|
-
before{ Hubspot.configure(hapikey: "demo", portal_id: "62515") }
|
38
|
-
|
39
|
-
it "doesn't modify params" do
|
40
|
-
expect{ subject }.to_not change{params}
|
41
|
-
end
|
42
|
-
|
43
|
-
context "with a portal_id param" do
|
44
|
-
let(:path){ "/test/:portal_id/profile" }
|
45
|
-
let(:params){{}}
|
46
|
-
it{ should == "https://api.hubapi.com/test/62515/profile?hapikey=demo" }
|
47
|
-
end
|
48
|
-
|
49
|
-
context "when configure hasn't been called" do
|
50
|
-
before{ Hubspot::Config.reset! }
|
51
|
-
it "raises a config exception" do
|
52
|
-
expect{ subject }.to raise_error Hubspot::ConfigurationError
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
context "with interpolations but no params" do
|
57
|
-
let(:params){{}}
|
58
|
-
it "raises an interpolation exception" do
|
59
|
-
expect{ subject }.to raise_error Hubspot::MissingInterpolation
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
context "with an interpolated param" do
|
64
|
-
let(:params){ {email: "email@address.com"} }
|
65
|
-
it{ should == "https://api.hubapi.com/test/email@address.com/profile?hapikey=demo" }
|
66
|
-
end
|
67
|
-
|
68
|
-
context "with multiple interpolated params" do
|
69
|
-
let(:path){ "/test/:email/:id/profile" }
|
70
|
-
let(:params){{email: "email@address.com", id: 1234}}
|
71
|
-
it{ should == "https://api.hubapi.com/test/email@address.com/1234/profile?hapikey=demo" }
|
72
|
-
end
|
73
|
-
|
74
|
-
context "with query params" do
|
75
|
-
let(:params){{email: "email@address.com", id: 1234}}
|
76
|
-
it{ should == "https://api.hubapi.com/test/email@address.com/profile?id=1234&hapikey=demo" }
|
77
|
-
|
78
|
-
context "containing a time" do
|
79
|
-
let(:start_time) { Time.now }
|
80
|
-
let(:params){{email: "email@address.com", id: 1234, start: start_time}}
|
81
|
-
it{ should == "https://api.hubapi.com/test/email@address.com/profile?id=1234&start=#{start_time.to_i * 1000}&hapikey=demo" }
|
82
|
-
end
|
83
|
-
|
84
|
-
context "containing a range" do
|
85
|
-
let(:start_time) { Time.now }
|
86
|
-
let(:end_time) { Time.now + 1.year }
|
87
|
-
let(:params){{email: "email@address.com", id: 1234, created__range: start_time..end_time }}
|
88
|
-
it{ should == "https://api.hubapi.com/test/email@address.com/profile?id=1234&created__range=#{start_time.to_i * 1000}&created__range=#{end_time.to_i * 1000}&hapikey=demo" }
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
context "with options" do
|
93
|
-
|
94
|
-
let(:options){ {base_url: "https://cool.com", hapikey: false} }
|
95
|
-
it{ should == "https://cool.com/test/test/profile"}
|
96
|
-
end
|
97
|
-
end
|
98
31
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
describe "Deals API Live test", live: true do
|
2
|
+
|
3
|
+
before do
|
4
|
+
Hubspot.configure hapikey: "demo"
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'should create, find, update and destroy' do
|
8
|
+
contact = Hubspot::Contact.find_by_email("create_delete_test@hsgemtest.com") rescue nil
|
9
|
+
contact ||= Hubspot::Contact.create!("create_delete_test@hsgemtest.com")
|
10
|
+
|
11
|
+
expect(contact).to be_present
|
12
|
+
|
13
|
+
deal = Hubspot::Deal.create!(62515, [], [contact.vid], { amount: 30, dealstage: 'closedwon' })
|
14
|
+
expect(deal).to be_present
|
15
|
+
|
16
|
+
expect(deal['dealstage']).to eql 'closedwon'
|
17
|
+
|
18
|
+
deal.update!({dealstage: 'closedlost'})
|
19
|
+
|
20
|
+
expect(deal['dealstage']).to eql 'closedlost'
|
21
|
+
expect(deal['amount']).to eql '30'
|
22
|
+
|
23
|
+
#to be sure it was updated
|
24
|
+
updated_deal = Hubspot::Deal.find(deal.deal_id)
|
25
|
+
|
26
|
+
expect(updated_deal['dealstage']).to eql 'closedlost'
|
27
|
+
expect(updated_deal['amount']).to eql '30'
|
28
|
+
|
29
|
+
expect(deal.destroy!).to be true
|
30
|
+
expect(contact.destroy!).to be true
|
31
|
+
|
32
|
+
# cant find anymore
|
33
|
+
expect { Hubspot::Deal.find(deal.deal_id) }.to raise_error
|
34
|
+
end
|
35
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,7 @@ require 'simplecov'
|
|
7
7
|
SimpleCov.root GEM_ROOT
|
8
8
|
SimpleCov.start do
|
9
9
|
add_filter "/spec/"
|
10
|
+
add_filter "/.bundle/"
|
10
11
|
end
|
11
12
|
|
12
13
|
require 'rspec'
|
@@ -39,4 +40,5 @@ RSpec.configure do |config|
|
|
39
40
|
end
|
40
41
|
|
41
42
|
config.extend CassetteHelper
|
43
|
+
config.extend TestsHelper
|
42
44
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module TestsHelper
|
2
|
+
def expect_count_and_offset(&block)
|
3
|
+
it 'returns only the number of objects specified by count' do
|
4
|
+
result = block.call(count: 2)
|
5
|
+
expect(result.size).to eql 2
|
6
|
+
|
7
|
+
result = block.call(count: 4)
|
8
|
+
expect(result.size).to eql 4
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns objects by a specified offset' do
|
12
|
+
non_offset_objects = block.call(count: 2)
|
13
|
+
objects_with_offset = block.call(count: 2, offset: 2)
|
14
|
+
expect(non_offset_objects).to_not eql objects_with_offset
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,195 +1,195 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubspot-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew DiMichele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: httparty
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.10.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.10.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rr
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - <
|
73
|
+
- - "<"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '1.10'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - <
|
80
|
+
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.10'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: vcr
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rdoc
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: bundler
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: jeweler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: simplecov
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: awesome_print
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: timecop
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: guard-rspec
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
description: hubspot-ruby is a wrapper for the HubSpot REST API
|
@@ -200,8 +200,8 @@ extra_rdoc_files:
|
|
200
200
|
- LICENSE.txt
|
201
201
|
- README.md
|
202
202
|
files:
|
203
|
-
- .document
|
204
|
-
- .rspec
|
203
|
+
- ".document"
|
204
|
+
- ".rspec"
|
205
205
|
- Gemfile
|
206
206
|
- Gemfile.lock
|
207
207
|
- Guardfile
|
@@ -213,13 +213,17 @@ files:
|
|
213
213
|
- lib/hubspot-ruby.rb
|
214
214
|
- lib/hubspot/blog.rb
|
215
215
|
- lib/hubspot/config.rb
|
216
|
+
- lib/hubspot/connection.rb
|
216
217
|
- lib/hubspot/contact.rb
|
218
|
+
- lib/hubspot/contact_list.rb
|
219
|
+
- lib/hubspot/contact_properties.rb
|
217
220
|
- lib/hubspot/deal.rb
|
218
221
|
- lib/hubspot/exceptions.rb
|
219
222
|
- lib/hubspot/form.rb
|
220
223
|
- lib/hubspot/topic.rb
|
221
224
|
- lib/hubspot/utils.rb
|
222
225
|
- lib/hubspot/version.rb
|
226
|
+
- spec/fixtures/vcr_cassettes/add_contacts_to_lists.yml
|
223
227
|
- spec/fixtures/vcr_cassettes/blog_list.yml
|
224
228
|
- spec/fixtures/vcr_cassettes/blog_posts.yml
|
225
229
|
- spec/fixtures/vcr_cassettes/blog_posts_list.yml
|
@@ -230,31 +234,64 @@ files:
|
|
230
234
|
- spec/fixtures/vcr_cassettes/contact_destroy.yml
|
231
235
|
- spec/fixtures/vcr_cassettes/contact_example.yml
|
232
236
|
- spec/fixtures/vcr_cassettes/contact_find_by_email.yml
|
237
|
+
- spec/fixtures/vcr_cassettes/contact_find_by_email_batch_mode.yml
|
233
238
|
- spec/fixtures/vcr_cassettes/contact_find_by_id.yml
|
239
|
+
- spec/fixtures/vcr_cassettes/contact_find_by_id_batch_mode.yml
|
234
240
|
- spec/fixtures/vcr_cassettes/contact_find_by_utk.yml
|
241
|
+
- spec/fixtures/vcr_cassettes/contact_find_by_utk_batch_mode.yml
|
242
|
+
- spec/fixtures/vcr_cassettes/contact_list_batch_find.yml
|
243
|
+
- spec/fixtures/vcr_cassettes/contact_list_destroy.yml
|
244
|
+
- spec/fixtures/vcr_cassettes/contact_list_example.yml
|
245
|
+
- spec/fixtures/vcr_cassettes/contact_list_find.yml
|
246
|
+
- spec/fixtures/vcr_cassettes/contact_list_refresh.yml
|
247
|
+
- spec/fixtures/vcr_cassettes/contact_list_update.yml
|
235
248
|
- spec/fixtures/vcr_cassettes/contact_update.yml
|
249
|
+
- spec/fixtures/vcr_cassettes/contacts_among_list.yml
|
250
|
+
- spec/fixtures/vcr_cassettes/create_form.yml
|
251
|
+
- spec/fixtures/vcr_cassettes/create_list.yml
|
252
|
+
- spec/fixtures/vcr_cassettes/create_list_with_filters.yml
|
236
253
|
- spec/fixtures/vcr_cassettes/deal_create.yml
|
237
254
|
- spec/fixtures/vcr_cassettes/deal_example.yml
|
238
255
|
- spec/fixtures/vcr_cassettes/deal_find.yml
|
239
256
|
- spec/fixtures/vcr_cassettes/destroy_deal.yml
|
257
|
+
- spec/fixtures/vcr_cassettes/fail_to_create_form.yml
|
258
|
+
- spec/fixtures/vcr_cassettes/fail_to_create_list.yml
|
259
|
+
- spec/fixtures/vcr_cassettes/field_among_form.yml
|
260
|
+
- spec/fixtures/vcr_cassettes/fields_among_form.yml
|
240
261
|
- spec/fixtures/vcr_cassettes/find_all_contacts.yml
|
262
|
+
- spec/fixtures/vcr_cassettes/find_all_dynamic_lists.yml
|
263
|
+
- spec/fixtures/vcr_cassettes/find_all_forms.yml
|
264
|
+
- spec/fixtures/vcr_cassettes/find_all_lists.yml
|
265
|
+
- spec/fixtures/vcr_cassettes/find_all_recent_contacts.yml
|
241
266
|
- spec/fixtures/vcr_cassettes/find_all_recent_updated_deals.yml
|
267
|
+
- spec/fixtures/vcr_cassettes/find_all_stastic_lists.yml
|
268
|
+
- spec/fixtures/vcr_cassettes/form_destroy.yml
|
269
|
+
- spec/fixtures/vcr_cassettes/form_example.yml
|
270
|
+
- spec/fixtures/vcr_cassettes/form_find.yml
|
242
271
|
- spec/fixtures/vcr_cassettes/form_post.yml
|
272
|
+
- spec/fixtures/vcr_cassettes/form_submit_data.yml
|
273
|
+
- spec/fixtures/vcr_cassettes/form_update.yml
|
243
274
|
- spec/fixtures/vcr_cassettes/one_month_blog_posts_filter_state.yml
|
244
275
|
- spec/fixtures/vcr_cassettes/one_month_blog_posts_list.yml
|
276
|
+
- spec/fixtures/vcr_cassettes/remove_contacts_from_lists.yml
|
245
277
|
- spec/fixtures/vcr_cassettes/topic_list.yml
|
246
278
|
- spec/fixtures/vcr_cassettes/topics_list.yml
|
247
279
|
- spec/lib/hubspot-ruby_spec.rb
|
248
280
|
- spec/lib/hubspot/blog_spec.rb
|
249
281
|
- spec/lib/hubspot/config_spec.rb
|
282
|
+
- spec/lib/hubspot/connection_spec.rb
|
283
|
+
- spec/lib/hubspot/contact_list_spec.rb
|
284
|
+
- spec/lib/hubspot/contact_properties_spec.rb
|
250
285
|
- spec/lib/hubspot/contact_spec.rb
|
251
286
|
- spec/lib/hubspot/deal_spec.rb
|
252
287
|
- spec/lib/hubspot/form_spec.rb
|
253
288
|
- spec/lib/hubspot/topic_spec.rb
|
254
289
|
- spec/lib/hubspot/utils_spec.rb
|
255
290
|
- spec/live/contacts_integration_spec.rb
|
291
|
+
- spec/live/deals_integration_spec.rb
|
256
292
|
- spec/spec_helper.rb
|
257
293
|
- spec/support/cassette_helper.rb
|
294
|
+
- spec/support/tests_helper.rb
|
258
295
|
homepage: http://github.com/omadahealth/hubspot-ruby
|
259
296
|
licenses: []
|
260
297
|
metadata: {}
|
@@ -264,17 +301,17 @@ require_paths:
|
|
264
301
|
- lib
|
265
302
|
required_ruby_version: !ruby/object:Gem::Requirement
|
266
303
|
requirements:
|
267
|
-
- -
|
304
|
+
- - ">="
|
268
305
|
- !ruby/object:Gem::Version
|
269
306
|
version: '0'
|
270
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
308
|
requirements:
|
272
|
-
- -
|
309
|
+
- - ">="
|
273
310
|
- !ruby/object:Gem::Version
|
274
311
|
version: '0'
|
275
312
|
requirements: []
|
276
313
|
rubyforge_project:
|
277
|
-
rubygems_version: 2.
|
314
|
+
rubygems_version: 2.2.2
|
278
315
|
signing_key:
|
279
316
|
specification_version: 4
|
280
317
|
summary: hubspot-ruby is a wrapper for the HubSpot REST API
|