pipeline_deals 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -1
  3. data/LICENSE.txt +2 -2
  4. data/Rakefile +6 -0
  5. data/lib/pipeline_deals.rb +11 -2
  6. data/lib/pipeline_deals/resource.rb +11 -5
  7. data/lib/pipeline_deals/resources/calendar_entry.rb +7 -0
  8. data/lib/pipeline_deals/resources/company.rb +2 -0
  9. data/lib/pipeline_deals/resources/company_custom_field_label.rb +1 -0
  10. data/lib/pipeline_deals/resources/deal.rb +4 -2
  11. data/lib/pipeline_deals/resources/deal_custom_field_label.rb +1 -0
  12. data/lib/pipeline_deals/resources/definitions.rb +12 -10
  13. data/lib/pipeline_deals/resources/event_category.rb +0 -1
  14. data/lib/pipeline_deals/resources/lead_source.rb +0 -1
  15. data/lib/pipeline_deals/resources/note.rb +9 -0
  16. data/lib/pipeline_deals/resources/note_category.rb +0 -1
  17. data/lib/pipeline_deals/resources/person.rb +8 -1
  18. data/lib/pipeline_deals/resources/person_custom_field_label.rb +1 -0
  19. data/lib/pipeline_deals/resources/predefined_contacts_tags.rb +0 -1
  20. data/lib/pipeline_deals/resources/user.rb +1 -0
  21. data/lib/pipeline_deals/version.rb +1 -1
  22. data/pipeline_deals.gemspec +6 -1
  23. data/spec/cassettes/PipelineDeals_Deal_calendar_entries.yml +49 -0
  24. data/spec/cassettes/PipelineDeals_Deal_notes.yml +62 -0
  25. data/spec/cassettes/PipelineDeals_Person_calendar_entries.yml +49 -0
  26. data/spec/cassettes/PipelineDeals_Person_documents.yml +47 -0
  27. data/spec/cassettes/PipelineDeals_Person_items.yml +156 -0
  28. data/spec/cassettes/PipelineDeals_Person_next_page.yml +57 -0
  29. data/spec/cassettes/PipelineDeals_Person_notes.yml +53 -0
  30. data/spec/cassettes/PipelineDeals_Person_per_page.yml +76 -0
  31. data/spec/cassettes/PipelineDeals_Person_six_things.yml +72 -0
  32. data/spec/cassettes/deal_create.yml +48 -0
  33. data/spec/cassettes/deals_filtered_by_custom_field.yml +95 -0
  34. data/spec/cassettes/get_a_person.yml +49 -0
  35. data/spec/cassettes/people_filtered_by_status.yml +64 -0
  36. data/spec/cassettes/person_with_company.yml +49 -0
  37. data/spec/cassettes/person_with_deals.yml +49 -0
  38. data/spec/pipeline_deals/admin_spec.rb +3 -4
  39. data/spec/pipeline_deals/companies_spec.rb +4 -62
  40. data/spec/pipeline_deals/deals_spec.rb +67 -51
  41. data/spec/pipeline_deals/people_spec.rb +45 -0
  42. data/spec/spec_helper.rb +13 -5
  43. data/spec/support/has_calendar_entries.rb +8 -0
  44. data/spec/support/has_deals.rb +8 -0
  45. data/spec/support/has_documents.rb +8 -0
  46. data/spec/support/has_notes.rb +8 -0
  47. data/spec/support/has_people.rb +8 -0
  48. data/spec/{pipeline_deals → support}/pagination_spec.rb +10 -12
  49. metadata +98 -22
  50. data/a_spike.rb +0 -72
  51. data/spec/pipeline_deals/has_documents.rb +0 -9
  52. data/spec/pipeline_deals/has_people.rb +0 -10
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: aa645959e30f4060918bda3bb8c99a3320b02f74
4
+ data.tar.gz: 3c60d12af49949beb76d55256d02f4cb70d6a31d
5
+ SHA512:
6
+ metadata.gz: cb06fe1c651924150260948a232b0732e768e2f8c5cb1917900d12728060caef6b9abac23387210a12e5029bb136a8bfa762056355ef4a37e148d398cda83728
7
+ data.tar.gz: 38f8bbc3365c919fc7b8ecd98c1bf2e4534e950f9ca3a8eeb9550ce15708dc40c3fcb4770b45218b282e197d60a98004a4812346fa7ae5f6640db34cb6161bed
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # A sample Gemfile
2
2
  source "https://rubygems.org"
