stbaldricks 10.11.0.alpha.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7e922027f379bb0daed8cb0dfc6b0fc910caba47a638ebb04365918bc2b854d
4
- data.tar.gz: de7100080e3e55fe2629de95060aee2b4ee3af6a20e4280274711f389d8c84cf
3
+ metadata.gz: 562bcfa37c3a283b6723b1600f30a2682e3defa5f51969430d811f61f298e40d
4
+ data.tar.gz: 2822690a29650faeb9bdd620a9be7f405f9a0c6e5ba23df601a4a83ffb7eebb6
5
5
  SHA512:
6
- metadata.gz: bc9af9d4a2c5c3a224e22de905876a1dea9ca6f2324e7abcd426ce99bd51ae22e28afb37af4fa9480245ec7bad674cb6a0d0cdc3dea5944826abf9a865b4b0f5
7
- data.tar.gz: 342051ababf300d23df163f9b758463225db4c01764ef19547fdadd2c02a86b68621556607593b4432785f765263046f8a0792d0aef657c12bd415e02d6c9599
6
+ metadata.gz: 622ddc68b26bf0654015fdde2635ef4eea3f860dfc5665157f18212c2e27cc5d1f170680c96ae000c4541301bd9445c9b6ede8af0dc8b8f2a5a894e16fa00c15
7
+ data.tar.gz: 617a20d29557aa5afa81600bcc73df6d83ef1f9237d32711890ddd6f7ca6999cab5354e39bd3b1fcce112cbc636dd04accabcf67497ec49f618ca2782f673281
@@ -22,7 +22,7 @@ module SBF
22
22
  # NOTE: If you add another attribute, be sure to mock it out in `configure :test` of app.rb
23
23
 
24
24
  # Attempts to call the method on the cached configuration object
25
- # rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing
25
+ # rubocop:disable Style/MissingRespondToMissing
26
26
  def self.method_missing(method_name, *arguments, &block)
27
27
  # The first time a missing method is called, call reload to make sure the instance has been populated
28
28
  unless @_loaded
@@ -35,7 +35,7 @@ module SBF
35
35
 
36
36
  super(method_name, *arguments, &block)
37
37
  end
38
- # rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing
38
+ # rubocop:enable Style/MissingRespondToMissing
39
39
  end
40
40
  end
41
41
  end
@@ -390,7 +390,8 @@ module SBF
390
390
 
391
391
  # Creates a private method which resolves the class type based on the class mappings and the value
392
392
  # rubocop:disable Metrics/MethodLength
393
- def self.add_class_selector_method(attribute, class_mappings)
393
+ # rubocop:todo Metrics/PerceivedComplexity
394
+ def self.add_class_selector_method(attribute, class_mappings) # rubocop:todo Metrics/CyclomaticComplexity
394
395
  method_name = :"select_#{attribute}_class"
395
396
 
396
397
  define_singleton_method(method_name) do |value|
@@ -451,6 +452,7 @@ module SBF
451
452
 
452
453
  private_class_method method_name
453
454
  end
455
+ # rubocop:enable Metrics/PerceivedComplexity
454
456
  # rubocop:enable Metrics/MethodLength
455
457
  private_class_method :add_class_selector_method
456
458
 
@@ -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
- VOLUNTEER = 'volunteer'.freeze
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 Volunteer < SBF::Client::Participant::Roles::Role; end
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 :volunteer, 'SBF::Client::Participant::Roles::Volunteer'
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'
@@ -33,7 +33,8 @@ module SBF
33
33
  LEAD_TREASURER = 8
34
34
  LEAD_ORGANIZER = 9
35
35
  BARBER_COORDINATOR = 10
36
- VOLUNTEER = 99
36
+ EVENT_SUPPORT_VOLUNTEER = 98
37
+ INDIVIDUAL_FUNDRAISER = 99
37
38
  end
38
39
  end
39
40
 
@@ -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
- EVENT_MANAGE_VOLUNTEERS = 212
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
- EVENT_MEMBER_MANAGE_VOLUNTEERS_AND_ORGANIZERS = 305
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
- EVENT_MANAGE_VOLUNTEERS => :EVENT_MANAGE_VOLUNTEERS,
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
- EVENT_MEMBER_MANAGE_VOLUNTEERS_AND_ORGANIZERS => :EVENT_MEMBER_MANAGE_VOLUNTEERS_AND_ORGANIZERS,
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,
@@ -10,11 +10,11 @@ module SBF
10
10
  REQUIRED_METHODS = %i(debug info warn error fatal unknown add level)
11
11
  # rubocop:enable Style/MutableConstant
12
12
 
13
- # rubocop:disable Style/MethodMissingSuper, Style/MissingRespondToMissing
13
+ # rubocop:disable Style/MissingRespondToMissing
14
14
  def self.method_missing(sym, *args, &block)
15
15
  SBF::Client::Configuration.logger.send(sym, *args, &block)
16
16
  end
17
- # rubocop:enable Style/MethodMissingSuper, Style/MissingRespondToMissing
17
+ # rubocop:enable Style/MissingRespondToMissing
18
18
  end
19
19
  end
20
20
  end
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '10.11.0.alpha.1'.freeze
3
+ VERSION = '11.0.0.alpha.1'.freeze
4
4
  end
5
5
  end
@@ -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 :participant_roles_volunteer, class: SBF::Client::Participant::Roles::Volunteer do
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
- volunteer { nil }
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.volunteer = build(:participant_roles_volunteer) if evaluator.volunteer
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 :volunteer, class: SBF::Client::FullParticipant, parent: :participant do
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, volunteer: true, shavee: false) if unpopulated?(evaluator, :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: 10.11.0.alpha.1
4
+ version: 11.0.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -224,16 +224,16 @@ dependencies:
224
224
  name: rubocop
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">="
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '0'
229
+ version: 0.93.1
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ">="
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '0'
236
+ version: 0.93.1
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rubocop-performance
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -539,11 +539,11 @@ files:
539
539
  - spec/factories/treatment_status.rb
540
540
  - spec/factories/user.rb
541
541
  - spec/factories/venue.rb
542
- homepage:
542
+ homepage:
543
543
  licenses:
544
544
  - MIT
545
545
  metadata: {}
546
- post_install_message:
546
+ post_install_message:
547
547
  rdoc_options: []
548
548
  require_paths:
549
549
  - lib
@@ -558,8 +558,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
558
558
  - !ruby/object:Gem::Version
559
559
  version: 1.3.1
560
560
  requirements: []
561
- rubygems_version: 3.0.3
562
- signing_key:
561
+ rubygems_version: 3.0.3.1
562
+ signing_key:
563
563
  specification_version: 4
564
564
  summary: St. Baldrick's Foundation Ruby Client Library
565
565
  test_files: