spark_api 1.5.4 → 1.5.5

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: 3027a80b349e435252ad94cde1fd6b8e2045d5350250f29b582b6d7392d7da3e
4
- data.tar.gz: 9464e6b802ee47398ecebb940776947a34f0f90390bf421a766021c11a1ea7cd
3
+ metadata.gz: d86ac16091ab48c0702a43a4825f816e22941ec010f550520f1f3d2baa716045
4
+ data.tar.gz: 901de544603a1537f103c5724217c2d9d4f0b25858bd38494d49fb783e658509
5
5
  SHA512:
6
- metadata.gz: 4492a3dcb079b0c8a062a26232d9d7a6f3d46a05041696f37c580db654af46e9cbc01cbe25bcc58cae2eb3085c94395b1da74d8d88e9ffc76fc72aa38319080b
7
- data.tar.gz: e551671321c8a26837677b76af2ee98e4877beaca9b655cc94ef0a65766b68c96695af399f812160f68e28c828d1332152ced85619e907f42912005ad34b334a
6
+ metadata.gz: e286d779462e7aaab1c5fbd59714a2b03d7ce3165bbe889f5f5b5e0088e14cd1ea16c7ab4e79ae29fd0759af915c1725609af074a1015d701676ada66a4adc3d
7
+ data.tar.gz: 7e9ed4f8a4ea53e6a0a094968e06c75df7bb554a80a8d5061fb279bce5f52edf7faefbc675a1df9719071d3ef12e635309c3a48e7a63898116a24f46b095432f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.4
1
+ 1.5.5
@@ -15,14 +15,18 @@ module SparkApi
15
15
  def on_complete(env)
16
16
  body = MultiJson.decode(env[:body])
17
17
  SparkApi.logger.debug { "[oauth2] Response Body: #{body.inspect}" }
18
+
18
19
  unless body.is_a?(Hash)
19
20
  raise InvalidResponse, "The server response could not be understood"
20
21
  end
22
+
21
23
  case env[:status]
22
24
  when 200..299
23
25
  SparkApi.logger.debug{ "[oauth2] Success!" }
24
26
  session = OAuthSession.new(body)
25
- else
27
+ else
28
+ SparkApi.logger.warn { "[oauth2] failure #{body.inspect}" }
29
+
26
30
  # Handle the WWW-Authenticate Response Header Field if present. This can be returned by
27
31
  # OAuth2 implementations and wouldn't hurt to log.
