stbaldricks 11.0.0 → 12.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stbaldricks/endpoints/participant.rb +0 -8
- data/lib/stbaldricks/entities/participant.rb +0 -1
- data/lib/stbaldricks/version.rb +1 -1
- data/spec/factories/event.rb +25 -0
- metadata +87 -87
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89ae08fac5ab8603823a5dd7f870d42a22f367a59f81b27d1421b88f0b01919b
|
4
|
+
data.tar.gz: 665ceaf8338d0d2144f9554c7ed40500b7733576524edfd74470cd2fab0579b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4268e9f501fd20e69e415f21ec81641585c37929b03df7bc88754a33f66a0d31d8350d15dd36a836909478a3706e7f8e4d38f42509df0bea26a72b917be386e7
|
7
|
+
data.tar.gz: 6f79c3e9ca6aaa870444cbe667718cc523e9f43caf06f0e50214e4e27fe08094c4a57fd6f74efb48a082c06749e609f2db035b84671c2c2550f3fcd69cc955b7
|
@@ -46,14 +46,6 @@ module SBF
|
|
46
46
|
SBF::Client::Api::Response.new(http_code: response.code, data: data, error: error)
|
47
47
|
end
|
48
48
|
|
49
|
-
def delete_role(participant_id, role)
|
50
|
-
response = SBF::Client::Api::Request.post_request("#{base_uri}/delete_role", participant_id: participant_id, role: role)
|
51
|
-
|
52
|
-
error = SBF::Client::ErrorEntity.new(JSON.parse(response.body).symbolize!) unless ok?(response)
|
53
|
-
|
54
|
-
SBF::Client::Api::Response.new(http_code: response.code, data: nil, error: error)
|
55
|
-
end
|
56
|
-
|
57
49
|
def move_to_different_event(participant_id, new_event_id)
|
58
50
|
response = SBF::Client::Api::Request.post_request("#{base_uri}/move_to_different_event",
|
59
51
|
id: participant_id, new_event_id: new_event_id)
|
data/lib/stbaldricks/version.rb
CHANGED
data/spec/factories/event.rb
CHANGED
@@ -38,4 +38,29 @@ FactoryBot.define do
|
|
38
38
|
activity { random }
|
39
39
|
sort_order { 1 }
|
40
40
|
end
|
41
|
+
factory :past_event, class: SBF::Client::FullEvent do
|
42
|
+
to_create { |it| raise "Failed to create #{it.class}: #{it.errors.details}" unless it.create }
|
43
|
+
|
44
|
+
initialize_with do
|
45
|
+
new(attributes)
|
46
|
+
end
|
47
|
+
|
48
|
+
id { rand(1000) }
|
49
|
+
event_title { "#{Faker::Team.name} #{random}" }
|
50
|
+
year { Time.now.year - 5 }
|
51
|
+
date { Time.now.to_s }
|
52
|
+
fund_relationship_type { 'no_association' }
|
53
|
+
status { 'active' }
|
54
|
+
type { 'head_shaving' }
|
55
|
+
sub_type { 'community' }
|
56
|
+
how_created { 'admin_control_panel' }
|
57
|
+
fundraising_goal { rand(20) * 5000 }
|
58
|
+
is_private { false }
|
59
|
+
|
60
|
+
after :build do |event, evaluator|
|
61
|
+
event.venue = build(:event_venue) if unpopulated?(evaluator, :venue)
|
62
|
+
event.contacts = build(:event_contacts) if unpopulated?(evaluator, :contacts)
|
63
|
+
event.organizers = [build(:lead_organizer, person: build(:person))] if unpopulated?(evaluator, :organizers)
|
64
|
+
end
|
65
|
+
end
|
41
66
|
end
|
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:
|
4
|
+
version: 12.0.0.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -554,9 +554,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
554
554
|
version: '0'
|
555
555
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
556
556
|
requirements:
|
557
|
-
- - "
|
557
|
+
- - ">"
|
558
558
|
- !ruby/object:Gem::Version
|
559
|
-
version:
|
559
|
+
version: 1.3.1
|
560
560
|
requirements: []
|
561
561
|
rubygems_version: 3.0.3.1
|
562
562
|
signing_key:
|
@@ -564,99 +564,99 @@ specification_version: 4
|
|
564
564
|
summary: St. Baldrick's Foundation Ruby Client Library
|
565
565
|
test_files:
|
566
566
|
- lib/stbaldricks_factories.rb
|
567
|
-
- spec/factories/
|
568
|
-
- spec/factories/
|
569
|
-
- spec/factories/
|
570
|
-
- spec/factories/
|
571
|
-
- spec/factories/fundraising_page.rb
|
572
|
-
- spec/factories/donation/participant.rb
|
573
|
-
- spec/factories/challenge.rb
|
567
|
+
- spec/factories/photo.rb
|
568
|
+
- spec/factories/participant.rb
|
569
|
+
- spec/factories/search_team.rb
|
570
|
+
- spec/factories/fund.rb
|
574
571
|
- spec/factories/kid_institution.rb
|
575
|
-
- spec/factories/
|
576
|
-
- spec/factories/
|
577
|
-
- spec/factories/
|
578
|
-
- spec/factories/
|
579
|
-
- spec/factories/
|
580
|
-
- spec/factories/
|
581
|
-
- spec/factories/
|
572
|
+
- spec/factories/phone.rb
|
573
|
+
- spec/factories/diagnosis.rb
|
574
|
+
- spec/factories/location.rb
|
575
|
+
- spec/factories/event_application.rb
|
576
|
+
- spec/factories/search_event.rb
|
577
|
+
- spec/factories/shave_schedule/time_selection_permissions.rb
|
578
|
+
- spec/factories/collection.rb
|
579
|
+
- spec/factories/event.rb
|
582
580
|
- spec/factories/challenger.rb
|
583
|
-
- spec/factories/
|
584
|
-
- spec/factories/
|
585
|
-
- spec/factories/
|
586
|
-
- spec/factories/
|
587
|
-
- spec/factories/
|
588
|
-
- spec/factories/
|
589
|
-
- spec/factories/
|
581
|
+
- spec/factories/campaign/totals.rb
|
582
|
+
- spec/factories/kid_honor.rb
|
583
|
+
- spec/factories/response.rb
|
584
|
+
- spec/factories/grant_institution.rb
|
585
|
+
- spec/factories/organization.rb
|
586
|
+
- spec/factories/researcher.rb
|
587
|
+
- spec/factories/treatment_status.rb
|
588
|
+
- spec/factories/event/totals.rb
|
589
|
+
- spec/factories/event/contacts.rb
|
590
|
+
- spec/factories/event/photos.rb
|
591
|
+
- spec/factories/event/venue/location.rb
|
592
|
+
- spec/factories/event/venue/social.rb
|
593
|
+
- spec/factories/event/coach_tracking.rb
|
594
|
+
- spec/factories/event/venue.rb
|
595
|
+
- spec/factories/event/coach_tracking/coaching_interactions.rb
|
596
|
+
- spec/factories/event/coach_tracking/proceeds.rb
|
597
|
+
- spec/factories/event/coach_tracking/plaque.rb
|
598
|
+
- spec/factories/event/contacts/name_pieces.rb
|
599
|
+
- spec/factories/event/contacts/contact.rb
|
600
|
+
- spec/factories/fundraiser/totals.rb
|
601
|
+
- spec/factories/fundraiser/policies.rb
|
602
|
+
- spec/factories/fundraiser/photos.rb
|
603
|
+
- spec/factories/shave_schedule.rb
|
604
|
+
- spec/factories/event_supporter.rb
|
590
605
|
- spec/factories/participant/totals.rb
|
591
|
-
- spec/factories/participant/
|
606
|
+
- spec/factories/participant/policies.rb
|
592
607
|
- spec/factories/participant/roles/role.rb
|
593
|
-
- spec/factories/participant/
|
608
|
+
- spec/factories/participant/photos.rb
|
594
609
|
- spec/factories/participant/rankings.rb
|
610
|
+
- spec/factories/participant/rankings/ranking.rb
|
595
611
|
- spec/factories/participant/roles.rb
|
596
|
-
- spec/factories/
|
597
|
-
- spec/factories/
|
598
|
-
- spec/factories/
|
599
|
-
- spec/factories/
|
600
|
-
- spec/factories/
|
601
|
-
- spec/factories/
|
602
|
-
- spec/factories/campaign.rb
|
603
|
-
- spec/factories/grant.rb
|
604
|
-
- spec/factories/location.rb
|
605
|
-
- spec/factories/email_address.rb
|
606
|
-
- spec/factories/disease.rb
|
607
|
-
- spec/factories/participant.rb
|
608
|
-
- spec/factories/kid.rb
|
612
|
+
- spec/factories/error.rb
|
613
|
+
- spec/factories/recurring_gift.rb
|
614
|
+
- spec/factories/challenge.rb
|
615
|
+
- spec/factories/address.rb
|
616
|
+
- spec/factories/kid/custom_institution.rb
|
617
|
+
- spec/factories/person.rb
|
609
618
|
- spec/factories/search_participant.rb
|
610
|
-
- spec/factories/
|
611
|
-
- spec/factories/
|
612
|
-
- spec/factories/
|
613
|
-
- spec/factories/response.rb
|
614
|
-
- spec/factories/search_event.rb
|
615
|
-
- spec/factories/event_application.rb
|
616
|
-
- spec/factories/fundraiser.rb
|
617
|
-
- spec/factories/team.rb
|
618
|
-
- spec/factories/memorial.rb
|
619
|
-
- spec/factories/diagnosis.rb
|
619
|
+
- spec/factories/milestone.rb
|
620
|
+
- spec/factories/fundraising_page.rb
|
621
|
+
- spec/factories/photos.rb
|
620
622
|
- spec/factories/team/totals.rb
|
621
623
|
- spec/factories/team/photos.rb
|
622
|
-
- spec/factories/team/rankings/ranking.rb
|
623
624
|
- spec/factories/team/rankings.rb
|
624
|
-
- spec/factories/
|
625
|
-
- spec/factories/
|
626
|
-
- spec/factories/
|
627
|
-
- spec/factories/
|
628
|
-
- spec/factories/
|
629
|
-
- spec/factories/
|
630
|
-
- spec/factories/
|
625
|
+
- spec/factories/team/rankings/ranking.rb
|
626
|
+
- spec/factories/donation.rb
|
627
|
+
- spec/factories/memorial.rb
|
628
|
+
- spec/factories/institution.rb
|
629
|
+
- spec/factories/memorial/totals.rb
|
630
|
+
- spec/factories/memorial/tribute.rb
|
631
|
+
- spec/factories/memorial/photos.rb
|
632
|
+
- spec/factories/person/policies.rb
|
633
|
+
- spec/factories/person/addresses.rb
|
634
|
+
- spec/factories/person/phone_numbers.rb
|
635
|
+
- spec/factories/person/email_addresses.rb
|
631
636
|
- spec/factories/donor.rb
|
632
|
-
- spec/factories/
|
633
|
-
- spec/factories/
|
634
|
-
- spec/factories/
|
635
|
-
- spec/factories/
|
636
|
-
- spec/factories/
|
637
|
-
- spec/factories/
|
638
|
-
- spec/factories/
|
637
|
+
- spec/factories/kid.rb
|
638
|
+
- spec/factories/name_pieces.rb
|
639
|
+
- spec/factories/team.rb
|
640
|
+
- spec/factories/user.rb
|
641
|
+
- spec/factories/disease.rb
|
642
|
+
- spec/factories/search_kid.rb
|
643
|
+
- spec/factories/page.rb
|
639
644
|
- spec/factories/venue.rb
|
645
|
+
- spec/factories/organization/addresses.rb
|
646
|
+
- spec/factories/organization/phone_numbers.rb
|
647
|
+
- spec/factories/organization/email_addresses.rb
|
648
|
+
- spec/factories/lib/faker_patch.rb
|
649
|
+
- spec/factories/lib/helpers.rb
|
650
|
+
- spec/factories/newsletter_recipient.rb
|
651
|
+
- spec/factories/payment.rb
|
652
|
+
- spec/factories/contact.rb
|
653
|
+
- spec/factories/message.rb
|
640
654
|
- spec/factories/search_fundraiser.rb
|
641
|
-
- spec/factories/
|
642
|
-
- spec/factories/
|
643
|
-
- spec/factories/
|
644
|
-
- spec/factories/
|
645
|
-
- spec/factories/
|
646
|
-
- spec/factories/
|
647
|
-
- spec/factories/
|
648
|
-
- spec/factories/
|
649
|
-
- spec/factories/event/coach_tracking/coaching_interactions.rb
|
650
|
-
- spec/factories/event/coach_tracking/proceeds.rb
|
651
|
-
- spec/factories/event/coach_tracking/plaque.rb
|
652
|
-
- spec/factories/event/coach_tracking.rb
|
653
|
-
- spec/factories/event/venue/location.rb
|
654
|
-
- spec/factories/event/venue/social.rb
|
655
|
-
- spec/factories/event/contacts.rb
|
656
|
-
- spec/factories/event/venue.rb
|
657
|
-
- spec/factories/fund.rb
|
658
|
-
- spec/factories/event.rb
|
659
|
-
- spec/factories/kid/custom_institution.rb
|
660
|
-
- spec/factories/shave_schedule/time_selection_permissions.rb
|
661
|
-
- spec/factories/user.rb
|
662
|
-
- spec/factories/kid_honor.rb
|
655
|
+
- spec/factories/third_party_media.rb
|
656
|
+
- spec/factories/donation/participant.rb
|
657
|
+
- spec/factories/grant.rb
|
658
|
+
- spec/factories/fundraiser.rb
|
659
|
+
- spec/factories/contact_group.rb
|
660
|
+
- spec/factories/email_address.rb
|
661
|
+
- spec/factories/permissions.rb
|
662
|
+
- spec/factories/campaign.rb
|