stbaldricks 4.4.0.alpha.4 → 4.4.0.alpha.5

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
- SHA1:
3
- metadata.gz: e87f4a4143186c9d4921e82cd626f27503dbce09
4
- data.tar.gz: b34387cba9bd58cf394d84bb19d82ec27b310245
2
+ SHA256:
3
+ metadata.gz: cf1899831d2916f4089752bb0cbc58106a17f89f663081a687bac5a4ad98683d
4
+ data.tar.gz: a9ebb3f04ad6ec5009393190ece61e8340e33c2e085901789c605a6bb32b6673
5
5
  SHA512:
6
- metadata.gz: 2c711d58c09783cd9993380d73e6d9fc25d7b8814a0245b9911bf70d2e0f9163fa675d797ce2cc1c34bd75bfafc572250a0595dd04fd985bcf6a7db725e94a86
7
- data.tar.gz: 856b5987f52ed670fc8e130986c2c4e655e3538a97f9b0b3dd0ac405415a72539522a30d78c32444e4064dddeaa257f56d96231308e1e43debfd8b113b7dd0eb
6
+ metadata.gz: b23ba1a46e189b9d3c1d8f03c2cddcfdf715647e642cf08be74f55b50bb84e717fdb6a942e090068e1916b24109f03572b05d88759c993eb1b53e9f13c47ab15
7
+ data.tar.gz: 5c6f6ad7191962679ffcfa384c348f4e0d14dba523d641310621521ae98ecb24b9eb851758eaff0dac7d8e8a5779546338306af4f3096784eecdb26c653eefea
@@ -0,0 +1,8 @@
1
+ module EventYearConcern
2
+ extend ActiveSupport::Concern
3
+
4
+ def event_year
5
+ return year if is_a?(SBF::Client::Event)
6
+ event.year
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module FundraisingPageConcern
2
+ extend ActiveSupport::Concern
3
+
4
+ def fundraising_page_url
5
+ fundraising_page.url
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module VenueConcern
2
+ extend ActiveSupport::Concern
3
+
4
+ def venue_address
5
+ venue && venue.location && venue.location.address
6
+ end
7
+ end
@@ -14,11 +14,17 @@ require 'stbaldricks/entities/lib/venue'
14
14
  require 'stbaldricks/entities/lib/geo_location'
15
15
  require 'stbaldricks/entities/lib/permissions'
16
16
  require 'stbaldricks/entities/lib/third_party_media'
17
+ require 'stbaldricks/entities/concerns/event_year_concern'
18
+ require 'stbaldricks/entities/concerns/fundraising_page_concern'
19
+ require 'stbaldricks/entities/concerns/venue_concern'
17
20
 
18
21
  module SBF
19
22
  module Client
20
23
  class Event < SBF::Client::TopLevelEntity
21
24
  include Entities::Cacheable
25
+ include EventYearConcern
26
+ include FundraisingPageConcern
27
+ include VenueConcern
22
28
  endpoint SBF::Client::EventEndpoint
23
29
  actions DEFAULT_CRUD_ACTIONS
24
30
  action :invite
@@ -105,6 +111,32 @@ module SBF
105
111
  attr_accessor :agreement_received_date
106
112
  entity_collection_attr_accessor :questions, 'SBF::Client::Event::Agreement::Question'
107
113
  end
114
+
115
+ class Venue < SBF::Client::Venue
116
+ class Social < SBF::Client::BaseEntity
117
+ attr_accessor :facebook_url, :twitter_name
118
+ end
119
+
120
+ class Location < SBF::Client::Location
121
+ module Type
122
+ RESTAURANT = 'restaurant'
123
+ SCHOOL = 'school'
124
+ BUSINESS = 'business'
125
+ PRIVATE_RESIDENCE = 'private_residence'
126
+ HOSPITAL = 'hospital'
127
+ MUNICIPALITY = 'municipality'
128
+ OTHER = 'other'
129
+ LEGACY = 'legacy'
130
+ end
131
+
132
+ attr_accessor :type
133
+ end
134
+
135
+ entity_attr_accessor :location, 'SBF::Client::Event::Venue::Location'
136
+ entity_attr_accessor :phone, 'SBF::Client::Phone'
137
+ attr_accessor :website_url
138
+ entity_attr_accessor :social, 'SBF::Client::Event::Venue::Social'
139
+ end
108
140
  end
109
141
 
110
142
  class PartialEvent < Event
@@ -117,6 +149,9 @@ module SBF
117
149
  end
118
150
 
119
151
  class FullEvent < Event
152
+ extend Forwardable
153
+ def_delegator :@photos, :avatar, :avatar_photo_url
154
+
120
155
  attr_accessor :id, :year