3
3
 
4
- gem 'activeresource', '4.0.0.beta1'
4
+ gem 'activeresource', '~> 4.0.0'
5
5
  #gem 'activeresource', :path => "activeresource-4.0.0.beta1"
6
6
 
7
7
  group :test do
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Grant Ammons
1
+ Copyright (c) 2014 PipelineDeals
2
2
 
3
3
  MIT License
4
4
 
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new('spec')
5
+
6
+ # If you want to make this the default task
7
+ task :default => :spec
@@ -2,6 +2,7 @@ require 'rubygems'
2
2
  require 'active_resource'
3
3
  require_relative 'pipeline_deals/resources'
4
4
  require_relative 'pipeline_deals/version'
5
+ require_relative 'pipeline_deals/resources/definitions'
5
6
 
6
7
  Dir[File.dirname(__FILE__) + '/resources/*.rb'].each {|file| p "requring #{file}"; require file }
7
8
 
@@ -10,7 +11,15 @@ module PipelineDeals
10
11
  @api_key
11
12
  end
12
13
 
13
- def self.api_key=(key)
14
- @api_key = key
14
+ def self.api_key=(api_key)
15
+ @api_key = api_key
16
+ end
17
+
18
+ def self.app_key
19
+ @app_key
20
+ end
21
+
22
+ def self.app_key=(app_key)
23
+ @app_key = app_key
15
24
  end
16
25
  end
@@ -9,19 +9,25 @@ module PipelineDeals
9
9
  scope = arguments.slice!(0)
10
10
  options = arguments.slice!(0) || {}
11
11
 
12
- if options[:params]
13
- options[:params].merge!({api_key: PipelineDeals.api_key})
14
- else
15
- options.merge!({params: {api_key: PipelineDeals.api_key}})
16
- end
12
+ self.add_params(options, app_key: PipelineDeals.app_key) if PipelineDeals.app_key
13
+ self.add_params(options, api_key: PipelineDeals.api_key)
17
14
 
18
15
  super(scope, options)
19
16
  end
20
17
 
21
18
  def save
19
+ prefix_options[:app_key] = PipelineDeals.app_key if PipelineDeals.app_key
22
20
  prefix_options[:api_key] = PipelineDeals.api_key
23
21
  self.include_root_in_json = true
24
22
  super
25
23
  end
24
+
25
+ def self.add_params(options, params)
26
+ if options[:params]
27
+ options[:params].merge!(params)
28
+ else
29
+ options.merge!({params: params})
30
+ end
31
+ end
26
32
  end
27
33
  end
@@ -0,0 +1,7 @@
1
+ module PipelineDeals
2
+ class CalendarEntry < PipelineDeals::Resource
3
+ belongs_to :category, class_name: PipelineDeals::EventCategory, foreign_key: :category_id
4
+ belongs_to :owner, class_name: PipelineDeals::User, foreign_key: :owner_id
5
+ belongs_to :company, class_name: PipelineDeals::Company
6
+ end
7
+ end
@@ -3,6 +3,8 @@ module PipelineDeals
3
3
  has_many :deals, class_name: PipelineDeals::Deal
4
4
  has_many :people, class_name: PipelineDeals::Person
5
5
  has_many :documents, class_name: PipelineDeals::Document
6
+ has_many :notes, class_name: PipelineDeals::Note
7
+ has_many :calendar_entries, class_name: PipelineDeals::CalendarEntry
6
8
  end
7
9
  end
8
10
 
@@ -1,4 +1,5 @@
1
1
  module PipelineDeals
2
2
  class CompanyCustomFieldLabel < PipelineDeals::AdminResource
3
+ has_many :custom_field_label_dropdown_entries, class_name: PipelineDeals::CustomFieldLabelDropdownEntry
3
4
  end
