stbaldricks 10.11.1 → 11.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/entities/participant.rb +8 -4
- data/lib/stbaldricks/entities/search.rb +2 -1
- data/lib/stbaldricks/enums/permission.rb +9 -4
- data/lib/stbaldricks/version.rb +1 -1
- data/spec/factories/participant/roles/role.rb +17 -13
- data/spec/factories/participant/roles.rb +4 -2
- data/spec/factories/participant.rb +8 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 562bcfa37c3a283b6723b1600f30a2682e3defa5f51969430d811f61f298e40d
|
4
|
+
data.tar.gz: 2822690a29650faeb9bdd620a9be7f405f9a0c6e5ba23df601a4a83ffb7eebb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 622ddc68b26bf0654015fdde2635ef4eea3f860dfc5665157f18212c2e27cc5d1f170680c96ae000c4541301bd9445c9b6ede8af0dc8b8f2a5a894e16fa00c15
|
7
|
+
data.tar.gz: 617a20d29557aa5afa81600bcc73df6d83ef1f9237d32711890ddd6f7ca6999cab5354e39bd3b1fcce112cbc636dd04accabcf67497ec49f618ca2782f673281
|
@@ -118,11 +118,13 @@ module SBF
|
|
118
118
|
LEAD_TREASURER = 'lead_treasurer'.freeze
|
119
119
|
LEAD_ORGANIZER = 'lead_organizer'.freeze
|
120
120
|
BARBER_COORDINATOR = 'barber_coordinator'.freeze
|
121
|
-
|
121
|
+
EVENT_SUPPORT_VOLUNTEER = 'event_support_volunteer'.freeze
|
122
|
+
INDIVIDUAL_FUNDRAISER = 'individual_fundraiser'.freeze
|
122
123
|
end
|
123
124
|
|
124
125
|
CORE_COMMITTEE_TYPES = [Type::ORGANIZER, Type::TREASURER, Type::BARBER_COORDINATOR, Type::SHAVEE_RECRUITER].freeze
|
125
|
-
|
126
|
+
TYPES_WITHOUT_LEADS = [Type::SHAVEE, Type::EVENT_SUPPORT_VOLUNTEER, Type::INDIVIDUAL_FUNDRAISER, Type::SHAVEE_RECRUITER, Type::TEAM_CAPTAIN,
|
127
|
+
Type::BARBER_COORDINATOR, Type::BARBER, Type::TREASURER, Type::ORGANIZER].freeze
|
126
128
|
class Role < SBF::Client::BaseEntity
|
127
129
|
attr_accessor :status
|
128
130
|
|
@@ -168,14 +170,16 @@ module SBF
|
|
168
170
|
attr_accessor :requested_shavee_packet
|
169
171
|
end
|
170
172
|
|
171
|
-
class
|
173
|
+
class EventSupportVolunteer < SBF::Client::Participant::Roles::Role; end
|
174
|
+
class IndividualFundraiser < SBF::Client::Participant::Roles::Role; end
|
172
175
|
class ShaveeRecruiter < SBF::Client::Participant::Roles::Role; end
|
173
176
|
class TeamCaptain < SBF::Client::Participant::Roles::Role; end
|
174
177
|
class BarberCoordinator < SBF::Client::Participant::Roles::Role; end
|
175
178
|
class Treasurer < SBF::Client::Participant::Roles::LeadRole; end
|
176
179
|
|
177
180
|
entity_attr_accessor :shavee, 'SBF::Client::Participant::Roles::Shavee'
|
178
|
-
entity_attr_accessor :
|
181
|
+
entity_attr_accessor :event_support_volunteer, 'SBF::Client::Participant::Roles::EventSupportVolunteer'
|
182
|
+
entity_attr_accessor :individual_fundraiser, 'SBF::Client::Participant::Roles::IndividualFundraiser'
|
179
183
|
entity_attr_accessor :barber_coordinator, 'SBF::Client::Participant::Roles::BarberCoordinator'
|
180
184
|
entity_attr_accessor :shavee_recruiter, 'SBF::Client::Participant::Roles::ShaveeRecruiter'
|
181
185
|
entity_attr_accessor :team_captain, 'SBF::Client::Participant::Roles::TeamCaptain'
|
@@ -31,7 +31,7 @@ module SBF
|
|
31
31
|
EVENT_ADD_SUPPORTERS = 209
|
32
32
|
EVENT_DELETE_SUPPORTERS = 210
|
33
33
|
EVENT_MANAGE_PARTICIPANTS = 211
|
34
|
-
|
34
|
+
EVENT_MANAGE_INDIVIDUAL_FUNDRAISERS = 212
|
35
35
|
EVENT_MANAGE_KIDS = 213
|
36
36
|
EVENT_ADD_KID = 214
|
37
37
|
EVENT_DELETE_KID = 215
|
@@ -41,13 +41,15 @@ module SBF
|
|
41
41
|
EVENT_MASS_PASSWORD_RESET = 219
|
42
42
|
EVENT_FAST_REGISTRATION = 220
|
43
43
|
EVENT_DELETE_EVENT = 221
|
44
|
+
EVENT_VIEW_EVENT_PERFORMANCE = 222
|
45
|
+
EVENT_MANAGE_EVENT_SUPPORT_VOLUNTEERS = 223
|
44
46
|
|
45
47
|
# text descriptions found in LookupUtility
|
46
48
|
EVENT_MEMBER_UPDATE_EVENT_INFORMATION = 300
|
47
49
|
EVENT_MEMBER_ACTIVITIES = 301
|
48
50
|
EVENT_MEMBER_PHOTO_GALLERY = 302
|
49
51
|
EVENT_MEMBER_SUPPORTERS = 303
|
50
|
-
|
52
|
+
EVENT_MEMBER_MANAGE_INDIVIDUAL_FUNDRAISERS_AND_ORGANIZERS = 305
|
51
53
|
EVENT_MEMBER_MANAGE_HONORED_KIDS_WITH_CANCER = 306
|
52
54
|
EVENT_MEMBER_VIEW_FUNDRAISING_REPORTS = 307
|
53
55
|
EVENT_MEMBER_DOWNLOAD_EVENT_PLANNING_MATERIALS = 308
|
@@ -59,6 +61,7 @@ module SBF
|
|
59
61
|
EVENT_MEMBER_VIEW_TEAM_TOTALS_LIST = 314
|
60
62
|
EVENT_MEMBER_COMMUNICATE = 315
|
61
63
|
EVENT_MEMBER_FAST_DONATION = 316
|
64
|
+
EVENT_MEMBER_MANAGE_EVENT_SUPPORT_VOLUNTEERS_AND_ORGANIZERS = 317
|
62
65
|
|
63
66
|
# Participant Role Permissions
|
64
67
|
EVENT_ORGANIZER = 1905
|
@@ -153,7 +156,8 @@ module SBF
|
|
153
156
|
EVENT_ADD_SUPPORTERS => :EVENT_ADD_SUPPORTERS,
|
154
157
|
EVENT_DELETE_SUPPORTERS => :EVENT_DELETE_SUPPORTERS,
|
155
158
|
EVENT_MANAGE_PARTICIPANTS => :EVENT_MANAGE_PARTICIPANTS,
|
156
|
-
|
159
|
+
EVENT_MANAGE_INDIVIDUAL_FUNDRAISERS => :EVENT_MANAGE_INDIVIDUAL_FUNDRAISERS,
|
160
|
+
EVENT_MANAGE_EVENT_SUPPORT_VOLUNTEERS => :EVENT_MANAGE_EVENT_SUPPORT_VOLUNTEERS,
|
157
161
|
EVENT_MANAGE_KIDS => :EVENT_MANAGE_KIDS,
|
158
162
|
EVENT_ADD_KID => :EVENT_ADD_KID,
|
159
163
|
EVENT_DELETE_KID => :EVENT_DELETE_KID,
|
@@ -167,7 +171,8 @@ module SBF
|
|
167
171
|
EVENT_MEMBER_ACTIVITIES => :EVENT_MEMBER_ACTIVITIES,
|
168
172
|
EVENT_MEMBER_PHOTO_GALLERY => :EVENT_MEMBER_PHOTO_GALLERY,
|
169
173
|
EVENT_MEMBER_SUPPORTERS => :EVENT_MEMBER_SUPPORTERS,
|
170
|
-
|
174
|
+
EVENT_MEMBER_MANAGE_INDIVIDUAL_FUNDRAISERS_AND_ORGANIZERS => :EVENT_MEMBER_MANAGE_INDIVIDUAL_FUNDRAISERS_AND_ORGANIZERS,
|
175
|
+
EVENT_MEMBER_MANAGE_EVENT_SUPPORT_VOLUNTEERS_AND_ORGANIZERS => :EVENT_MEMBER_MANAGE_EVENT_SUPPORT_VOLUNTEERS_AND_ORGANIZERS,
|
171
176
|
EVENT_MEMBER_MANAGE_HONORED_KIDS_WITH_CANCER => :EVENT_MEMBER_MANAGE_HONORED_KIDS_WITH_CANCER,
|
172
177
|
EVENT_MEMBER_VIEW_FUNDRAISING_REPORTS => :EVENT_MEMBER_VIEW_FUNDRAISING_REPORTS,
|
173
178
|
EVENT_MEMBER_DOWNLOAD_EVENT_PLANNING_MATERIALS => :EVENT_MEMBER_DOWNLOAD_EVENT_PLANNING_MATERIALS,
|
data/lib/stbaldricks/version.rb
CHANGED
@@ -10,10 +10,23 @@ FactoryBot.define do
|
|
10
10
|
|
11
11
|
after :build do |role, evaluator|
|
12
12
|
role.status = SBF::Client::Participant::Roles::Status::ACTIVE if unpopulated?(evaluator, :status)
|
13
|
+
role.requested_shavee_packet = false if unpopulated?(evaluator, :requested_shavee_packet)
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
16
|
-
factory :
|
17
|
+
factory :participant_roles_event_support_volunteer, class: SBF::Client::Participant::Roles::EventSupportVolunteer do
|
18
|
+
skip_create
|
19
|
+
|
20
|
+
initialize_with do
|
21
|
+
new(attributes)
|
22
|
+
end
|
23
|
+
|
24
|
+
after :build do |role, evaluator|
|
25
|
+
role.status = SBF::Client::Participant::Roles::Status::ACTIVE if unpopulated?(evaluator, :status)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
factory :participant_roles_individual_fundraiser, class: SBF::Client::Participant::Roles::IndividualFundraiser do
|
17
30
|
skip_create
|
18
31
|
|
19
32
|
initialize_with do
|
@@ -70,6 +83,7 @@ FactoryBot.define do
|
|
70
83
|
|
71
84
|
after :build do |role, evaluator|
|
72
85
|
role.status = SBF::Client::Participant::Roles::Status::ACTIVE if unpopulated?(evaluator, :status)
|
86
|
+
role.policies = build(:participant_roles_organizer_role_policies) if unpopulated?(evaluator, :policies)
|
73
87
|
end
|
74
88
|
end
|
75
89
|
|
@@ -119,19 +133,9 @@ FactoryBot.define do
|
|
119
133
|
|
120
134
|
status { SBF::Client::Participant::Roles::Status::ACTIVE }
|
121
135
|
is_lead { true }
|
122
|
-
end
|
123
|
-
|
124
|
-
factory :participant_roles_organizer_role, class: SBF::Client::Participant::Roles::Organizer do
|
125
|
-
skip_create
|
126
|
-
|
127
|
-
initialize_with do
|
128
|
-
new(attributes)
|
129
|
-
end
|
130
|
-
|
131
|
-
status { SBF::Client::Participant::Roles::Status::ACTIVE }
|
132
136
|
|
133
|
-
after :build do |organizer|
|
134
|
-
organizer.policies = build(:participant_roles_organizer_role_policies)
|
137
|
+
after :build do |organizer, evaluator|
|
138
|
+
organizer.policies = build(:participant_roles_organizer_role_policies) if unpopulated?(evaluator, :policies)
|
135
139
|
end
|
136
140
|
end
|
137
141
|
|
@@ -8,7 +8,8 @@ FactoryBot.define do
|
|
8
8
|
|
9
9
|
transient do
|
10
10
|
shavee { true }
|
11
|
-
|
11
|
+
event_support_volunteer { nil }
|
12
|
+
individual_fundraiser { nil }
|
12
13
|
shavee_recruiter { nil }
|
13
14
|
team_captain { nil }
|
14
15
|
barber_coordinator { nil }
|
@@ -21,7 +22,8 @@ FactoryBot.define do
|
|
21
22
|
|
22
23
|
after :build do |roles, evaluator|
|
23
24
|
roles.shavee = build(:participant_roles_shavee) if evaluator.shavee
|
24
|
-
roles.
|
25
|
+
roles.event_support_volunteer = build(:participant_roles_event_support_volunteer) if evaluator.event_support_volunteer
|
26
|
+
roles.individual_fundraiser = build(:participant_roles_individual_fundraiser) if evaluator.individual_fundraiser
|
25
27
|
roles.shavee_recruiter = build(:participant_roles_shavee_recruiter) if evaluator.shavee_recruiter
|
26
28
|
roles.team_captain = build(:participant_roles_team_captain) if evaluator.team_captain
|
27
29
|
roles.barber_coordinator = build(:participant_roles_barber_coordinator) if evaluator.barber_coordinator
|
@@ -81,9 +81,15 @@ FactoryBot.define do
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
factory :
|
84
|
+
factory :event_support_volunteer, class: SBF::Client::FullParticipant, parent: :participant do
|
85
85
|
after :build do |participant, evaluator|
|
86
|
-
participant.roles = build(:participant_roles,
|
86
|
+
participant.roles = build(:participant_roles, event_support_volunteer: true, shavee: false) if unpopulated?(evaluator, :roles)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
factory :individual_fundraiser, class: SBF::Client::FullParticipant, parent: :participant do
|
91
|
+
after :build do |participant, evaluator|
|
92
|
+
participant.roles = build(:participant_roles, individual_fundraiser: true, shavee: false) if unpopulated?(evaluator, :roles)
|
87
93
|
end
|
88
94
|
end
|
89
95
|
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: 11.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-08-
|
11
|
+
date: 2021-08-25 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:
|