121
156
  attr_accessor :status
122
157
  attr_reader :display_name
@@ -133,7 +168,7 @@ module SBF
133
168
  entity_attr_accessor :fundraising_page, 'SBF::Client::FundraisingPage', nil, true
134
169
  entity_attr_accessor :campaign, 'SBF::Client::FullCampaign', 'SBF::Client::PartialCampaign', true
135
170
  entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
136
- entity_attr_accessor :venue, 'SBF::Client::Venue'
171
+ entity_attr_accessor :venue, 'SBF::Client::Event::Venue'
137
172
  entity_attr_accessor :photos, 'SBF::Client::Event::Photos'
138
173
  entity_attr_accessor :contacts, 'SBF::Client::Event::Contacts', nil, true
139
174
  entity_attr_accessor :coach_tracking, 'SBF::Client::Event::CoachTracking'
@@ -7,11 +7,17 @@ require 'stbaldricks/entities/lib/fundraising_page'
7
7
  require 'stbaldricks/entities/lib/venue'
8
8
  require 'stbaldricks/entities/lib/permissions'
9
9
  require 'stbaldricks/entities/lib/default_cacheable'
10
+ require 'stbaldricks/entities/concerns/event_year_concern'
11
+ require 'stbaldricks/entities/concerns/fundraising_page_concern'
12
+ require 'stbaldricks/entities/concerns/venue_concern'
10
13
 
11
14
  module SBF
12
15
  module Client
13
16
  class Fundraiser < SBF::Client::TopLevelEntity
14
17
  include Entities::DefaultCacheable
18
+ include EventYearConcern
19
+ include FundraisingPageConcern
20
+ include VenueConcern
15
21
  actions DEFAULT_CRUD_ACTIONS
16
22
 
17
23
  disallow_instantiation
@@ -70,15 +76,6 @@ module SBF
70
76
  entity_attr_reader :event, 'SBF::Client::Fundraiser::Rankings::Ranking'
71
77
  end
72
78
 
73
- class Venue < SBF::Client::BaseEntity
74
- entity_attr_accessor :location, 'SBF::Client::Fundraiser::Location'
75
- end
76
-
77
- class Location < SBF::Client::BaseEntity
78
- attr_accessor :name
79
- entity_attr_accessor :address, 'SBF::Client::Address'
80
- end
81
-
82
79
  class FullEvent < SBF::Client::FullEvent; end
83
80
 
84
81
  class PartialEvent < SBF::Client::PartialEvent
@@ -104,6 +101,9 @@ module SBF
104
101
  end
105
102
 
106
103
  class FullFundraiser < Fundraiser
104
+ extend Forwardable
105
+ def_delegator :@photos, :avatar, :avatar_photo_url
106
+
107
107
  attr_accessor :id
108
108
  attr_accessor :status
109
109
  attr_accessor :title
@@ -120,7 +120,7 @@ module SBF
120
120
  entity_attr_accessor :team, 'SBF::Client::FullTeam', 'SBF::Client::PartialTeam', true
121
121
  entity_attr_accessor :fund, 'SBF::Client::FullFund', 'SBF::Client::PartialFund', true
122
122
  attr_accessor :fund_relationship_type
123
- entity_attr_accessor :venue, 'SBF::Client::Fundraiser::Venue'
123
+ entity_attr_accessor :venue, 'SBF::Client::Venue'
124
124
  entity_attr_accessor :photos, 'SBF::Client::Fundraiser::Photos'
125
125
  entity_attr_accessor :policies, 'SBF::Client::Fundraiser::Policies'
126
126
  entity_attr_reader :rankings, 'SBF::Client::Fundraiser::Rankings', nil, true
@@ -129,6 +129,7 @@ module SBF
129
129
  attr_accessor :modified_by
130
130
  attr_accessor :how_created
131
131
  entity_attr_reader :permissions, 'SBF::Client::Permissions', nil, true
132
+ entity_attr_accessor :third_party_media, 'SBF::Client::ThirdPartyMedia', nil, true
132
133
 
133
134
  def active?
134
135
  status == SBF::Client::Fundraiser::Status::ACTIVE
@@ -4,18 +4,6 @@ require 'stbaldricks/entities/lib/address'
4
4
  module SBF
5
5
  module Client
6
6
  class Location < SBF::Client::BaseEntity
7
- module Type
8
- RESTAURANT = 'restaurant'
9
- SCHOOL = 'school'
10
- BUSINESS = 'business'
11
- PRIVATE_RESIDENCE = 'private_residence'
12
- HOSPITAL = 'hospital'
13
- MUNICIPALITY = 'municipality'
14
- OTHER = 'other'
15
- LEGACY = 'legacy'
16
- end
17
-
18
- attr_accessor :type
19
7
  attr_accessor :name
