stbaldricks 8.3.0 → 8.3.1.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stbaldricks/entities/donation/promo_code.rb +22 -1
- data/lib/stbaldricks/entities/recurring_gift.rb +2 -1
- data/lib/stbaldricks/version.rb +1 -1
- data/spec/factories/challenger.rb +9 -3
- data/spec/factories/contact.rb +1 -1
- data/spec/factories/contact_group.rb +1 -1
- data/spec/factories/event.rb +1 -1
- data/spec/factories/event_supporter.rb +1 -1
- data/spec/factories/fundraiser.rb +1 -1
- data/spec/factories/kid.rb +4 -5
- data/spec/factories/kid_honor.rb +2 -2
- data/spec/factories/kid_institution.rb +4 -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: 552cb2ee2710ec1774ab347d4791dcfea9600396411baaf9687180566978aabe
|
4
|
+
data.tar.gz: 8b8d5a97de0a00ea1a2ff8a641f582c92a3d0a37321be7f0e336480ef654a31b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0c8451a0f42feec301cc8603516e4e4a9a1f9782fdccf5b0aa7f4ea275f0a7433f6c99a52f87e14745462c3c908745cf17a2989621f2076aa63016a3dcec57c
|
7
|
+
data.tar.gz: 7e5e362a03b51526532e2076c8857716934a9c1d76ce71f9de482c4f734cd6ad846c07bed3f69f52d4a871588d00e0f941929a829f2c1f2df946559da6654620
|
@@ -29,12 +29,33 @@ module SBF
|
|
29
29
|
GRANTS = 'grants'
|
30
30
|
SUMMER = 'summer'
|
31
31
|
ADVOCACY = 'advocacy'
|
32
|
+
MISSION = 'mission'
|
33
|
+
RECURRING_GIVING = 'recurring_giving'
|
34
|
+
ACSEVENTS = 'acsevents'
|
35
|
+
HS_TO_DONOR = 'hs_to_donor'
|
36
|
+
WIRELESS_VISION = 'wireless_vision'
|
37
|
+
BMC = 'bmc'
|
38
|
+
DUTCH_BROS = 'dutch_bros'
|
39
|
+
FADO = 'fado'
|
40
|
+
SAP = 'sap'
|
41
|
+
BLANK1 = 'blank1'
|
42
|
+
BLANK2 = 'blank2'
|
43
|
+
BLANK3 = 'blank3'
|
44
|
+
BLANK4 = 'blank4'
|
45
|
+
BLANK5 = 'blank5'
|
46
|
+
BLANK6 = 'blank6'
|
47
|
+
BLANK7 = 'blank7'
|
48
|
+
BLANK8 = 'blank8'
|
49
|
+
BLANK9 = 'blank9'
|
50
|
+
BLANK10 = 'blank10'
|
32
51
|
|
33
52
|
def self.to_a
|
34
53
|
# Defining the array explicitly, in order rather than const_getting since some things in website-ruby depend on the order
|
35
54
|
[HOLIDAY_GIVING, IN_PLAY, MOTHERS_DAY, PHINEAS, SEPTEMBER, IMPACT_DG,
|
36
55
|
GIVING_TUESDAY, SURVIVOR, SPONSORSHIP, LAPSED_LOW, LAPSED_MID, RMMEVENTS, YEAR_END_DG, LAPSED_DG, FB_FUNDRAISER,
|
37
|
-
MOBILE_CAUSE, INTERNATIONAL, ACS, HEAD_SHAVING, SPORT_CLIPS, TWENTIETH_ANNIVERSARY, DWYW, GRANTS, SUMMER,
|
56
|
+
MOBILE_CAUSE, INTERNATIONAL, ACS, HEAD_SHAVING, SPORT_CLIPS, TWENTIETH_ANNIVERSARY, DWYW, GRANTS, SUMMER,
|
57
|
+
ADVOCACY, MISSION, RECURRING_GIVING, ACSEVENTS, HS_TO_DONOR, WIRELESS_VISION, BMC, DUTCH_BROS, FADO, SAP,
|
58
|
+
BLANK1, BLANK2, BLANK3, BLANK4, BLANK5, BLANK6, BLANK7, BLANK8, BLANK9, BLANK10]
|
38
59
|
end
|
39
60
|
end
|
40
61
|
end
|
@@ -151,6 +151,7 @@ module SBF
|
|
151
151
|
|
152
152
|
class FullRecurringGift < SBF::Client::RecurringGift
|
153
153
|
attr_accessor :status
|
154
|
+
attr_accessor :event_year
|
154
155
|
attr_accessor :amount
|
155
156
|
attr_accessor :fee_amount
|
156
157
|
attr_accessor :billing_day_of_month
|
@@ -164,7 +165,7 @@ module SBF
|
|
164
165
|
attr_accessor :customer_id
|
165
166
|
attr_accessor :subscription_id
|
166
167
|
entity_collection_attr_accessor :donations, 'SBF::Client::FullDonation', 'SBF::Client::PartialDonation'
|
167
|
-
attr_accessor :created_at, :modified_at, :modified_by, :how_created, :past_due_at
|
168
|
+
attr_accessor :created_at, :modified_at, :modified_by, :how_created, :how_created_id, :past_due_at
|
168
169
|
|
169
170
|
multitype_attr_accessor(
|
170
171
|
:payment_details,
|
data/lib/stbaldricks/version.rb
CHANGED
@@ -2,16 +2,22 @@ require_relative 'lib/helpers'
|
|
2
2
|
|
3
3
|
FactoryBot.define do
|
4
4
|
factory :_base_challenger, class: SBF::Client::Challenger do
|
5
|
-
to_create { |it|
|
5
|
+
to_create { |it|
|
6
|
+
raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save
|
7
|
+
}
|
6
8
|
|
7
9
|
initialize_with do
|
8
10
|
new(attributes)
|
9
11
|
end
|
10
12
|
|
11
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.
|
12
18
|
if unpopulated?(evaluator, :entity)
|
13
|
-
event =
|
14
|
-
participant = create(:shavee, event: event
|
19
|
+
event = build(:event)
|
20
|
+
participant = create(:shavee, event: event)
|
15
21
|
challenger.entity = participant.to_partial
|
16
22
|
end
|
17
23
|
end
|
data/spec/factories/contact.rb
CHANGED
@@ -12,7 +12,7 @@ FactoryBot.define do
|
|
12
12
|
contact_groups { [] }
|
13
13
|
|
14
14
|
after :build do |contact_group, evaluator|
|
15
|
-
contact_group.owner =
|
15
|
+
contact_group.owner = build(:person) if unpopulated?(evaluator, :owner)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -12,7 +12,7 @@ FactoryBot.define do
|
|
12
12
|
contacts { [] }
|
13
13
|
|
14
14
|
after :build do |contact_group, evaluator|
|
15
|
-
contact_group.owner =
|
15
|
+
contact_group.owner = build(:person) if unpopulated?(evaluator, :owner)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/spec/factories/event.rb
CHANGED
@@ -24,7 +24,7 @@ FactoryBot.define do
|
|
24
24
|
after :build do |event, evaluator|
|
25
25
|
event.venue = build(:event_venue) if unpopulated?(evaluator, :venue)
|
26
26
|
event.contacts = build(:event_contacts) if unpopulated?(evaluator, :contacts)
|
27
|
-
event.organizers = [build(:lead_organizer, person:
|
27
|
+
event.organizers = [build(:lead_organizer, person: build(:person))] if unpopulated?(evaluator, :organizers)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -13,7 +13,7 @@ FactoryBot.define do
|
|
13
13
|
sort_order { 1 }
|
14
14
|
|
15
15
|
after :build do |event_supporter, evaluator|
|
16
|
-
event_supporter.event =
|
16
|
+
event_supporter.event = build(:event) if unpopulated?(evaluator, :event)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -18,7 +18,7 @@ FactoryBot.define do
|
|
18
18
|
fundraiser.owner = build(:person) if unpopulated?(evaluator, :owner)
|
19
19
|
fundraiser.policies = build(:fundraiser_policies) if unpopulated?(evaluator, :policies)
|
20
20
|
fundraiser.venue = build(:venue) if unpopulated?(evaluator, :venue)
|
21
|
-
fundraiser.owner =
|
21
|
+
fundraiser.owner = build(:full_person) if unpopulated?(evaluator, :owner)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/spec/factories/kid.rb
CHANGED
@@ -2,7 +2,10 @@ require_relative 'lib/helpers'
|
|
2
2
|
|
3
3
|
FactoryBot.define do
|
4
4
|
factory :kid, class: SBF::Client::FullKid do
|
5
|
-
to_create { |it|
|
5
|
+
to_create { |it|
|
6
|
+
it.relationships.first.person = FactoryBot.create(:person) if it.relationships.first.person.nil?
|
7
|
+
raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save
|
8
|
+
}
|
6
9
|
|
7
10
|
initialize_with do
|
8
11
|
new(attributes)
|
@@ -36,10 +39,6 @@ FactoryBot.define do
|
|
36
39
|
|
37
40
|
type { SBF::Client::Kid::Relationship::Type::MOTHER }
|
38
41
|
guardian_type { SBF::Client::Kid::Relationship::GuardianType::OTHER }
|
39
|
-
|
40
|
-
after :build do |relationship, evaluator|
|
41
|
-
relationship.person = create(:person) if unpopulated?(evaluator, :person)
|
42
|
-
end
|
43
42
|
end
|
44
43
|
|
45
44
|
factory :kid_submitter, parent: :kid_relationship do
|
data/spec/factories/kid_honor.rb
CHANGED
@@ -9,8 +9,8 @@ FactoryBot.define do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
after :build do |kid_honor, evaluator|
|
12
|
-
kid_honor.kid =
|
13
|
-
kid_honor.honorer =
|
12
|
+
kid_honor.kid = build(:kid) if unpopulated?(evaluator, :kid)
|
13
|
+
kid_honor.honorer = build(:fundraiser) if unpopulated?(evaluator, :honorer)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -3,14 +3,16 @@ require_relative 'lib/helpers'
|
|
3
3
|
FactoryBot.define do
|
4
4
|
# This is the relationship object between the kid and system institutions
|
5
5
|
factory :kid_institution, class: SBF::Client::KidInstitution do
|
6
|
-
to_create { |it|
|
6
|
+
to_create { |it|
|
7
|
+
it.kid = FactoryBot.create(:kid) if it.kid.nil?
|
8
|
+
raise "Failed to create #{it.class}: #{it.errors.details}" unless it.save(kid: {}, institution: {})
|
9
|
+
}
|
7
10
|
|
8
11
|
initialize_with do
|
9
12
|
new(attributes)
|
10
13
|
end
|
11
14
|
|
12
15
|
after :build do |kid_institution, evaluator|
|
13
|
-
kid_institution.kid = build(:kid) if unpopulated?(evaluator, :kid)
|
14
16
|
kid_institution.institution = build(:institution) if unpopulated?(evaluator, :institution)
|
15
17
|
end
|
16
18
|
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: 8.3.
|
4
|
+
version: 8.3.1.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: 2019-
|
11
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -550,9 +550,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
550
550
|
version: '0'
|
551
551
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
552
552
|
requirements:
|
553
|
-
- - "
|
553
|
+
- - ">"
|
554
554
|
- !ruby/object:Gem::Version
|
555
|
-
version:
|
555
|
+
version: 1.3.1
|
556
556
|
requirements: []
|
557
557
|
rubygems_version: 3.0.3
|
558
558
|
signing_key:
|