stbaldricks 12.11.0.alpha.1 → 12.11.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stbaldricks/configuration.rb +2 -2
- data/lib/stbaldricks/default_logger.rb +2 -2
- data/lib/stbaldricks/endpoints/blog_post.rb +8 -8
- data/lib/stbaldricks/endpoints/communicate.rb +1 -1
- data/lib/stbaldricks/endpoints/config.rb +1 -1
- data/lib/stbaldricks/endpoints/deduplicator_match.rb +2 -2
- data/lib/stbaldricks/endpoints/kid.rb +1 -1
- data/lib/stbaldricks/endpoints/lib/entity.rb +13 -11
- data/lib/stbaldricks/endpoints/newsletter_recipient.rb +11 -5
- data/lib/stbaldricks/endpoints/participant.rb +3 -3
- data/lib/stbaldricks/endpoints/photo.rb +5 -4
- data/lib/stbaldricks/endpoints/search.rb +2 -2
- data/lib/stbaldricks/endpoints/user.rb +1 -1
- data/lib/stbaldricks/entities/batch.rb +3 -5
- data/lib/stbaldricks/entities/blog_post.rb +1 -7
- data/lib/stbaldricks/entities/campaign.rb +6 -13
- data/lib/stbaldricks/entities/challenge.rb +4 -6
- data/lib/stbaldricks/entities/challenger.rb +4 -6
- data/lib/stbaldricks/entities/concerns/entity_response_concern.rb +1 -1
- data/lib/stbaldricks/entities/config.rb +3 -8
- data/lib/stbaldricks/entities/contact.rb +4 -7
- data/lib/stbaldricks/entities/contact_group.rb +2 -2
- data/lib/stbaldricks/entities/deduplicator_history.rb +1 -6
- data/lib/stbaldricks/entities/deduplicator_match.rb +4 -7
- data/lib/stbaldricks/entities/disease.rb +2 -5
- data/lib/stbaldricks/entities/document_library.rb +3 -8
- data/lib/stbaldricks/entities/document_library_category.rb +1 -4
- data/lib/stbaldricks/entities/donation.rb +12 -18
- data/lib/stbaldricks/entities/donor.rb +1 -5
- data/lib/stbaldricks/entities/event.rb +32 -43
- data/lib/stbaldricks/entities/event_application.rb +6 -10
- data/lib/stbaldricks/entities/event_donation_summary.rb +2 -5
- data/lib/stbaldricks/entities/event_participant_summary.rb +1 -3
- data/lib/stbaldricks/entities/event_supporter.rb +3 -3
- data/lib/stbaldricks/entities/fund.rb +6 -23
- data/lib/stbaldricks/entities/fundraiser.rb +16 -29
- data/lib/stbaldricks/entities/grant.rb +12 -25
- data/lib/stbaldricks/entities/institution.rb +3 -4
- data/lib/stbaldricks/entities/international_partner.rb +4 -16
- data/lib/stbaldricks/entities/kid.rb +13 -30
- data/lib/stbaldricks/entities/kid_honor.rb +1 -0
- data/lib/stbaldricks/entities/kid_institution.rb +2 -2
- data/lib/stbaldricks/entities/lib/address.rb +3 -6
- data/lib/stbaldricks/entities/lib/alternate_shipping_address.rb +1 -3
- data/lib/stbaldricks/entities/lib/base.rb +47 -39
- data/lib/stbaldricks/entities/lib/collection.rb +2 -2
- data/lib/stbaldricks/entities/lib/email_address.rb +1 -2
- data/lib/stbaldricks/entities/lib/fundraising_page.rb +1 -2
- data/lib/stbaldricks/entities/lib/location.rb +1 -0
- data/lib/stbaldricks/entities/lib/milestone.rb +1 -3
- data/lib/stbaldricks/entities/lib/name.rb +2 -2
- data/lib/stbaldricks/entities/lib/not_implemented_object.rb +1 -1
- data/lib/stbaldricks/entities/lib/permissions.rb +2 -4
- data/lib/stbaldricks/entities/lib/phone.rb +2 -3
- data/lib/stbaldricks/entities/lib/third_party_media.rb +1 -5
- data/lib/stbaldricks/entities/lib/top_level.rb +1 -1
- data/lib/stbaldricks/entities/matching_gift_company.rb +16 -39
- data/lib/stbaldricks/entities/memorial.rb +9 -14
- data/lib/stbaldricks/entities/message.rb +4 -15
- data/lib/stbaldricks/entities/organization.rb +11 -17
- data/lib/stbaldricks/entities/page.rb +6 -15
- data/lib/stbaldricks/entities/participant.rb +18 -28
- data/lib/stbaldricks/entities/participant_donation_summary.rb +2 -4
- data/lib/stbaldricks/entities/person.rb +22 -30
- data/lib/stbaldricks/entities/person_donation_by_year_summary.rb +1 -2
- data/lib/stbaldricks/entities/photo.rb +5 -11
- data/lib/stbaldricks/entities/recurring_gift.rb +10 -18
- data/lib/stbaldricks/entities/response.rb +1 -0
- data/lib/stbaldricks/entities/search.rb +30 -168
- data/lib/stbaldricks/entities/section.rb +1 -4
- data/lib/stbaldricks/entities/shave_schedule.rb +4 -13
- data/lib/stbaldricks/entities/summary.rb +1 -7
- data/lib/stbaldricks/entities/team.rb +12 -16
- data/lib/stbaldricks/entities/team_donation_summary.rb +2 -4
- data/lib/stbaldricks/request.rb +2 -2
- data/lib/stbaldricks/version.rb +1 -1
- metadata +4 -198
- data/lib/stbaldricks_factories.rb +0 -5
- data/spec/factories/address.rb +0 -14
- data/spec/factories/campaign/totals.rb +0 -9
- data/spec/factories/campaign.rb +0 -9
- data/spec/factories/challenge.rb +0 -19
- data/spec/factories/challenger.rb +0 -33
- data/spec/factories/collection.rb +0 -17
- data/spec/factories/contact.rb +0 -18
- data/spec/factories/contact_group.rb +0 -18
- data/spec/factories/diagnosis.rb +0 -12
- data/spec/factories/disease.rb +0 -11
- data/spec/factories/donation/participant.rb +0 -27
- data/spec/factories/donation.rb +0 -68
- data/spec/factories/donor.rb +0 -13
- data/spec/factories/email_address.rb +0 -11
- data/spec/factories/error.rb +0 -9
- data/spec/factories/event/coach_tracking/coaching_interactions.rb +0 -12
- data/spec/factories/event/coach_tracking/plaque.rb +0 -12
- data/spec/factories/event/coach_tracking/proceeds.rb +0 -12
- data/spec/factories/event/coach_tracking.rb +0 -18
- data/spec/factories/event/contacts/contact.rb +0 -17
- data/spec/factories/event/contacts/name_pieces.rb +0 -12
- data/spec/factories/event/contacts.rb +0 -16
- data/spec/factories/event/photos.rb +0 -12
- data/spec/factories/event/totals.rb +0 -15
- data/spec/factories/event/venue/location.rb +0 -18
- data/spec/factories/event/venue/social.rb +0 -16
- data/spec/factories/event/venue.rb +0 -16
- data/spec/factories/event.rb +0 -66
- data/spec/factories/event_application.rb +0 -34
- data/spec/factories/event_supporter.rb +0 -19
- data/spec/factories/fund.rb +0 -18
- data/spec/factories/fundraiser/photos.rb +0 -12
- data/spec/factories/fundraiser/policies.rb +0 -11
- data/spec/factories/fundraiser/totals.rb +0 -11
- data/spec/factories/fundraiser.rb +0 -24
- data/spec/factories/fundraising_page.rb +0 -29
- data/spec/factories/grant.rb +0 -22
- data/spec/factories/grant_institution.rb +0 -17
- data/spec/factories/institution.rb +0 -18
- data/spec/factories/kid/custom_institution.rb +0 -12
- data/spec/factories/kid.rb +0 -68
- data/spec/factories/kid_honor.rb +0 -16
- data/spec/factories/kid_institution.rb +0 -23
- data/spec/factories/lib/faker_patch.rb +0 -27
- data/spec/factories/lib/helpers.rb +0 -7
- data/spec/factories/location.rb +0 -17
- data/spec/factories/memorial/photos.rb +0 -14
- data/spec/factories/memorial/totals.rb +0 -11
- data/spec/factories/memorial/tribute.rb +0 -19
- data/spec/factories/memorial.rb +0 -22
- data/spec/factories/message.rb +0 -31
- data/spec/factories/milestone.rb +0 -15
- data/spec/factories/name_pieces.rb +0 -24
- data/spec/factories/newsletter_recipient.rb +0 -13
- data/spec/factories/organization/addresses.rb +0 -16
- data/spec/factories/organization/email_addresses.rb +0 -14
- data/spec/factories/organization/phone_numbers.rb +0 -14
- data/spec/factories/organization.rb +0 -34
- data/spec/factories/page.rb +0 -5
- data/spec/factories/participant/photos.rb +0 -14
- data/spec/factories/participant/policies.rb +0 -12
- data/spec/factories/participant/rankings/ranking.rb +0 -12
- data/spec/factories/participant/rankings.rb +0 -16
- data/spec/factories/participant/roles/role.rb +0 -154
- data/spec/factories/participant/roles.rb +0 -37
- data/spec/factories/participant/totals.rb +0 -11
- data/spec/factories/participant.rb +0 -95
- data/spec/factories/payment.rb +0 -13
- data/spec/factories/permissions.rb +0 -12
- data/spec/factories/person/addresses.rb +0 -16
- data/spec/factories/person/email_addresses.rb +0 -14
- data/spec/factories/person/phone_numbers.rb +0 -14
- data/spec/factories/person/policies.rb +0 -13
- data/spec/factories/person.rb +0 -22
- data/spec/factories/phone.rb +0 -11
- data/spec/factories/photo.rb +0 -11
- data/spec/factories/photos.rb +0 -9
- data/spec/factories/recurring_gift.rb +0 -22
- data/spec/factories/researcher.rb +0 -15
- data/spec/factories/response.rb +0 -38
- data/spec/factories/search_event.rb +0 -19
- data/spec/factories/search_fundraiser.rb +0 -15
- data/spec/factories/search_kid.rb +0 -13
- data/spec/factories/search_participant.rb +0 -15
- data/spec/factories/search_team.rb +0 -13
- data/spec/factories/shave_schedule/time_selection_permissions.rb +0 -12
- data/spec/factories/shave_schedule.rb +0 -33
- data/spec/factories/team/photos.rb +0 -12
- data/spec/factories/team/rankings/ranking.rb +0 -12
- data/spec/factories/team/rankings.rb +0 -15
- data/spec/factories/team/totals.rb +0 -14
- data/spec/factories/team.rb +0 -43
- data/spec/factories/third_party_media.rb +0 -12
- data/spec/factories/treatment_status.rb +0 -10
- data/spec/factories/user.rb +0 -14
- data/spec/factories/venue.rb +0 -15
@@ -19,13 +19,7 @@ module SBF
|
|
19
19
|
entity_attr_reader :weekly_totals, 'SBF::Client::Summary::Totals'
|
20
20
|
|
21
21
|
class Totals < SBF::Client::BaseEntity
|
22
|
-
attr_reader :donations
|
23
|
-
attr_reader :events
|
24
|
-
attr_reader :male_shavees
|
25
|
-
attr_reader :female_shavees
|
26
|
-
attr_reader :barbers
|
27
|
-
attr_reader :participants
|
28
|
-
attr_reader :fundraisers
|
22
|
+
attr_reader :donations, :events, :male_shavees, :female_shavees, :barbers, :participants, :fundraisers
|
29
23
|
end
|
30
24
|
end
|
31
25
|
end
|
@@ -67,25 +67,21 @@ module SBF
|
|
67
67
|
extend Forwardable
|
68
68
|
def_delegator :@photos, :avatar, :avatar_photo_url
|
69
69
|
|
70
|
-
attr_accessor :id
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', true
|
75
|
-
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
|
76
|
-
|
77
|
-
|
78
|
-
attr_accessor :fundraising_goal, :fundraising_message
|
79
|
-
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
|
70
|
+
attr_accessor :id, :name, :status, :fund_relationship_type, :offline_donation_uuid, :offline_donation_form,
|
71
|
+
:fundraising_goal, :fundraising_message, :modified_by, :how_created
|
72
|
+
attr_reader :display_name, :created_at, :modified_at
|
73
|
+
|
74
|
+
entity_attr_accessor :event, 'SBF::Client::FullEvent', 'SBF::Client::PartialEvent', optional: true
|
75
|
+
entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', optional: true
|
76
|
+
|
77
|
+
entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, optional: true
|
80
78
|
entity_attr_reader :photos, 'SBF::Client::Team::Photos'
|
81
79
|
entity_attr_accessor :captain, 'SBF::Client::FullParticipant'
|
82
|
-
entity_attr_reader :rankings, 'SBF::Client::Team::Rankings', nil, true
|
80
|
+
entity_attr_reader :rankings, 'SBF::Client::Team::Rankings', nil, optional: true
|
83
81
|
entity_attr_reader :totals, 'SBF::Client::Team::Totals'
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
|
88
|
-
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
|
82
|
+
|
83
|
+
entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, optional: true
|
84
|
+
entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, optional: true
|
89
85
|
|
90
86
|
def active?
|
91
87
|
status == SBF::Client::Team::Status::ACTIVE
|
@@ -9,11 +9,9 @@ module SBF
|
|
9
9
|
blacklist_action :update
|
10
10
|
blacklist_action :delete
|
11
11
|
|
12
|
-
attr_accessor :amount_raised
|
13
|
-
attr_accessor :donations
|
14
|
-
attr_accessor :event_year
|
12
|
+
attr_accessor :amount_raised, :donations, :event_year
|
15
13
|
|
16
|
-
entity_attr_reader :team, 'SBF::Client::FullTeam', nil, true
|
14
|
+
entity_attr_reader :team, 'SBF::Client::FullTeam', nil, optional: true
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|
data/lib/stbaldricks/request.rb
CHANGED
@@ -56,7 +56,7 @@ module SBF
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
def self.file_post_request(path:, params: {}
|
59
|
+
def self.file_post_request(path:, file:, filename:, params: {})
|
60
60
|
raise SBF::Client::InvalidURIError, "Invalid URI: #{path}" unless valid_uri?(path)
|
61
61
|
raise SBF::Client::Error, 'Not yet authenticated' if user_token.nil?
|
62
62
|
raise SBF::Client::Error, 'Invalid File' unless file.is_a?(File) || file.is_a?(Tempfile)
|
@@ -112,7 +112,7 @@ module SBF
|
|
112
112
|
private_class_method :valid_uri?
|
113
113
|
|
114
114
|
def self.verify_ssl_peer?
|
115
|
-
(ENV
|
115
|
+
(ENV.fetch('VERIFY_SSL_PEER', true)).to_b
|
116
116
|
end
|
117
117
|
private_class_method :verify_ssl_peer?
|
118
118
|
end
|
data/lib/stbaldricks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stbaldricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.11.0.alpha.
|
4
|
+
version: 12.11.0.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -451,103 +451,6 @@ files:
|
|
451
451
|
- lib/stbaldricks/patches/string.rb
|
452
452
|
- lib/stbaldricks/request.rb
|
453
453
|
- lib/stbaldricks/version.rb
|
454
|
-
- lib/stbaldricks_factories.rb
|
455
|
-
- spec/factories/address.rb
|
456
|
-
- spec/factories/campaign.rb
|
457
|
-
- spec/factories/campaign/totals.rb
|
458
|
-
- spec/factories/challenge.rb
|
459
|
-
- spec/factories/challenger.rb
|
460
|
-
- spec/factories/collection.rb
|
461
|
-
- spec/factories/contact.rb
|
462
|
-
- spec/factories/contact_group.rb
|
463
|
-
- spec/factories/diagnosis.rb
|
464
|
-
- spec/factories/disease.rb
|
465
|
-
- spec/factories/donation.rb
|
466
|
-
- spec/factories/donation/participant.rb
|
467
|
-
- spec/factories/donor.rb
|
468
|
-
- spec/factories/email_address.rb
|
469
|
-
- spec/factories/error.rb
|
470
|
-
- spec/factories/event.rb
|
471
|
-
- spec/factories/event/coach_tracking.rb
|
472
|
-
- spec/factories/event/coach_tracking/coaching_interactions.rb
|
473
|
-
- spec/factories/event/coach_tracking/plaque.rb
|
474
|
-
- spec/factories/event/coach_tracking/proceeds.rb
|
475
|
-
- spec/factories/event/contacts.rb
|
476
|
-
- spec/factories/event/contacts/contact.rb
|
477
|
-
- spec/factories/event/contacts/name_pieces.rb
|
478
|
-
- spec/factories/event/photos.rb
|
479
|
-
- spec/factories/event/totals.rb
|
480
|
-
- spec/factories/event/venue.rb
|
481
|
-
- spec/factories/event/venue/location.rb
|
482
|
-
- spec/factories/event/venue/social.rb
|
483
|
-
- spec/factories/event_application.rb
|
484
|
-
- spec/factories/event_supporter.rb
|
485
|
-
- spec/factories/fund.rb
|
486
|
-
- spec/factories/fundraiser.rb
|
487
|
-
- spec/factories/fundraiser/photos.rb
|
488
|
-
- spec/factories/fundraiser/policies.rb
|
489
|
-
- spec/factories/fundraiser/totals.rb
|
490
|
-
- spec/factories/fundraising_page.rb
|
491
|
-
- spec/factories/grant.rb
|
492
|
-
- spec/factories/grant_institution.rb
|
493
|
-
- spec/factories/institution.rb
|
494
|
-
- spec/factories/kid.rb
|
495
|
-
- spec/factories/kid/custom_institution.rb
|
496
|
-
- spec/factories/kid_honor.rb
|
497
|
-
- spec/factories/kid_institution.rb
|
498
|
-
- spec/factories/lib/faker_patch.rb
|
499
|
-
- spec/factories/lib/helpers.rb
|
500
|
-
- spec/factories/location.rb
|
501
|
-
- spec/factories/memorial.rb
|
502
|
-
- spec/factories/memorial/photos.rb
|
503
|
-
- spec/factories/memorial/totals.rb
|
504
|
-
- spec/factories/memorial/tribute.rb
|
505
|
-
- spec/factories/message.rb
|
506
|
-
- spec/factories/milestone.rb
|
507
|
-
- spec/factories/name_pieces.rb
|
508
|
-
- spec/factories/newsletter_recipient.rb
|
509
|
-
- spec/factories/organization.rb
|
510
|
-
- spec/factories/organization/addresses.rb
|
511
|
-
- spec/factories/organization/email_addresses.rb
|
512
|
-
- spec/factories/organization/phone_numbers.rb
|
513
|
-
- spec/factories/page.rb
|
514
|
-
- spec/factories/participant.rb
|
515
|
-
- spec/factories/participant/photos.rb
|
516
|
-
- spec/factories/participant/policies.rb
|
517
|
-
- spec/factories/participant/rankings.rb
|
518
|
-
- spec/factories/participant/rankings/ranking.rb
|
519
|
-
- spec/factories/participant/roles.rb
|
520
|
-
- spec/factories/participant/roles/role.rb
|
521
|
-
- spec/factories/participant/totals.rb
|
522
|
-
- spec/factories/payment.rb
|
523
|
-
- spec/factories/permissions.rb
|
524
|
-
- spec/factories/person.rb
|
525
|
-
- spec/factories/person/addresses.rb
|
526
|
-
- spec/factories/person/email_addresses.rb
|
527
|
-
- spec/factories/person/phone_numbers.rb
|
528
|
-
- spec/factories/person/policies.rb
|
529
|
-
- spec/factories/phone.rb
|
530
|
-
- spec/factories/photo.rb
|
531
|
-
- spec/factories/photos.rb
|
532
|
-
- spec/factories/recurring_gift.rb
|
533
|
-
- spec/factories/researcher.rb
|
534
|
-
- spec/factories/response.rb
|
535
|
-
- spec/factories/search_event.rb
|
536
|
-
- spec/factories/search_fundraiser.rb
|
537
|
-
- spec/factories/search_kid.rb
|
538
|
-
- spec/factories/search_participant.rb
|
539
|
-
- spec/factories/search_team.rb
|
540
|
-
- spec/factories/shave_schedule.rb
|
541
|
-
- spec/factories/shave_schedule/time_selection_permissions.rb
|
542
|
-
- spec/factories/team.rb
|
543
|
-
- spec/factories/team/photos.rb
|
544
|
-
- spec/factories/team/rankings.rb
|
545
|
-
- spec/factories/team/rankings/ranking.rb
|
546
|
-
- spec/factories/team/totals.rb
|
547
|
-
- spec/factories/third_party_media.rb
|
548
|
-
- spec/factories/treatment_status.rb
|
549
|
-
- spec/factories/user.rb
|
550
|
-
- spec/factories/venue.rb
|
551
454
|
homepage:
|
552
455
|
licenses:
|
553
456
|
- MIT
|
@@ -560,7 +463,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
560
463
|
requirements:
|
561
464
|
- - ">="
|
562
465
|
- !ruby/object:Gem::Version
|
563
|
-
version:
|
466
|
+
version: 2.7.0
|
564
467
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
565
468
|
requirements:
|
566
469
|
- - ">"
|
@@ -571,101 +474,4 @@ rubygems_version: 3.1.6
|
|
571
474
|
signing_key:
|
572
475
|
specification_version: 4
|
573
476
|
summary: St. Baldrick's Foundation Ruby Client Library
|
574
|
-
test_files:
|
575
|
-
- lib/stbaldricks_factories.rb
|
576
|
-
- spec/factories/organization/addresses.rb
|
577
|
-
- spec/factories/organization/email_addresses.rb
|
578
|
-
- spec/factories/organization/phone_numbers.rb
|
579
|
-
- spec/factories/payment.rb
|
580
|
-
- spec/factories/fundraising_page.rb
|
581
|
-
- spec/factories/donation/participant.rb
|
582
|
-
- spec/factories/challenge.rb
|
583
|
-
- spec/factories/kid_institution.rb
|
584
|
-
- spec/factories/memorial/totals.rb
|
585
|
-
- spec/factories/memorial/photos.rb
|
586
|
-
- spec/factories/memorial/tribute.rb
|
587
|
-
- spec/factories/search_kid.rb
|
588
|
-
- spec/factories/contact.rb
|
589
|
-
- spec/factories/researcher.rb
|
590
|
-
- spec/factories/photos.rb
|
591
|
-
- spec/factories/challenger.rb
|
592
|
-
- spec/factories/name_pieces.rb
|
593
|
-
- spec/factories/milestone.rb
|
594
|
-
- spec/factories/person/policies.rb
|
595
|
-
- spec/factories/person/addresses.rb
|
596
|
-
- spec/factories/person/email_addresses.rb
|
597
|
-
- spec/factories/person/phone_numbers.rb
|
598
|
-
- spec/factories/participant/policies.rb
|
599
|
-
- spec/factories/participant/totals.rb
|
600
|
-
- spec/factories/participant/photos.rb
|
601
|
-
- spec/factories/participant/roles/role.rb
|
602
|
-
- spec/factories/participant/rankings/ranking.rb
|
603
|
-
- spec/factories/participant/rankings.rb
|
604
|
-
- spec/factories/participant/roles.rb
|
605
|
-
- spec/factories/donation.rb
|
606
|
-
- spec/factories/third_party_media.rb
|
607
|
-
- spec/factories/search_team.rb
|
608
|
-
- spec/factories/permissions.rb
|
609
|
-
- spec/factories/photo.rb
|
610
|
-
- spec/factories/collection.rb
|
611
|
-
- spec/factories/campaign.rb
|
612
|
-
- spec/factories/grant.rb
|
613
|
-
- spec/factories/location.rb
|
614
|
-
- spec/factories/email_address.rb
|
615
|
-
- spec/factories/disease.rb
|
616
|
-
- spec/factories/participant.rb
|
617
|
-
- spec/factories/kid.rb
|
618
|
-
- spec/factories/search_participant.rb
|
619
|
-
- spec/factories/event_supporter.rb
|
620
|
-
- spec/factories/page.rb
|
621
|
-
- spec/factories/message.rb
|
622
|
-
- spec/factories/response.rb
|
623
|
-
- spec/factories/search_event.rb
|
624
|
-
- spec/factories/event_application.rb
|
625
|
-
- spec/factories/fundraiser.rb
|
626
|
-
- spec/factories/team.rb
|
627
|
-
- spec/factories/memorial.rb
|
628
|
-
- spec/factories/diagnosis.rb
|
629
|
-
- spec/factories/team/totals.rb
|
630
|
-
- spec/factories/team/photos.rb
|
631
|
-
- spec/factories/team/rankings/ranking.rb
|
632
|
-
- spec/factories/team/rankings.rb
|
633
|
-
- spec/factories/newsletter_recipient.rb
|
634
|
-
- spec/factories/shave_schedule.rb
|
635
|
-
- spec/factories/organization.rb
|
636
|
-
- spec/factories/campaign/totals.rb
|
637
|
-
- spec/factories/lib/helpers.rb
|
638
|
-
- spec/factories/lib/faker_patch.rb
|
639
|
-
- spec/factories/error.rb
|
640
|
-
- spec/factories/donor.rb
|
641
|
-
- spec/factories/contact_group.rb
|
642
|
-
- spec/factories/recurring_gift.rb
|
643
|
-
- spec/factories/person.rb
|
644
|
-
- spec/factories/treatment_status.rb
|
645
|
-
- spec/factories/fundraiser/policies.rb
|
646
|
-
- spec/factories/fundraiser/totals.rb
|
647
|
-
- spec/factories/fundraiser/photos.rb
|
648
|
-
- spec/factories/venue.rb
|
649
|
-
- spec/factories/search_fundraiser.rb
|
650
|
-
- spec/factories/institution.rb
|
651
|
-
- spec/factories/grant_institution.rb
|
652
|
-
- spec/factories/address.rb
|
653
|
-
- spec/factories/phone.rb
|
654
|
-
- spec/factories/event/totals.rb
|
655
|
-
- spec/factories/event/photos.rb
|
656
|
-
- spec/factories/event/contacts/contact.rb
|
657
|
-
- spec/factories/event/contacts/name_pieces.rb
|
658
|
-
- spec/factories/event/coach_tracking/coaching_interactions.rb
|
659
|
-
- spec/factories/event/coach_tracking/proceeds.rb
|
660
|
-
- spec/factories/event/coach_tracking/plaque.rb
|
661
|
-
- spec/factories/event/coach_tracking.rb
|
662
|
-
- spec/factories/event/venue/location.rb
|
663
|
-
- spec/factories/event/venue/social.rb
|
664
|
-
- spec/factories/event/contacts.rb
|
665
|
-
- spec/factories/event/venue.rb
|
666
|
-
- spec/factories/fund.rb
|
667
|
-
- spec/factories/event.rb
|
668
|
-
- spec/factories/kid/custom_institution.rb
|
669
|
-
- spec/factories/shave_schedule/time_selection_permissions.rb
|
670
|
-
- spec/factories/user.rb
|
671
|
-
- spec/factories/kid_honor.rb
|
477
|
+
test_files: []
|
data/spec/factories/address.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :address, class: SBF::Client::Address do
|
3
|
-
skip_create
|
4
|
-
|
5
|
-
initialize_with do
|
6
|
-
new(attributes)
|
7
|
-
end
|
8
|
-
|
9
|
-
type { SBF::Client::Address::Type::HOME }
|
10
|
-
city { Faker::Address.ascii_city }
|
11
|
-
state { 'NE' }
|
12
|
-
country { 'US' }
|
13
|
-
end
|
14
|
-
end
|
data/spec/factories/campaign.rb
DELETED
data/spec/factories/challenge.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative 'lib/helpers'
|
2
|
-
|
3
|
-
FactoryBot.define do
|
4
|
-
factory :challenge, class: SBF::Client::Challenge do
|
5
|
-
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save }
|
6
|
-
|
7
|
-
initialize_with do
|
8
|
-
new(attributes)
|
9
|
-
end
|
10
|
-
|
11
|
-
status { SBF::Client::Challenge::Status::PENDING }
|
12
|
-
end_date { [Date.today + 30, Date.new(Date.today.year, 12, 31)].min }
|
13
|
-
|
14
|
-
after :build do |challenge, evaluator|
|
15
|
-
challenge.challenger = build(:challenger) if unpopulated?(evaluator, :challenger)
|
16
|
-
challenge.challengee = build(:challengee) if unpopulated?(evaluator, :challengee)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require_relative 'lib/helpers'
|
2
|
-
|
3
|
-
FactoryBot.define do
|
4
|
-
factory :_base_challenger, class: SBF::Client::Challenger do
|
5
|
-
to_create do |it|
|
6
|
-
raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save
|
7
|
-
end
|
8
|
-
|
9
|
-
initialize_with do
|
10
|
-
new(attributes)
|
11
|
-
end
|
12
|
-
|
13
|
-
after :build do |challenger, evaluator|
|
14
|
-
# TODO: Unable to move to to_create block, to_create block.
|
15
|
-
# Entity returns a DataNotProvidedError when referenced in
|
16
|
-
# the to_create block. Needs to be fixed when the data model
|
17
|
-
# is fixed.
|
18
|
-
if unpopulated?(evaluator, :entity)
|
19
|
-
event = build(:event)
|
20
|
-
participant = create(:shavee, event: event)
|
21
|
-
challenger.entity = participant.to_partial
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
factory :challenger, class: SBF::Client::Challenger, parent: :_base_challenger do
|
27
|
-
is_accepted { true }
|
28
|
-
end
|
29
|
-
|
30
|
-
factory :challengee, class: SBF::Client::Challenger, parent: :_base_challenger do
|
31
|
-
is_accepted { false }
|
32
|
-
end
|
33
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :collection, class: SBF::Client::EntityCollection do
|
3
|
-
skip_create
|
4
|
-
end
|
5
|
-
|
6
|
-
factory :collection_with_error, parent: :collection do
|
7
|
-
after :build do |collection, evaluator|
|
8
|
-
if evaluator.error
|
9
|
-
collection.add_errors(evaluator.error)
|
10
|
-
else
|
11
|
-
error = SBF::Client::ErrorEntity.new(code: 5007, type: 'BadRequest', details: 'Invalid Request')
|
12
|
-
collection.add_errors(error)
|
13
|
-
end
|
14
|
-
collection.errors_http_code = evaluator.http_code || 400
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/spec/factories/contact.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require_relative 'lib/helpers'
|
2
|
-
|
3
|
-
FactoryBot.define do
|
4
|
-
factory :contact, class: SBF::Client::CustomContact do
|
5
|
-
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save }
|
6
|
-
|
7
|
-
initialize_with do
|
8
|
-
new(attributes)
|
9
|
-
end
|
10
|
-
|
11
|
-
email { Faker::Internet.email }
|
12
|
-
contact_groups { [] }
|
13
|
-
|
14
|
-
after :build do |contact_group, evaluator|
|
15
|
-
contact_group.owner = build(:person) if unpopulated?(evaluator, :owner)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require_relative 'lib/helpers'
|
2
|
-
|
3
|
-
FactoryBot.define do
|
4
|
-
factory :contact_group, class: SBF::Client::ContactGroup do
|
5
|
-
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save }
|
6
|
-
|
7
|
-
initialize_with do
|
8
|
-
new(attributes)
|
9
|
-
end
|
10
|
-
|
11
|
-
display_name { random }
|
12
|
-
contacts { [] }
|
13
|
-
|
14
|
-
after :build do |contact_group, evaluator|
|
15
|
-
contact_group.owner = build(:person) if unpopulated?(evaluator, :owner)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/spec/factories/diagnosis.rb
DELETED
data/spec/factories/disease.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :disease, class: SBF::Client::Grant::Disease do
|
3
|
-
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save }
|
4
|
-
|
5
|
-
initialize_with do
|
6
|
-
new(attributes)
|
7
|
-
end
|
8
|
-
|
9
|
-
name { SecureRandom.hex }
|
10
|
-
end
|
11
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require_relative '../lib/helpers'
|
2
|
-
|
3
|
-
FactoryBot.define do
|
4
|
-
factory :full_donation_participant, class: SBF::Client::Donation::FullParticipant do
|
5
|
-
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save }
|
6
|
-
|
7
|
-
initialize_with do
|
8
|
-
new(attributes)
|
9
|
-
end
|
10
|
-
|
11
|
-
fundraising_goal { 100 }
|
12
|
-
shave_time { Time.now.to_s }
|
13
|
-
sequence(:display_name) { |n| "Display Name #{n}" }
|
14
|
-
model_type { 'person' }
|
15
|
-
|
16
|
-
after :build do |participant, evaluator|
|
17
|
-
participant.person = build(:person) if unpopulated?(evaluator, :person)
|
18
|
-
participant.send(:totals=, build(:participant_totals)) if unpopulated?(evaluator, :totals)
|
19
|
-
participant.send(:rankings=, build(:participant_rankings)) if unpopulated?(evaluator, :rankings)
|
20
|
-
participant.roles = build(:participant_roles) if unpopulated?(evaluator, :roles)
|
21
|
-
participant.send(:photos=, build(:participant_photos)) if unpopulated?(evaluator, :photos)
|
22
|
-
participant.event = build(:event) if unpopulated?(evaluator, :event)
|
23
|
-
participant.team = build(:team, event: participant.event) if unpopulated?(evaluator, :team)
|
24
|
-
participant.fundraising_page = build(:fundraising_page) if unpopulated?(evaluator, :fundraising_page)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
data/spec/factories/donation.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
require_relative 'lib/helpers'
|
2
|
-
|
3
|
-
FactoryBot.define do
|
4
|
-
factory :_donation, class: SBF::Client::FullDonation do
|
5
|
-
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save }
|
6
|
-
|
7
|
-
initialize_with do
|
8
|
-
new(attributes)
|
9
|
-
end
|
10
|
-
|
11
|
-
status { SBF::Client::Donation::Status::ACTIVE }
|
12
|
-
amount { rand(10..100) }
|
13
|
-
display_name { Faker::Name.name }
|
14
|
-
year { DateTime.now.year }
|
15
|
-
fund { nil }
|
16
|
-
memorial { nil }
|
17
|
-
end
|
18
|
-
|
19
|
-
factory :donation, class: SBF::Client::FullDonation, parent: :_donation do
|
20
|
-
after :build do |donation, evaluator|
|
21
|
-
donation.payment_details = build(:cc_payment) if unpopulated?(evaluator, :payment_details)
|
22
|
-
donation.donor = build(:person) if unpopulated?(evaluator, :donor)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
factory :cc_payment, class: SBF::Client::Payment::CreditCardDetails do
|
27
|
-
end
|
28
|
-
|
29
|
-
factory :cash_donation, class: SBF::Client::FullDonation, parent: :_donation do
|
30
|
-
status { SBF::Client::Donation::Status::PENDING }
|
31
|
-
how_created { SBF::Client::Donation::HowCreated::SUBMIT_CASH }
|
32
|
-
|
33
|
-
after :build do |donation, evaluator|
|
34
|
-
donation.payment_details = build(:cash_payment) if unpopulated?(evaluator, :payment_details)
|
35
|
-
donation.donor = build(:person, status: SBF::Client::Person::Status::PENDING) if unpopulated?(evaluator, :donor)
|
36
|
-
donation.submitter = build(:person) if unpopulated?(evaluator, :submitter)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
factory :cash_payment, class: SBF::Client::Payment::CashDetails do
|
41
|
-
end
|
42
|
-
|
43
|
-
factory :nonce_payment, class: SBF::Client::Payment::NonceDetails do
|
44
|
-
gateway { SBF::Client::Payment::Gateway::PAYMENTSPRING }
|
45
|
-
nonce { fake_valid_nonce }
|
46
|
-
device_data { random }
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
require 'httparty'
|
51
|
-
require 'uri'
|
52
|
-
def fake_valid_nonce
|
53
|
-
url = "#{ENV['PAYMENTSPRING_BASE_URL']}/tokens/jsonp"
|
54
|
-
pub_key = ENV['PAYMENTSPRING_PUBLIC_KEY']
|
55
|
-
data = {
|
56
|
-
public_api_key: pub_key,
|
57
|
-
card_number: '4111111111111111',
|
58
|
-
card_exp_month: '1',
|
59
|
-
card_exp_year: Date.today.year + 1,
|
60
|
-
card_owner_name: 'John%20Doe'
|
61
|
-
}
|
62
|
-
|
63
|
-
uri = URI.parse("#{url}?#{data.to_query}")
|
64
|
-
response = HTTParty.get(uri, headers: {'Accept' => 'application/json'})
|
65
|
-
raise 'Error retrieving valid nonce' unless response.ok?
|
66
|
-
|
67
|
-
response.parsed_response['id']
|
68
|
-
end
|
data/spec/factories/donor.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :donor, class: SBF::Client::Donor do
|
3
|
-
skip_create
|
4
|
-
|
5
|
-
initialize_with do
|
6
|
-
new(attributes)
|
7
|
-
end
|
8
|
-
|
9
|
-
sequence(:donor_name) { |n| "donor name #{n}" }
|
10
|
-
amount { 100 }
|
11
|
-
donation_created_at { DateTime.now.to_s }
|
12
|
-
end
|
13
|
-
end
|
data/spec/factories/error.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :event_coach_tracking_coaching_interactions, class: SBF::Client::Event::CoachTracking::CoachingInteractions do
|
3
|
-
skip_create
|
4
|
-
|
5
|
-
initialize_with do
|
6
|
-
new(attributes)
|
7
|
-
end
|
8
|
-
|
9
|
-
introductory_conversation_date { Time.now.to_s }
|
10
|
-
post_event_conversation_date { Time.now.to_s }
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :event_coach_tracking_plaque, class: SBF::Client::Event::CoachTracking::Plaque do
|
3
|
-
skip_create
|
4
|
-
|
5
|
-
initialize_with do
|
6
|
-
new(attributes)
|
7
|
-
end
|
8
|
-
|
9
|
-
sequence(:issued_to) { |n| "Issued To: #{n}" }
|
10
|
-
sent_date { Time.now.to_s }
|
11
|
-
end
|
12
|
-
end
|