4
5
  end
@@ -2,8 +2,10 @@ module PipelineDeals
2
2
  class Deal < PipelineDeals::Resource
3
3
  has_many :people, class_name: PipelineDeals::Person
4
4
  has_many :documents, class_name: PipelineDeals::Document
5
- has_one :primary_contact, class_name: PipelineDeals::Person
6
- has_one :company, class_name: PipelineDeals::Company
5
+ has_many :notes, class_name: PipelineDeals::Note
6
+ has_many :calendar_entries, class_name: PipelineDeals::CalendarEntry
7
+ belongs_to :primary_contact, class_name: PipelineDeals::Person
8
+ belongs_to :company, class_name: PipelineDeals::Company
7
9
  belongs_to :user, class_name: PipelineDeals::User
8
10
  belongs_to :deal_stage, class_name: PipelineDeals::DealStage
9
11
  belongs_to :source, class_name: PipelineDeals::LeadSource, foreign_key: :source_id
@@ -1,4 +1,5 @@
1
1
  module PipelineDeals
2
2
  class DealCustomFieldLabel < PipelineDeals::AdminResource
3
+ has_many :custom_field_label_dropdown_entries, class_name: PipelineDeals::CustomFieldLabelDropdownEntry
3
4
  end
4
5
  end
@@ -1,13 +1,4 @@
1
1
  module PipelineDeals
2
- class Deal < PipelineDeals::Resource; end
3
- class Person < PipelineDeals::Resource; end
4
- class Company < PipelineDeals::Resource; end
5
- class Activity < PipelineDeals::Resource; end
6
- class CalendarTask < PipelineDeals::Resource; end
7
- class CalendarEvent < PipelineDeals::Resource; end
8
- class Document < PipelineDeals::Resource; end
9
- class User < PipelineDeals::Resource; end
10
-
11
2
  class DealStage < PipelineDeals::AdminResource; end
12
3
  class NoteCategory < PipelineDeals::AdminResource; end
13
4
  class DealCustomFieldLabel < PipelineDeals::AdminResource; end
@@ -16,6 +7,17 @@ module PipelineDeals
16
7
  class CustomFieldLabelDropdownEntry < PipelineDeals::AdminResource; end
17
8
  class LeadStatus < PipelineDeals::AdminResource; end
18
9
  class LeadSource < PipelineDeals::AdminResource; end
19
- class PredefinedContactTag < PipelineDeals::AdminResource; end
10
+ class PredefinedContactsTag < PipelineDeals::AdminResource; end
20
11
  class EventCategory < PipelineDeals::AdminResource; end
12
+
13
+ class Deal < PipelineDeals::Resource; end
14
+ class Person < PipelineDeals::Resource; end
15
+ class Company < PipelineDeals::Resource; end
16
+ class Activity < PipelineDeals::Resource; end
17
+ class CalendarEntry < PipelineDeals::Resource; end
18
+ class CalendarTask < PipelineDeals::Resource; end
19
+ class CalendarEvent < PipelineDeals::Resource; end
20
+ class Document < PipelineDeals::Resource; end
21
+ class User < PipelineDeals::Resource; end
22
+ class Note < PipelineDeals::Resource; end
21
23
  end
@@ -2,4 +2,3 @@ module PipelineDeals
2
2
  class EventCategory < PipelineDeals::AdminResource
3
3
  end
4
4
  end
5
-
@@ -2,4 +2,3 @@ module PipelineDeals
2
2
  class LeadSource < PipelineDeals::AdminResource
3
3
  end
4
4
  end
5
-
@@ -0,0 +1,9 @@
1
+ module PipelineDeals
2
+ class Note < PipelineDeals::Resource
3
+ belongs_to :note_category, class_name: PipelineDeals::NoteCategory
4
+ belongs_to :company, class_name: PipelineDeals::Company
5
+ belongs_to :deal, class_name: PipelineDeals::Deal
6
+ belongs_to :person, class_name: PipelineDeals::Person
7
+ belongs_to :created_by_user, class_name: PipelineDeals::User, foreign_key: :created_by_user_id
8
+ end
9
+ end
@@ -2,4 +2,3 @@ module PipelineDeals
2
2
  class NoteCategory < PipelineDeals::AdminResource