20
8
  entity_attr_accessor :address, 'SBF::Client::Address'
21
9
  end
@@ -5,14 +5,7 @@ require 'stbaldricks/entities/lib/location'
5
5
  module SBF
6
6
  module Client
7
7
  class Venue < SBF::Client::BaseEntity
8
- class Social < SBF::Client::BaseEntity
9
- attr_accessor :facebook_url, :twitter_name
10
- end
11
-
12
8
  entity_attr_accessor :location, 'SBF::Client::Location'
13
- entity_attr_accessor :phone, 'SBF::Client::Phone'
14
- attr_accessor :website_url
15
- entity_attr_accessor :social, 'SBF::Client::Venue::Social'
16
9
  end
17
10
  end
18
11
  end
@@ -11,11 +11,15 @@ require 'stbaldricks/entities/lib/name'
11
11
  require 'stbaldricks/entities/lib/phone'
12
12
  require 'stbaldricks/entities/lib/permissions'
13
13
  require 'stbaldricks/entities/lib/default_cacheable'
14
+ require 'stbaldricks/entities/concerns/event_year_concern'
15
+ require 'stbaldricks/entities/concerns/fundraising_page_concern'
14
16
 
15
17
  module SBF
16
18
  module Client
17
19
  class Participant < SBF::Client::TopLevelEntity
18
20
  include Entities::DefaultCacheable
21
+ include EventYearConcern
22
+ include FundraisingPageConcern
19
23
  endpoint SBF::Client::ParticipantEndpoint
20
24
  actions DEFAULT_CRUD_ACTIONS
21
25
  action :join_team
@@ -176,6 +180,9 @@ module SBF
176
180
  end
177
181
 
178
182
  class FullParticipant < Participant
183
+ extend Forwardable
184
+ def_delegator :@photos, :avatar, :avatar_photo_url
185
+
179
186
  attr_accessor :id
180
187
  attr_accessor :status
181
188
  attr_accessor :display_name_override
@@ -5,11 +5,15 @@ require 'stbaldricks/entities/lib/top_level'
5
5
  require 'stbaldricks/entities/lib/fundraising_page'
6
6
  require 'stbaldricks/entities/lib/permissions'
7
7
  require 'stbaldricks/entities/lib/default_cacheable'
8
+ require 'stbaldricks/entities/concerns/event_year_concern'
9
+ require 'stbaldricks/entities/concerns/fundraising_page_concern'
8
10
 
9
11
  module SBF
10
12
  module Client
11
13
  class Team < SBF::Client::TopLevelEntity
12
14
  include Entities::DefaultCacheable
15
+ include EventYearConcern
16
+ include FundraisingPageConcern
13
17
  actions DEFAULT_CRUD_ACTIONS
14
18
 
15
19
  blacklist_action :create
@@ -60,6 +64,9 @@ module SBF
60
64
  end
61
65
 
62
66
  class FullTeam < Team
67
+ extend Forwardable
68
+ def_delegator :@photos, :avatar, :avatar_photo_url
69
+
63
70
  attr_accessor :id
64
71
  attr_accessor :name
65
72
  attr_accessor :status
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '4.4.0.alpha.4'
3
+ VERSION = '4.4.0.alpha.5'
4
4
  end
5
5
  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.4.0.alpha.4
4
+ version: 4.4.0.alpha.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -104,8 +104,11 @@ files:
104
104
  - lib/stbaldricks/entities/challenger.rb
105
105
  - lib/stbaldricks/entities/challenger/model_type.rb
106
106
  - lib/stbaldricks/entities/communicate.rb
107
+ - lib/stbaldricks/entities/concerns/event_year_concern.rb
108
+ - lib/stbaldricks/entities/concerns/fundraising_page_concern.rb
107
109
  - lib/stbaldricks/entities/concerns/model_type_concern.rb
108
110
  - lib/stbaldricks/entities/concerns/type_concern.rb
111
+ - lib/stbaldricks/entities/concerns/venue_concern.rb
109
112
  - lib/stbaldricks/entities/config.rb
110
113
  - lib/stbaldricks/entities/contact.rb
111
114
  - lib/stbaldricks/entities/contact_group.rb
@@ -218,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
221
  version: 1.3.1
219
222
  requirements: []
220
223
  rubyforge_project:
221
- rubygems_version: 2.6.14
224
+ rubygems_version: 2.7.4
222
225
  signing_key:
223
226
  specification_version: 4
224
227
  summary: St. Baldrick's Foundation Ruby Client Library