28
32
  auth_header_error = env[:request_headers]["WWW-Authenticate"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spark_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hornseth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-11-17 00:00:00.000000000 Z
12
+ date: 2021-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -539,203 +539,203 @@ signing_key:
539
539
  specification_version: 4
540
540
  summary: A library for interacting with the Spark web services.
541
541
  test_files:
542
- - spec/fixtures/comments/post.json
543
- - spec/fixtures/comments/get.json
544
- - spec/fixtures/comments/new.json
545
- - spec/fixtures/sharedlinks/success.json
546
- - spec/fixtures/idx_links/get.json
547
- - spec/fixtures/listing_carts/new_portal_cart.json
548
- - spec/fixtures/listing_carts/post.json
542
+ - spec/fixtures/fields/order_a.json
543
+ - spec/fixtures/fields/settings.json
544
+ - spec/fixtures/fields/order.json
545
+ - spec/fixtures/errors/failure_with_msg.json
546
+ - spec/fixtures/errors/failure.json
547
+ - spec/fixtures/errors/expired.json
548
+ - spec/fixtures/errors/failure_with_constraint.json
549
+ - spec/fixtures/property_types/property_types.json
549
550
  - spec/fixtures/listing_carts/put.json
550
- - spec/fixtures/listing_carts/remove_listing.json
551
- - spec/fixtures/listing_carts/post_portal_cart.json
551
+ - spec/fixtures/listing_carts/post.json
552
+ - spec/fixtures/listing_carts/put_name.json
553
+ - spec/fixtures/listing_carts/add_portal_cart_listings.json
552
554
  - spec/fixtures/listing_carts/listing_cart.json
553
- - spec/fixtures/listing_carts/add_listing.json
555
+ - spec/fixtures/listing_carts/new_portal_cart.json
554
556
  - spec/fixtures/listing_carts/put_ids.json
555
- - spec/fixtures/listing_carts/add_portal_cart_listings.json
556
557
  - spec/fixtures/listing_carts/new.json
558
+ - spec/fixtures/listing_carts/remove_listing.json
557
559
  - spec/fixtures/listing_carts/add_listing_post.json
560
+ - spec/fixtures/listing_carts/add_listing.json
561
+ - spec/fixtures/listing_carts/add_portal_cart_listings_post.json
562
+ - spec/fixtures/listing_carts/empty.json
558
563
  - spec/fixtures/listing_carts/add_listings.json
564
+ - spec/fixtures/listing_carts/post_portal_cart.json
559
565
  - spec/fixtures/listing_carts/listing_portal_cart.json
560
- - spec/fixtures/listing_carts/empty.json
561
566
  - spec/fixtures/listing_carts/add_listings_post.json
562
- - spec/fixtures/listing_carts/put_name.json
563
- - spec/fixtures/listing_carts/add_portal_cart_listings_post.json
564
- - spec/fixtures/fields/order_a.json
565
- - spec/fixtures/fields/order.json
566
- - spec/fixtures/fields/settings.json
567
- - spec/fixtures/newsfeeds/get.json
568
- - spec/fixtures/newsfeeds/inactive.json
569
- - spec/fixtures/newsfeeds/meta.json
570
- - spec/fixtures/authentication_failure.json
567
+ - spec/fixtures/success.json
568
+ - spec/fixtures/activities/get.json
571
569
  - spec/fixtures/generic_failure.json
572
- - spec/fixtures/notes/agent_shared_empty.json
573
- - spec/fixtures/notes/add.json
574
- - spec/fixtures/notes/new.json
575
- - spec/fixtures/notes/agent_shared.json
576
- - spec/fixtures/finders.json
577
- - spec/fixtures/notifications/post.json
578
- - spec/fixtures/notifications/unread.json
579
- - spec/fixtures/notifications/new.json
580
- - spec/fixtures/notifications/mark_read.json
581
- - spec/fixtures/notifications/notifications.json
582
- - spec/fixtures/notifications/new_empty.json
583
- - spec/fixtures/contacts/post.json
584
- - spec/fixtures/contacts/vow_accounts/post.json
570
+ - spec/fixtures/search_templates/quick_searches/get.json
571
+ - spec/fixtures/comments/get.json
572
+ - spec/fixtures/comments/post.json
573
+ - spec/fixtures/comments/new.json
585
574
  - spec/fixtures/contacts/vow_accounts/edit.json
586
575
  - spec/fixtures/contacts/vow_accounts/get.json
576
+ - spec/fixtures/contacts/vow_accounts/post.json
587
577
  - spec/fixtures/contacts/vow_accounts/new.json
588
- - spec/fixtures/contacts/new.json
589
- - spec/fixtures/contacts/my.json
590
- - spec/fixtures/contacts/new_notify.json
591
578
  - spec/fixtures/contacts/new_empty.json
579
+ - spec/fixtures/contacts/post.json
580
+ - spec/fixtures/contacts/my.json
581
+ - spec/fixtures/contacts/new.json
592
582
  - spec/fixtures/contacts/contacts.json
583
+ - spec/fixtures/contacts/new_notify.json
593
584
  - spec/fixtures/contacts/tags.json
594
- - spec/fixtures/errors/failure_with_constraint.json
595
- - spec/fixtures/errors/failure.json
596
- - spec/fixtures/errors/expired.json
597
- - spec/fixtures/errors/failure_with_msg.json
598
- - spec/fixtures/messages/post.json
599
- - spec/fixtures/messages/new_with_recipients.json
600
- - spec/fixtures/messages/get.json
601
- - spec/fixtures/messages/new.json
602
- - spec/fixtures/messages/count.json
603
- - spec/fixtures/messages/new_empty.json
604
- - spec/fixtures/activities/get.json
605
- - spec/fixtures/base.json
606
- - spec/fixtures/accounts/my_put.json
607
- - spec/fixtures/accounts/office.json
608
- - spec/fixtures/accounts/all.json
609
- - spec/fixtures/accounts/my.json
610
- - spec/fixtures/accounts/password_save.json
611
- - spec/fixtures/accounts/my_portal.json
612
- - spec/fixtures/accounts/my_save.json
613
- - spec/fixtures/oauth2_error.json
614
- - spec/fixtures/property_types/property_types.json
615
- - spec/fixtures/portal/post.json
616
- - spec/fixtures/portal/disable.json
617
- - spec/fixtures/portal/new.json
618
- - spec/fixtures/portal/my_non_existant.json
619
- - spec/fixtures/portal/enable.json
620
- - spec/fixtures/portal/my.json
621
- - spec/fixtures/oauth2/refresh_body.json
585
+ - spec/fixtures/oauth2/access_with_old_refresh.json
622
586
  - spec/fixtures/oauth2/error.json
623
- - spec/fixtures/oauth2/access_with_refresh.json
624
- - spec/fixtures/oauth2/access.json
625
587
  - spec/fixtures/oauth2/authorization_code_body.json
588
+ - spec/fixtures/oauth2/refresh_body.json
626
589
  - spec/fixtures/oauth2/password_body.json
627
- - spec/fixtures/oauth2/access_with_old_refresh.json
628
- - spec/fixtures/sorts/get.json
629
- - spec/fixtures/search_templates/quick_searches/get.json
630
- - spec/fixtures/success.json
631
- - spec/fixtures/no_results.json
632
- - spec/fixtures/saved_searches/post.json
633
- - spec/fixtures/saved_searches/with_newsfeed.json
590
+ - spec/fixtures/oauth2/access_with_refresh.json
591
+ - spec/fixtures/oauth2/access.json
592
+ - spec/fixtures/base.json
593
+ - spec/fixtures/idx_links/get.json
634
594
  - spec/fixtures/saved_searches/with_inactive_newsfeed.json
595
+ - spec/fixtures/saved_searches/get_provided.json
635
596
  - spec/fixtures/saved_searches/get.json
597
+ - spec/fixtures/saved_searches/post.json
598
+ - spec/fixtures/saved_searches/without_newsfeed.json
599
+ - spec/fixtures/saved_searches/with_newsfeed.json
636
600
  - spec/fixtures/saved_searches/new.json
637
601
  - spec/fixtures/saved_searches/update.json
638
- - spec/fixtures/saved_searches/without_newsfeed.json
639
- - spec/fixtures/saved_searches/get_provided.json
640
- - spec/fixtures/count.json
641
- - spec/fixtures/generic_delete.json
642
- - spec/fixtures/logo_fbs.png
643
- - spec/fixtures/empty.json
644
- - spec/fixtures/standardfields/standardfields.json
645
- - spec/fixtures/standardfields/stateorprovince.json
646
- - spec/fixtures/standardfields/city.json
647
- - spec/fixtures/standardfields/nearby.json
648
- - spec/fixtures/listing_meta_translations/get.json
649
- - spec/fixtures/rules/get.json
650
- - spec/fixtures/listings/rental_calendar.json
651
- - spec/fixtures/listings/shared_listing_new.json
602
+ - spec/fixtures/no_results.json
603
+ - spec/fixtures/notes/agent_shared_empty.json
604
+ - spec/fixtures/notes/new.json
605
+ - spec/fixtures/notes/add.json
606
+ - spec/fixtures/notes/agent_shared.json
607
+ - spec/fixtures/accounts/my_put.json
608
+ - spec/fixtures/accounts/my_portal.json
609
+ - spec/fixtures/accounts/my.json
610
+ - spec/fixtures/accounts/office.json
611
+ - spec/fixtures/accounts/password_save.json
612
+ - spec/fixtures/accounts/my_save.json
613
+ - spec/fixtures/accounts/all.json
614
+ - spec/fixtures/sharedlinks/success.json
652
615
  - spec/fixtures/listings/put.json
653
- - spec/fixtures/listings/virtual_tours_index.json
654
- - spec/fixtures/listings/no_subresources.json
655
616
  - spec/fixtures/listings/videos_index.json
656
- - spec/fixtures/listings/tour_of_homes_search.json
657
- - spec/fixtures/listings/with_videos.json
617
+ - spec/fixtures/listings/photos/index.json
658
618
  - spec/fixtures/listings/photos/post.json
659
619
  - spec/fixtures/listings/photos/rotate.json
660
620
  - spec/fixtures/listings/photos/rollback.json
661
621
  - spec/fixtures/listings/photos/new.json
662
- - spec/fixtures/listings/photos/index.json
663
622
  - spec/fixtures/listings/photos/batch_delete.json
664
- - spec/fixtures/listings/constraints.json
665
- - spec/fixtures/listings/document_index.json
666
- - spec/fixtures/listings/with_vtour.json
667
- - spec/fixtures/listings/tour_of_homes.json
668
- - spec/fixtures/listings/reorder_photo.json
669
- - spec/fixtures/listings/open_houses.json
670
- - spec/fixtures/listings/with_photos.json
671
623
  - spec/fixtures/listings/constraints_with_pagination.json
624
+ - spec/fixtures/listings/with_rental_calendar.json
625
+ - spec/fixtures/listings/floplans_index.json
672
626
  - spec/fixtures/listings/shared_listing_get.json
673
- - spec/fixtures/listings/put_reorder_photo.json
674
- - spec/fixtures/listings/put_expiration_date.json
627
+ - spec/fixtures/listings/with_documents.json
628
+ - spec/fixtures/listings/tour_of_homes.json
675
629
  - spec/fixtures/listings/with_supplement.json
676
- - spec/fixtures/listings/with_rental_calendar.json
630
+ - spec/fixtures/listings/with_videos.json
677
631
  - spec/fixtures/listings/shared_listing_post.json
678
- - spec/fixtures/listings/floplans_index.json
632
+ - spec/fixtures/listings/put_reorder_photo.json
633
+ - spec/fixtures/listings/rental_calendar.json
634
+ - spec/fixtures/listings/constraints.json
635
+ - spec/fixtures/listings/no_subresources.json
679
636
  - spec/fixtures/listings/with_permissions.json
680
- - spec/fixtures/listings/with_documents.json
637
+ - spec/fixtures/listings/open_houses.json
638
+ - spec/fixtures/listings/with_photos.json
639
+ - spec/fixtures/listings/with_vtour.json
681
640
  - spec/fixtures/listings/multiple.json
641
+ - spec/fixtures/listings/document_index.json
642
+ - spec/fixtures/listings/reorder_photo.json
643
+ - spec/fixtures/listings/put_expiration_date.json
644
+ - spec/fixtures/listings/virtual_tours_index.json
645
+ - spec/fixtures/listings/tour_of_homes_search.json
646
+ - spec/fixtures/listings/shared_listing_new.json
647
+ - spec/fixtures/authentication_failure.json
648
+ - spec/fixtures/standardfields/city.json
649
+ - spec/fixtures/standardfields/nearby.json
650
+ - spec/fixtures/standardfields/standardfields.json
651
+ - spec/fixtures/standardfields/stateorprovince.json
652
+ - spec/fixtures/count.json
653
+ - spec/fixtures/oauth2_error.json
654
+ - spec/fixtures/finders.json
655
+ - spec/fixtures/portal/post.json
656
+ - spec/fixtures/portal/my.json
657
+ - spec/fixtures/portal/my_non_existant.json
658
+ - spec/fixtures/portal/new.json
659
+ - spec/fixtures/portal/enable.json
660
+ - spec/fixtures/portal/disable.json
682
661
  - spec/fixtures/session.json
683
- - spec/unit/spark_api/multi_client_spec.rb
684
- - spec/unit/spark_api/authentication/api_auth_spec.rb
685
- - spec/unit/spark_api/authentication/oauth2_spec.rb
662
+ - spec/fixtures/rules/get.json
663
+ - spec/fixtures/newsfeeds/get.json
664
+ - spec/fixtures/newsfeeds/inactive.json
665
+ - spec/fixtures/newsfeeds/meta.json
666
+ - spec/fixtures/listing_meta_translations/get.json
667
+ - spec/fixtures/empty.json
668
+ - spec/fixtures/sorts/get.json
669
+ - spec/fixtures/notifications/new_empty.json
670
+ - spec/fixtures/notifications/notifications.json
671
+ - spec/fixtures/notifications/post.json
672
+ - spec/fixtures/notifications/new.json
673
+ - spec/fixtures/notifications/mark_read.json
674
+ - spec/fixtures/notifications/unread.json
675
+ - spec/fixtures/logo_fbs.png
676
+ - spec/fixtures/generic_delete.json
677
+ - spec/fixtures/messages/new_empty.json
678
+ - spec/fixtures/messages/get.json
679
+ - spec/fixtures/messages/new_with_recipients.json
680
+ - spec/fixtures/messages/post.json
681
+ - spec/fixtures/messages/new.json
682
+ - spec/fixtures/messages/count.json
683
+ - spec/unit/spark_api_spec.rb
684
+ - spec/unit/spark_api/paginate_spec.rb
685
+ - spec/unit/spark_api/request_spec.rb
686
+ - spec/unit/spark_api/options_hash_spec.rb
686
687
  - spec/unit/spark_api/authentication/base_auth_spec.rb
688
+ - spec/unit/spark_api/authentication/oauth2_spec.rb
689
+ - spec/unit/spark_api/authentication/api_auth_spec.rb
687
690
  - spec/unit/spark_api/authentication/oauth2_impl/single_session_provider_spec.rb
688
691
  - spec/unit/spark_api/authentication/oauth2_impl/grant_type_base_spec.rb
689
692
  - spec/unit/spark_api/authentication/oauth2_impl/faraday_middleware_spec.rb
690
- - spec/unit/spark_api/paginate_spec.rb
691
- - spec/unit/spark_api/primary_array_spec.rb
692
- - spec/unit/spark_api/configuration_spec.rb
693
- - spec/unit/spark_api/configuration/yaml_spec.rb
694
- - spec/unit/spark_api/authentication_spec.rb
695
- - spec/unit/spark_api/request_spec.rb
696
- - spec/unit/spark_api/options_hash_spec.rb
697
- - spec/unit/spark_api/models/defaultable_spec.rb
698
- - spec/unit/spark_api/models/portal_spec.rb
699
- - spec/unit/spark_api/models/rule_spec.rb
700
- - spec/unit/spark_api/models/fields_spec.rb
701
- - spec/unit/spark_api/models/saved_search_spec.rb
702
- - spec/unit/spark_api/models/vow_account_spec.rb
703
- - spec/unit/spark_api/models/account_report_spec.rb
693
+ - spec/unit/spark_api/models/notification_spec.rb
704
694
  - spec/unit/spark_api/models/floplan_spec.rb
705
- - spec/unit/spark_api/models/listing_cart_spec.rb
706
- - spec/unit/spark_api/models/message_spec.rb
707
- - spec/unit/spark_api/models/news_feed_meta_spec.rb
708
- - spec/unit/spark_api/models/rental_calendar_spec.rb
709
- - spec/unit/spark_api/models/constraint_spec.rb
710
- - spec/unit/spark_api/models/search_template/quick_search_spec.rb
695
+ - spec/unit/spark_api/models/fields_spec.rb
696
+ - spec/unit/spark_api/models/open_house_spec.rb
697
+ - spec/unit/spark_api/models/document_spec.rb
711
698
  - spec/unit/spark_api/models/newsfeed_spec.rb
699
+ - spec/unit/spark_api/models/system_info_spec.rb
712
700
  - spec/unit/spark_api/models/tour_of_home_spec.rb
713
- - spec/unit/spark_api/models/concerns/destroyable_spec.rb
714
- - spec/unit/spark_api/models/concerns/savable_spec.rb
715
- - spec/unit/spark_api/models/document_spec.rb
716
- - spec/unit/spark_api/models/connect_prefs_spec.rb
717
- - spec/unit/spark_api/models/standard_fields_spec.rb
718
- - spec/unit/spark_api/models/shared_listing_spec.rb
719
- - spec/unit/spark_api/models/notification_spec.rb
720
- - spec/unit/spark_api/models/subresource_spec.rb
721
- - spec/unit/spark_api/models/shared_link_spec.rb
722
- - spec/unit/spark_api/models/property_types_spec.rb
701
+ - spec/unit/spark_api/models/vow_account_spec.rb
702
+ - spec/unit/spark_api/models/activity_spec.rb
723
703
  - spec/unit/spark_api/models/listing_meta_translations_spec.rb
724
- - spec/unit/spark_api/models/virtual_tour_spec.rb
725
- - spec/unit/spark_api/models/system_info_spec.rb
704
+ - spec/unit/spark_api/models/news_feed_meta_spec.rb
726
705
  - spec/unit/spark_api/models/listing_spec.rb
727
- - spec/unit/spark_api/models/base_spec.rb
728
- - spec/unit/spark_api/models/account_spec.rb
729
706
  - spec/unit/spark_api/models/sort_spec.rb
707
+ - spec/unit/spark_api/models/subresource_spec.rb
708
+ - spec/unit/spark_api/models/connect_prefs_spec.rb
709
+ - spec/unit/spark_api/models/rule_spec.rb
730
710
  - spec/unit/spark_api/models/video_spec.rb
731
- - spec/unit/spark_api/models/photo_spec.rb
732
- - spec/unit/spark_api/models/open_house_spec.rb
711
+ - spec/unit/spark_api/models/virtual_tour_spec.rb
712
+ - spec/unit/spark_api/models/listing_cart_spec.rb
713
+ - spec/unit/spark_api/models/message_spec.rb
714
+ - spec/unit/spark_api/models/email_link_spec.rb
715
+ - spec/unit/spark_api/models/standard_fields_spec.rb
733
716
  - spec/unit/spark_api/models/dirty_spec.rb
734
- - spec/unit/spark_api/models/note_spec.rb
717
+ - spec/unit/spark_api/models/account_spec.rb
718
+ - spec/unit/spark_api/models/photo_spec.rb
735
719
  - spec/unit/spark_api/models/finders_spec.rb
736
- - spec/unit/spark_api/models/activity_spec.rb
720
+ - spec/unit/spark_api/models/note_spec.rb
721
+ - spec/unit/spark_api/models/concerns/savable_spec.rb
722
+ - spec/unit/spark_api/models/concerns/destroyable_spec.rb
723
+ - spec/unit/spark_api/models/portal_spec.rb
724
+ - spec/unit/spark_api/models/defaultable_spec.rb
725
+ - spec/unit/spark_api/models/constraint_spec.rb
726
+ - spec/unit/spark_api/models/shared_listing_spec.rb
727
+ - spec/unit/spark_api/models/property_types_spec.rb
728
+ - spec/unit/spark_api/models/search_template/quick_search_spec.rb
737
729
  - spec/unit/spark_api/models/contact_spec.rb
738
- - spec/unit/spark_api/models/email_link_spec.rb
730
+ - spec/unit/spark_api/models/rental_calendar_spec.rb
731
+ - spec/unit/spark_api/models/saved_search_spec.rb
732
+ - spec/unit/spark_api/models/account_report_spec.rb
733
+ - spec/unit/spark_api/models/base_spec.rb
734
+ - spec/unit/spark_api/models/shared_link_spec.rb
739
735
  - spec/unit/spark_api/faraday_middleware_spec.rb
740
- - spec/unit/spark_api_spec.rb
736
+ - spec/unit/spark_api/configuration_spec.rb
737
+ - spec/unit/spark_api/primary_array_spec.rb
738
+ - spec/unit/spark_api/configuration/yaml_spec.rb
739
+ - spec/unit/spark_api/multi_client_spec.rb
740
+ - spec/unit/spark_api/authentication_spec.rb
741
741
  - spec/spec_helper.rb