3
3
  end
4
4
  end
5
-
@@ -1,6 +1,13 @@
1
1
  module PipelineDeals
2
2
  class Person < PipelineDeals::Resource
3
3
  has_many :deals, class_name: PipelineDeals::Deal
4
- has_one :company, class_name: PipelineDeals::Company
4
+ has_many :documents, class_name: PipelineDeals::Document
5
+ has_many :notes, class_name: PipelineDeals::Note
6
+ has_many :calendar_entries, class_name: PipelineDeals::CalendarEntry
7
+ belongs_to :company, class_name: PipelineDeals::Company
8
+ belongs_to :user, class_name: PipelineDeals::User
9
+ belongs_to :lead_source, class_name: PipelineDeals::LeadSource
10
+ belongs_to :lead_status, class_name: PipelineDeals::LeadStatus
11
+ has_many :predfined_contacts_tags, class_name: PipelineDeals::PredefinedContactsTag
5
12
  end
6
13
  end
@@ -1,4 +1,5 @@
1
1
  module PipelineDeals
2
2
  class PersonCustomFieldLabel < PipelineDeals::AdminResource
3
+ has_many :custom_field_label_dropdown_entries, class_name: PipelineDeals::CustomFieldLabelDropdownEntry
3
4
  end
4
5
  end
@@ -2,4 +2,3 @@ module PipelineDeals
2
2
  class PredefinedContactsTag < PipelineDeals::AdminResource
3
3
  end
4
4
  end
5
-
@@ -1,6 +1,7 @@
1
1
  module PipelineDeals
2
2
  class User < PipelineDeals::Resource
3
3
  has_many :deals, class_name: PipelineDeals::Deal
4
+ has_many :people, class_name: PipelineDeals::Person
4
5
  end
5
6
  end
6
7
 
@@ -1,3 +1,3 @@
1
1
  module PipelineDeals
2
- VERSION = "0.1.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -16,5 +16,10 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
- gem.add_dependency('activeresource', '4.0.0.beta1')
19
+
20
+ gem.add_dependency('activeresource', '4.0.0')
21
+
22
+ gem.add_development_dependency('rspec')
23
+ gem.add_development_dependency('webmock')
24
+ gem.add_development_dependency('vcr')
20
25
  end
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v3/calendar_entries.json?api_key=iJHyFkMUBSfjUovt29&deal_id=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 20 May 2014 01:11:48 GMT
23
+ Status:
24
+ - 200 OK
25
+ Connection:
26
+ - close
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ X-Runtime:
30
+ - '1501'
31
+ Etag:
32
+ - ! '"b98a69351d24438820332cb3e2303270"'
33
+ Cache-Control:
34
+ - private, max-age=0, must-revalidate
35
+ Content-Length:
36
+ - '794'
37
+ Set-Cookie:
38
+ - is_legacy_user=; domain=pipelinedeals.com; path=/; expires=Thu, 01-Jan-1970
39
+ 00:00:00 GMT
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"entries":[{"all_day":true,"association_id":1,"association_type":"Deal","base_entry_id":null,"category_id":5,"company_id":null,"complete":false,"completed_at":null,"created_at":"2014/05/19
43
+ 11:13:43 -0400","description":null,"due_date":"2014/05/29","end_time":null,"exdate":null,"exrule":null,"google_calendar_id":null,"id":1,"name":"Expected
44
+ close date","owner_id":2,"rdate":null,"rrule":null,"start_time":null,"type":"CalendarTask","updated_at":"2014/05/19
45
+ 11:13:43 -0400","part_of_recurring_series":false,"recurrence_end":null,"category":{"id":5,"name":"Milestone"},"owner":{"id":2,"first_name":"Maggie","last_name":"Zemlak"},"association":{"id":1,"name":"leverage
46
+ magnetic e-tailers"},"associated_company":null}],"pagination":{"page":1,"page_var":"page","per_page":200,"pages":1,"total":1}}'
47
+ http_version:
48
+ recorded_at: Tue, 20 May 2014 01:11:48 GMT
49
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v3/notes.json?api_key=iJHyFkMUBSfjUovt29&deal_id=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 20 May 2014 01:11:36 GMT
23
+ Status:
24
+ - 200 OK
25
+ Connection:
26
+ - close
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ X-Runtime:
30
+ - '1944'
31
+ Etag:
32
+ - ! '"c87c7fbc61b5b65413552e0791ea1b37"'
33
+ Cache-Control:
34
+ - private, max-age=0, must-revalidate
35
+ Content-Length:
36
+ - '3239'
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '{"entries":[{"company_id":null,"content":"Enim eum optio ea cupiditate
40
+ voluptate.\nMagnam esse ut repudiandae ipsa sint assumenda veniam atque.\nMagni
41
+ facilis ipsum sed maiores non velit enim aliquam.","created_at":"2014/05/08
42
+ 21:34:31 -0400","created_by_user_id":2,"deal_id":1,"id":122,"note_category_id":1,"person_id":null,"title":null,"updated_at":"2014/05/19
43
+ 08:55:32 -0400","user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"created_by_user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"deal":{"id":1,"name":"leverage
44
+ magnetic e-tailers"},"note_category":{"id":1,"name":"Phone Call"},"person":null,"company":null,"notify_user_ids":[2],"comments":{"entries":[],"pagination":{"page":1,"page_var":"page","per_page":30,"pages":1,"total":0}},"user_id":2},{"company_id":null,"content":"Neque
45
+ et sunt necessitatibus dolores.\nEt est nostrum ut recusandae sed voluptas
46
+ sunt aut.\nQuibusdam ipsum voluptate hic consequatur.","created_at":"2014/03/29
47
+ 04:11:04 -0400","created_by_user_id":2,"deal_id":1,"id":121,"note_category_id":3,"person_id":null,"title":null,"updated_at":"2014/05/19
48
+ 08:55:32 -0400","user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"created_by_user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"deal":{"id":1,"name":"leverage
49
+ magnetic e-tailers"},"note_category":{"id":3,"name":"Appointment"},"person":null,"company":null,"notify_user_ids":[2],"comments":{"entries":[],"pagination":{"page":1,"page_var":"page","per_page":30,"pages":1,"total":0}},"user_id":2},{"company_id":null,"content":"Eum
50
+ optio ipsum et dignissimos perspiciatis.\nQui natus vitae facere.\nNeque aspernatur
51
+ sint repellat dolores quidem praesentium hic.","created_at":"2013/10/02 09:38:35
52
+ -0400","created_by_user_id":2,"deal_id":1,"id":120,"note_category_id":4,"person_id":null,"title":null,"updated_at":"2014/05/19
53
+ 08:55:32 -0400","user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"created_by_user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"deal":{"id":1,"name":"leverage
54
+ magnetic e-tailers"},"note_category":{"id":4,"name":"Cold Call"},"person":null,"company":null,"notify_user_ids":[2],"comments":{"entries":[],"pagination":{"page":1,"page_var":"page","per_page":30,"pages":1,"total":0}},"user_id":2},{"company_id":null,"content":"Quas
55
+ voluptatum consequuntur dicta nisi.\nIure nemo et hic ut animi aliquam possimus
56
+ odit.\nSunt et aliquam deserunt voluptas.","created_at":"2013/09/24 02:37:05
57
+ -0400","created_by_user_id":2,"deal_id":1,"id":119,"note_category_id":5,"person_id":null,"title":null,"updated_at":"2014/05/19
58
+ 08:55:32 -0400","user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"created_by_user":{"first_name":"Maggie","id":2,"last_name":"Zemlak","avatar_thumb_url":null},"deal":{"id":1,"name":"leverage
59
+ magnetic e-tailers"},"note_category":{"id":5,"name":"Concerns"},"person":null,"company":null,"notify_user_ids":[2],"comments":{"entries":[],"pagination":{"page":1,"page_var":"page","per_page":30,"pages":1,"total":0}},"user_id":2}],"pagination":{"page":1,"page_var":"page","per_page":200,"pages":1,"total":4}}'
60
+ http_version:
61
+ recorded_at: Tue, 20 May 2014 01:11:36 GMT
62
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v3/calendar_entries.json?api_key=iJHyFkMUBSfjUovt29&person_id=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Mon, 19 May 2014 16:28:44 GMT
23
+ Status:
24
+ - 200 OK
25
+ Connection:
26
+ - close
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ X-Runtime:
30
+ - '782'
31
+ Etag:
32
+ - ! '"79a5d16f78eecaecfbe049bc32893861"'
33
+ Cache-Control:
34
+ - private, max-age=0, must-revalidate
35
+ Content-Length:
36
+ - '856'
37
+ Set-Cookie:
38
+ - is_legacy_user=; domain=pipelinedeals.com; path=/; expires=Thu, 01-Jan-1970
39
+ 00:00:00 GMT
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"entries":[{"all_day":true,"association_id":1,"association_type":"Person","base_entry_id":null,"category_id":1,"company_id":1,"complete":false,"completed_at":null,"created_at":"2014/05/19
43
+ 11:25:37 -0400","description":null,"due_date":"2014/06/05","end_time":null,"exdate":null,"exrule":null,"google_calendar_id":null,"id":2,"name":"Do
44
+ something","owner_id":2,"rdate":null,"rrule":null,"start_time":null,"type":"CalendarTask","updated_at":"2014/05/19
45
+ 11:25:37 -0400","part_of_recurring_series":false,"recurrence_end":null,"category":{"id":1,"name":"Call"},"associated_company":{"id":1,"name":"Roob
46
+ Group"},"owner":{"id":2,"first_name":"Maggie","last_name":"Zemlak"},"association":{"id":1,"first_name":"Leonard","last_name":"Jakubowski","phone":null,"mobile":null,"email":null}}],"pagination":{"page":1,"page_var":"page","per_page":200,"pages":1,"total":1}}'
47
+ http_version:
48
+ recorded_at: Mon, 19 May 2014 16:28:44 GMT
49
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/api/v3/documents.json?api_key=iJHyFkMUBSfjUovt29&person_id=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Mon, 19 May 2014 16:28:22 GMT
23
+ Status:
24
+ - 200 OK
25
+ Connection:
26
+ - close
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ X-Runtime:
30
+ - '1962'
31
+ Etag:
32
+ - ! '"6eb1f4de69b6edbcc6d596428fc6dcae"'
33
+ Cache-Control:
34
+ - private, max-age=0, must-revalidate
35
+ Content-Length:
36
+ - '854'
37
+ Set-Cookie:
38
+ - is_legacy_user=; domain=pipelinedeals.com; path=/; expires=Thu, 01-Jan-1970
39
+ 00:00:00 GMT
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"entries":[{"created_at":"2014/05/19 12:13:24 -0400","deal_id":1,"id":1,"owner_id":2,"person_id":1,"title":"test.doc","updated_at":"2014/05/19
43
+ 12:13:24 -0400","upload_status":2,"upload_status_error_message":null,"public_link":"https://pipeline-dev-userdata.s3.amazonaws.com/uploaded_documents/1/test.doc?AWSAccessKeyId=AKIAIG7CDR66ZRRYWPFA\u0026Expires=1400520500\u0026Signature=Me0ENqmLCwJuD9c4m5aABxJNDBY%3D\u0026response-content-disposition=attachment\u0026response-content-type=application%2Fmsword","size_in_k":1,"upload_state":"complete","etag":null,"owner":{"id":2,"first_name":"Maggie","last_name":"Zemlak"},"person":{"id":1,"first_name":"Leonard","last_name":"Jakubowski"},"deal":{"id":1,"name":"leverage
44
+ magnetic e-tailers"},"company":{"id":1,"name":"Roob Group"}}],"pagination":{"page":1,"page_var":"page","per_page":200,"pages":1,"total":1}}'
45
+ http_version:
46
+ recorded_at: Mon, 19 May 2014 16:28:22 GMT
47
+ recorded_with: VCR 2.3.0