osm 1.2.15.dev.1 → 1.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +224 -221
- data/lib/osm/badge.rb +204 -102
- data/spec/osm/badge_spec.rb +217 -137
- data/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjY5Mjk4ZWNkMTdiOTYwNjEyNjMzZDE5ZDJlNDZkMDRlNDhlNjViZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzkwMDhiNTljM2M5MTk0M2Y0MTUyN2MyYmVmNThlN2JlN2IwNjcxOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWRmZGI4YzdhOWVjNTk5NTYwNmM5OGQxMmJlYzNmYWQ4ZTcyNWE2ZDZlOTRj
|
10
|
+
NTA0MTJmYmQyZDA5MjVhNGJmYmE2YzZhNjZlZDE4MGRjY2U2YjA5ZTEyMGYw
|
11
|
+
OTc5ZDJjYmJhMjQ0NTRjMjNmMDM3Y2E0MWQyZmFjODY1ODUwM2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGYyMzY1OWU5NDMzNzlmNTk0Mjk2Yzg0YjAwZjIyYjY0MWU1MWFkZGE3ZWE2
|
14
|
+
MjhhNGM1MmZmZGFmZWE4NDU4ZTc0MDk1MTBkYzlmNGIyMGU1MTliZTc1ZTBh
|
15
|
+
NTk4NjE3NmVhY2Y1ZjY5Mzg3MGM2OWNhMDQzYzI4YzE4YjA2OGQ=
|
data/CHANGELOG.md
CHANGED
@@ -6,28 +6,31 @@
|
|
6
6
|
* Retrieving badge stock
|
7
7
|
* Updating badge stock
|
8
8
|
* Fetching badge data
|
9
|
-
* Fetching due badges (added
|
9
|
+
* Fetching due badges (added stock_levels attribute, since OSM now gives it)
|
10
10
|
* Fetching & updating badge links for Events
|
11
11
|
* Fetching & updating badge links for Activities
|
12
12
|
* Fetching & updating badge links for Meetings
|
13
13
|
* Summary now returns all started/completed/awarded badges (it can't filter by type) so can only be called from Osm::Badge
|
14
14
|
* Osm::Badge
|
15
|
-
*
|
16
|
-
* id, version, identifier,
|
15
|
+
* osm_key, osm_long_key and competion criteria attributes are gone
|
16
|
+
* id, version, identifier, group_name, latest, user_id, levels, sharing attributes added
|
17
|
+
* min_modules_required, min_requirements_required, add_columns_to_module, level_requirement, other_requirements_required, badges_required, show_level_letters, requires_modules and modules attributes added
|
17
18
|
* OSM Changed how completion criteria are retrieved (this gem now uses a special peice of OSM's API just for this purpose) so:
|
18
|
-
|
19
|
-
* New methods modules, module_letters and
|
19
|
+
* attributes sections_needed, total_needed and needed_from_section are gone
|
20
|
+
* New methods modules, module_letters, module_ids and add_columns?
|
20
21
|
* Osm::Badge::Data
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
22
|
+
* mark_awarded method now only marks as awarded (the optional mark_as parameter is gone)
|
23
|
+
* mark_not_awarded method added
|
24
|
+
* mark_due and mark_not_due methods added
|
24
25
|
* completed attribute renamed to due
|
25
26
|
* sections_gained method renamed to modules_gained, now returns an array of letters
|
26
27
|
* gained_in_sections renamed to gained_in_modules
|
28
|
+
* Osm::Badge::Requirement gains a mod attribute to hold the Osm::Badge::RequirementModule
|
29
|
+
* Osm::Badge::RequirementModule added
|
27
30
|
* Osm::Event::BadgeLink
|
28
|
-
* Attributes added:
|
29
|
-
* Attributes removed:
|
30
|
-
* Attributes untouched:
|
31
|
+
* Attributes added: badge_name, badge_id, badge_version, requirement_id
|
32
|
+
* Attributes removed: badge_label, badge_key, requirement_key
|
33
|
+
* Attributes untouched: badge_type, badge_section, data, requirement_label
|
31
34
|
* Osm::Activity::Badge attributes now match Osm::Event::BadgeLink
|
32
35
|
* Osm::Meeting::BadgeLink attributes now match Osm::Event::badgeLink
|
33
36
|
* Osm::Badges.get_badge_stock returns a Hash, keys are now "#{badge_id}_#{level}"
|
@@ -39,13 +42,13 @@
|
|
39
42
|
|
40
43
|
## Version 1.2.13
|
41
44
|
|
42
|
-
* Fix event.
|
45
|
+
* Fix event.get_attendance ignoring term in building the cache key
|
43
46
|
|
44
47
|
## Version 1.2.12
|
45
48
|
|
46
49
|
* Add leader? method to member (true if member is in the leaders grouping)
|
47
50
|
* Add youth? method to member (true if member is in a non-leaders grouping)
|
48
|
-
* Adjust Osm::Event::BadgeLink attributes (label becomes
|
51
|
+
* Adjust Osm::Event::BadgeLink attributes (label becomes requirement_label, add badge_label)
|
49
52
|
|
50
53
|
## Version 1.2.11
|
51
54
|
|
@@ -53,7 +56,7 @@
|
|
53
56
|
* Add retrieving of badge links to events
|
54
57
|
* When creating an event in OSM badge links are also added
|
55
58
|
* When updating an event in OSM badge links are also updated
|
56
|
-
* Add
|
59
|
+
* Add get_list method to Event (get basic event details, should cutout the need to get all events all the time)
|
57
60
|
|
58
61
|
## Version 1.2.10
|
59
62
|
|
@@ -62,11 +65,11 @@
|
|
62
65
|
|
63
66
|
## Version 1.2.9
|
64
67
|
|
65
|
-
* Add
|
68
|
+
* Add osm_long_key to badges to make getting badge stock easier
|
66
69
|
|
67
70
|
## Version 1.2.8
|
68
71
|
|
69
|
-
* api.
|
72
|
+
* api.get_user_permissions now includes the quartermaster permission
|
70
73
|
* Fix administer permission level excluded from ApiAccess
|
71
74
|
|
72
75
|
## Version 1.2.7
|
@@ -84,7 +87,7 @@
|
|
84
87
|
## Version 1.2.4
|
85
88
|
|
86
89
|
* Remove support for ruby 1.9.2 (listen gem requires >= 1.9.3)
|
87
|
-
* Activity's
|
90
|
+
* Activity's get_badge_requirements method now will iterate through activities if there's no permission to use the existing one OSM query trick
|
88
91
|
* Fix exception when OSM returns a number (instead of a string) for total/completed columns of a flexi record
|
89
92
|
|
90
93
|
## Version 1.2.3
|
@@ -93,33 +96,33 @@
|
|
93
96
|
|
94
97
|
## Version 1.2.2
|
95
98
|
|
96
|
-
* Add
|
99
|
+
* Add base_url method to Api class and instances
|
97
100
|
* Add get_photo method to member
|
98
101
|
* Add earnt and earnt? methods to Osm::Badge::Data to get the stage which has been earnt (based on the requirements hash)
|
99
102
|
|
100
103
|
## Version 1.2.1
|
101
104
|
|
102
|
-
* Add
|
105
|
+
* Add section_id read-only attribute to Osm::Error::NoCurrentTerm
|
103
106
|
|
104
107
|
## Version 1.2.0
|
105
108
|
|
106
109
|
* Trying to fetch the currrent Term for a Section which doesn;t have one now raises an Osm::Error::NoCurrentTerm instead of an Osm::Error
|
107
110
|
* Add personal details options to Section:
|
108
|
-
*
|
109
|
-
*
|
110
|
-
*
|
111
|
+
* myscout_details attribute [Boolean] for whether personal details are enabled
|
112
|
+
* myscout_details_expires attribute [Date] for expiry date of subscription
|
113
|
+
* myscout_details_email_changes_to attribute [String] where to send update emails to
|
111
114
|
* Osm::Member
|
112
|
-
*
|
113
|
-
*
|
114
|
-
* Addition of
|
115
|
+
* myscout_link method now accepts :details to get a link to the "Perosnal details" page
|
116
|
+
* myscout_link method can now link to a specific event by also passing in the id (optional 3rd parameter)
|
117
|
+
* Addition of myscout_link_key method to get the member's unique key for use in myscout links
|
115
118
|
* Osm::Section
|
116
|
-
*
|
117
|
-
*
|
119
|
+
* subscription_level_name method is marked as depricated, ready for removal in version 2.0 -> replace with Osm::SUBSCRIPTION_LEVEL_NAMES[section.subscription_level]
|
120
|
+
* myscout_programme_show attribute added - how much of the programme do parents see?
|
118
121
|
* Addition of two new constants:
|
119
|
-
* Osm::
|
120
|
-
* Osm::
|
121
|
-
* Register -
|
122
|
-
* Addition of
|
122
|
+
* Osm::SUBSCRIPTION_LEVEL_NAMES - an Array of Strings containing the human name of each subscription level (starts with "Unknown" to make indexing work nicely)
|
123
|
+
* Osm::SUBSCRIPTION_LEVELS - an Array of Symbols for each level (starts with nil to make indexing work nicely)
|
124
|
+
* Register - get_structure now only includes dates
|
125
|
+
* Addition of attendance_reminder attribute to event
|
123
126
|
* Abillity to send Sms messages to multiple numbers
|
124
127
|
* Add Gift Aid:
|
125
128
|
* Get Payments
|
@@ -133,19 +136,19 @@
|
|
133
136
|
|
134
137
|
## Version 1.0.6
|
135
138
|
|
136
|
-
* Add
|
137
|
-
* Event.
|
138
|
-
* Event::Column gains
|
139
|
-
* Event::Attendance gains
|
139
|
+
* Add badge_links to Meeting
|
140
|
+
* Event.add_column method gains a required attirbute (default false) to control whether parents are required to enter something
|
141
|
+
* Event::Column gains parent_required attribute (default false)
|
142
|
+
* Event::Attendance gains get_audit_trail(api) method
|
140
143
|
|
141
144
|
## Version 1.0.5
|
142
145
|
|
143
|
-
* Fix undefined method
|
146
|
+
* Fix undefined method youth_section? within Model.require_ability_to
|
144
147
|
|
145
148
|
## Version 1.0.4
|
146
149
|
|
147
150
|
* Add notice board option to getting My.SCOUT link for a member (pass :notice as the parameter)
|
148
|
-
* Model.
|
151
|
+
* Model.require_ability_to now only checks subscription level for youth sections
|
149
152
|
|
150
153
|
## Version 1.0.3
|
151
154
|
|
@@ -166,11 +169,11 @@
|
|
166
169
|
## Version 1.0.0
|
167
170
|
|
168
171
|
* SMS text messages:
|
169
|
-
* Section gains
|
172
|
+
* Section gains sms_sent_test, sms_messages_sent and sms_messages_remaining attributes
|
170
173
|
* Add Sms class:
|
171
|
-
* With
|
174
|
+
* With send_sms(api, section_id, member_ids, all_or_one, source_address, message) method
|
172
175
|
* With DeliveryReport Model subclass
|
173
|
-
* With
|
176
|
+
* With get_for_section(api, section) class method
|
174
177
|
|
175
178
|
## Version 0.6.3
|
176
179
|
|
@@ -193,37 +196,37 @@
|
|
193
196
|
* Add due? method to tell if the badge is due
|
194
197
|
* Add started? method to tell if the badge has been started
|
195
198
|
* Add started method to tell which stage has been started
|
196
|
-
* Add
|
197
|
-
* Add
|
198
|
-
* Add
|
199
|
+
* Add first_name and last_name attributes
|
200
|
+
* Add mark_awarded method
|
201
|
+
* Add mark_due method
|
199
202
|
* Badge
|
200
|
-
* Make
|
201
|
-
* Add
|
202
|
-
* Add optional
|
203
|
+
* Make get_badge_data_for_section an instance not class method (called get_data_for_section)
|
204
|
+
* Add get_summary_for_section(api, section, term=nil, options={}) method
|
205
|
+
* Add optional section_type parameter to get_badges_for_section method
|
203
206
|
|
204
207
|
## Version 0.5.0
|
205
208
|
|
206
209
|
* Code breaking changes to DueBadges:
|
207
|
-
* The
|
208
|
-
* Addition of
|
209
|
-
* descriptions attribute has been renamed to
|
210
|
+
* The by_member attribute now uses scout_id as the key
|
211
|
+
* Addition of member_names attribute to allow fetching of members names (the old key for the by_member attribute)
|
212
|
+
* descriptions attribute has been renamed to badge_names for consistency
|
210
213
|
* Code breaking changes to Register and subclasses:
|
211
214
|
* Register:
|
212
|
-
*
|
215
|
+
* update_attendance - :attendance option is now a Symbol not String (:yes, :unadvised_absent or :advised_absent)
|
213
216
|
* Register::Attendance:
|
214
217
|
* attendance attribute is now a Hash of Date to Symbol (instead of to String)
|
215
218
|
* Register::Attendance gains two helper methods:
|
216
|
-
*
|
217
|
-
*
|
218
|
-
* Add
|
219
|
-
* Add
|
219
|
+
* present_on?(date)
|
220
|
+
* absent_on?(date)
|
221
|
+
* Add allow_booking attribute to Event
|
222
|
+
* Add myscout_programme_times attribute to Section
|
220
223
|
* Cost attribute of Event is now checked to be either "TBC" or formatted to /\\A\\d+\\.\\d{2}\\Z/
|
221
|
-
* Add
|
222
|
-
* Add
|
224
|
+
* Add cost_tbc? method to Event
|
225
|
+
* Add cost_free? method to Event
|
223
226
|
|
224
227
|
## Version 0.4.2
|
225
228
|
|
226
|
-
* Fix undefined variable "
|
229
|
+
* Fix undefined variable "section_id" when fetching notepad from cache
|
227
230
|
|
228
231
|
## Version 0.4.1
|
229
232
|
|
@@ -233,32 +236,32 @@
|
|
233
236
|
## Version 0.4.0
|
234
237
|
|
235
238
|
* Event::Attendance
|
236
|
-
* Move fields['firstname'] to
|
237
|
-
* Move fields['lastname'] to
|
238
|
-
* Move fields['dob'] to
|
239
|
+
* Move fields['firstname'] to first_name attribute
|
240
|
+
* Move fields['lastname'] to last_name attribute
|
241
|
+
* Move fields['dob'] to date_of_birth attribute
|
239
242
|
* Move fields['attending'] to attending attribute
|
240
243
|
* The keys for fields are now Fixnums not Strings
|
241
|
-
* Addition of
|
242
|
-
* Addition of
|
243
|
-
* Addition of
|
244
|
-
* update(api,
|
244
|
+
* Addition of payment_control and payments attributes
|
245
|
+
* Addition of automatic_payments? and manual_payments? methods
|
246
|
+
* Addition of is_attending?, is_not_attending?, is_invited? and is_shown? methods
|
247
|
+
* update(api, field_id) method now updates only changed fields, becoming update(api)
|
245
248
|
* Add :network Section type
|
246
249
|
* Add custom inspect methods for:
|
247
250
|
* Event::Attendance (replace event with event.id if present)
|
248
251
|
* Event::Column (replace event with event.id if present)
|
249
|
-
* FlexiRecord::Column (replace
|
250
|
-
* FlexiRecord::Data (replace
|
251
|
-
* Badge::Requirement (replace badge with badge.
|
252
|
-
* Badge::Data (replace badge with badge.
|
252
|
+
* FlexiRecord::Column (replace flexi_record with flexi_record.id)
|
253
|
+
* FlexiRecord::Data (replace flexi_record with flexi_record.id)
|
254
|
+
* Badge::Requirement (replace badge with badge.osm_key)
|
255
|
+
* Badge::Data (replace badge with badge.osm_key)
|
253
256
|
|
254
257
|
## Version 0.3.0
|
255
258
|
|
256
259
|
* Removal of DueBadges
|
257
|
-
* Removal of
|
260
|
+
* Removal of get_badge_stock method from sections
|
258
261
|
* Addition of Badges model:
|
259
|
-
* With
|
260
|
-
* With
|
261
|
-
* With
|
262
|
+
* With get_due_badges(api, section, options={}) method
|
263
|
+
* With get_stock(api, section, options={}) method
|
264
|
+
* With update_stock(api, section, badge_key, stock_level) method
|
262
265
|
* Addition of Badge models:
|
263
266
|
* CoreBadge
|
264
267
|
* ChallengeBadge
|
@@ -266,37 +269,37 @@
|
|
266
269
|
* ActivityBadge
|
267
270
|
* All:
|
268
271
|
* Inherit from Badge (do not use this class directly)
|
269
|
-
* With
|
270
|
-
* With
|
272
|
+
* With get_badges_for_section(api, section, options={}) method
|
273
|
+
* With get_badge_data_for_section(api, section, badge, term=nil, options={}) method
|
271
274
|
* Addition of Badge::Requirements class
|
272
275
|
* Addition of Badge::Data class
|
273
276
|
* With update(api) method
|
274
|
-
* With
|
275
|
-
* With
|
276
|
-
* With
|
277
|
+
* With total_gained method
|
278
|
+
* With sections_gained method
|
279
|
+
* With gained_in_sections method
|
277
280
|
* FlexiRecord::Data now updates only changed fields
|
278
281
|
|
279
282
|
## Version 0.2.2
|
280
283
|
|
281
284
|
* Add comparing and sorting (using <=>, <, <=, >, >= and between?) to each model
|
282
285
|
* Activity - id then version
|
283
|
-
* Activity::File -
|
284
|
-
* Activity::Version -
|
286
|
+
* Activity::File - activity_id then name
|
287
|
+
* Activity::Version - activity_id then version
|
285
288
|
* ApiAccess - id
|
286
289
|
* Event - start, name then id (shortcuts, returning 0 if ids are equal)
|
287
290
|
* Event::Column - event then id
|
288
291
|
* Event::Attendance - event then row
|
289
|
-
* FlexiRecord -
|
290
|
-
* FlexiRecord::Column -
|
291
|
-
* FlexiRecord::Data -
|
292
|
-
* Grouping -
|
293
|
-
* Meeting -
|
294
|
-
* Meeting::Activity - title then
|
295
|
-
* Member -
|
292
|
+
* FlexiRecord - section_id then name
|
293
|
+
* FlexiRecord::Column - flexi_record then id (system ones first then user ones)
|
294
|
+
* FlexiRecord::Data - flexi_record, grouping_id then member_id
|
295
|
+
* Grouping - section_id then name
|
296
|
+
* Meeting - section_id, date, start_time then id
|
297
|
+
* Meeting::Activity - title then activity_id
|
298
|
+
* Member - section_id, grouping_id, grouping_leader (descending), last_name then first_name
|
296
299
|
* Register::Field - id
|
297
|
-
* Register::Attendance -
|
298
|
-
* Section -
|
299
|
-
* Term -
|
300
|
+
* Register::Attendance - section_id, grouping_id, last_name then first_name
|
301
|
+
* Section - group_name, type (by age) then name
|
302
|
+
* Term - section_id, start then id
|
300
303
|
|
301
304
|
## Version 0.2.0
|
302
305
|
|
@@ -305,38 +308,38 @@
|
|
305
308
|
* You try to access a feature which you don't have the correct permissions for
|
306
309
|
* You try to access a Section (or it's Grouping) you shouldn't be accessing
|
307
310
|
* All Model classes:
|
308
|
-
* Addition of
|
309
|
-
* Addition of
|
311
|
+
* Addition of changed_attributes method to get a list of attributes which have changed
|
312
|
+
* Addition of reset_changed_attributes method to reset the list of attributes which have changed
|
310
313
|
* Activity
|
311
314
|
* Check user has permission to view before returning from cache
|
312
|
-
* Addition of
|
315
|
+
* Addition of osm_link method to get the URL for viewing in OSM
|
313
316
|
* Add updating of Grouping
|
314
317
|
* Evening:
|
315
318
|
* Rename to Meeting
|
316
|
-
* Rename
|
317
|
-
* Rename
|
319
|
+
* Rename meeting_date attribute to date
|
320
|
+
* Rename get_programme method to get_for_section
|
318
321
|
* Event:
|
319
|
-
* Removal of
|
322
|
+
* Removal of add_field method (use add_column instead)
|
320
323
|
* Removal of fields attribute (use columns instead)
|
321
324
|
* FlexiRecord:
|
322
|
-
* Addition of id,
|
325
|
+
* Addition of id, section_id and name attributes (these no longer need to be passed to methods)
|
323
326
|
* FlexiRecord::Field renamed to FlexiRecord::Column
|
324
327
|
* The following methods are now instance not class methods:
|
325
|
-
*
|
326
|
-
*
|
327
|
-
*
|
328
|
+
* get_fields (also renamed to get_columns)
|
329
|
+
* add_field (also renamed to add_column)
|
330
|
+
* get_data
|
328
331
|
* The following methods have bceome instance methods of a subclasses:
|
329
|
-
*
|
330
|
-
*
|
331
|
-
*
|
332
|
+
* update_field (moved to column.update)
|
333
|
+
* delete_field (moved to column.delete)
|
334
|
+
* update_data (moved to data.update)
|
332
335
|
* Member:
|
333
336
|
* Removal of grouping attribute
|
334
|
-
* Removal of
|
335
|
-
* Addition of
|
337
|
+
* Removal of grouping_label attribute
|
338
|
+
* Addition of myscout_link method (used to get the link to the member's My.SCOUT page)
|
336
339
|
* Section:
|
337
|
-
*
|
338
|
-
* Addition of
|
339
|
-
*
|
340
|
+
* subscription_level attribute is now a Fixnum not Symbol
|
341
|
+
* Addition of subscription_level_name method to get the name of the subscription level for the section
|
342
|
+
* flexi_records attribute now contains an Array of Osm::FlexiRecord
|
340
343
|
* "Under the hood" changes:
|
341
344
|
* Instead of caching individual items and a list of items the gem now caches a list of IDs. This should reduce the cache size.
|
342
345
|
* When updating items requires multiple OSM requests, now only updates what changed
|
@@ -346,44 +349,44 @@
|
|
346
349
|
## Version 0.1.17
|
347
350
|
|
348
351
|
* Add comparison to Evening
|
349
|
-
* Passing a Term to the
|
352
|
+
* Passing a Term to the get_programme method of Evening is now optional
|
350
353
|
|
351
354
|
## Version 0.1.16
|
352
355
|
|
353
356
|
* Member's grouping attribute:
|
354
|
-
* Renamed to
|
355
|
-
* Virtual attribute grouping added (maps to
|
357
|
+
* Renamed to grouping_label
|
358
|
+
* Virtual attribute grouping added (maps to grouping_label currently) marked as depricated as it will use a Grouping object not a String in the future
|
356
359
|
* Fix exception when OSM returns empty string when requesting groupings for a section
|
357
360
|
* Fix exception when OSM returns empty string when requesting register structure for a section
|
358
361
|
* Fix updating of grouping for Member
|
359
|
-
* Fix validation error for Member - a leader's
|
362
|
+
* Fix validation error for Member - a leader's joining_in_years is -1
|
360
363
|
* Add spaces and spaces? methods to Event
|
361
364
|
|
362
365
|
## Version 0.1.15
|
363
366
|
|
364
|
-
* Rename
|
367
|
+
* Rename grouping_name attribute of Member to grouping
|
365
368
|
|
366
369
|
## Version 0.1.14
|
367
370
|
|
368
|
-
* Fix
|
371
|
+
* Fix grouping_name attribute of Member not being set when getting data from OSM
|
369
372
|
|
370
373
|
## Version 0.1.13
|
371
374
|
|
372
375
|
* Add attendance limit attributes to Event:
|
373
|
-
*
|
374
|
-
*
|
375
|
-
* Add
|
376
|
+
* attendance_limit - Fixnum, 0 = no limit
|
377
|
+
* attendance_limit_includes_leaders Boolean
|
378
|
+
* Add limited_attendance? method to Event
|
376
379
|
* Add setting of a section's notepad
|
377
380
|
* Add updating of Activity
|
378
|
-
* Add
|
381
|
+
* Add grouping_name attribute to Member
|
379
382
|
|
380
383
|
## Version 0.1.12
|
381
384
|
|
382
|
-
* Attribute Section.
|
383
|
-
* Attribute Section.
|
384
|
-
* Attribute Section.
|
385
|
+
* Attribute Section.myscout_email_address_send defaults to an empty String
|
386
|
+
* Attribute Section.myscout_email_address_copy defaults to an empty String
|
387
|
+
* Attribute Section.myscout_email_address_send renamed to myscout_email_address_from
|
385
388
|
* Osm::Event::Column
|
386
|
-
* Rename
|
389
|
+
* Rename parent_label attribute to label
|
387
390
|
* Add update method to update OSM
|
388
391
|
* Add delete method to update OSM
|
389
392
|
* Osm::Evening
|
@@ -393,44 +396,44 @@
|
|
393
396
|
* Now returns an Osm::Evening on success, nil on failure
|
394
397
|
* Will now pass start time, finish time and title to OSM
|
395
398
|
* Add activity to programme
|
396
|
-
* Evening.
|
397
|
-
* Activity.
|
399
|
+
* Evening.add_activity(api, activity, notes="")
|
400
|
+
* Activity.add_to_programme(api, section, date, notes="")
|
398
401
|
* Osm::Member
|
399
402
|
* Add create method to update OSM
|
400
403
|
* Add update method to update OSM
|
401
404
|
* Osm::FlexiRecord
|
402
|
-
* Add
|
403
|
-
* Add
|
404
|
-
* Add
|
405
|
-
* Add
|
405
|
+
* Add add_field method to add a field to the record in OSM
|
406
|
+
* Add update_field method to rename a field in OSM
|
407
|
+
* Add delete_field method to delete a field from OSM
|
408
|
+
* Add update_data method to update the data in OSM
|
406
409
|
|
407
410
|
## Version 0.1.11
|
408
411
|
|
409
412
|
* Fix "can't convert Hash into String" occuring when some section's config is a Hash not a JSON encoded Hash
|
410
|
-
* Remove
|
413
|
+
* Remove num_scouts attribute from Section (OSM always sets this to 999)
|
411
414
|
* Add My.SCOUT related attributes to Section:
|
412
415
|
* gocardless (Boolean) - does the section use gocardless
|
413
|
-
*
|
414
|
-
*
|
415
|
-
*
|
416
|
-
*
|
417
|
-
*
|
418
|
-
*
|
419
|
-
*
|
420
|
-
*
|
421
|
-
*
|
422
|
-
*
|
423
|
-
*
|
424
|
-
*
|
425
|
-
*
|
426
|
-
*
|
427
|
-
*
|
428
|
-
*
|
416
|
+
* myscout_events_expires (Date) - when the subscription to Events in My.SCOUT expires
|
417
|
+
* myscout_badges_expires (Date) - when the subscription to Badges in My.SCOUT expires
|
418
|
+
* myscout_programme_expires (Date) - when the subscription to Badges in My.SCOUT expires
|
419
|
+
* myscout_events (Boolean) - whether the section uses the Events part of My.SCOUT
|
420
|
+
* myscout_badges (Boolean) - whether the section uses the Badges part of My.SCOUT
|
421
|
+
* myscout_programme (Boolean) - whether the section uses the Programme part of My.SCOUT
|
422
|
+
* myscout_payments (Boolean) - whether the section uses the Payments part of My.SCOUT
|
423
|
+
* myscout_emails (Hash of Symbol to Boolean) - which email addresses are linked to MyScout for each Member
|
424
|
+
* myscout_email_address_send (String, blank OK) - which email address to send My.SCOUT emails as
|
425
|
+
* myscout_email_address_copy (String, blank OK) - which email address to send copys of My.SCOUT emails to
|
426
|
+
* myscout_badges_partial (Boolean) - Whether parents can see partially completed badges
|
427
|
+
* myscout_programme_summary (Boolean) - Whether parents can see the summary of programme items
|
428
|
+
* myscout_event_reminder_count (Integer) - How many event reminders to send to parents who haven't responded
|
429
|
+
* myscout_event_reminder_frequency (Integer) - How many days to leave between event reminder emails
|
430
|
+
* myscout_payment_reminder_count (Integer) - How many payment reminders to send to parents who haven't paid yet
|
431
|
+
* myscout_payment_reminder_frequency (Integer) - How many days to leave between payment reminder emails
|
429
432
|
* Add new OSM attributes to Event:
|
430
433
|
* notepad - the notepad shown in OSM
|
431
|
-
*
|
432
|
-
*
|
433
|
-
*
|
434
|
+
* public_notepad - the notepad shown on My.SCOUT
|
435
|
+
* confirm_by_date - the last day that parents can change their child's attendance details
|
436
|
+
* allow_changes - whether parents can change their child's attendance details
|
434
437
|
* reminders - whether reminder emails are sent
|
435
438
|
* Osm::Event
|
436
439
|
* Mark fields attribute as depricated
|
@@ -463,12 +466,12 @@
|
|
463
466
|
|
464
467
|
## Version 0.1.4
|
465
468
|
|
466
|
-
* Osm::Model has new class method
|
469
|
+
* Osm::Model has new class method get_user_permission(api, section_id, permission)
|
467
470
|
* API may return permissions value as a string not integer
|
468
471
|
|
469
472
|
## Version 0.1.3
|
470
473
|
|
471
|
-
* Add
|
474
|
+
* Add get_badge_stock(api) to section
|
472
475
|
|
473
476
|
## Version 0.1.2
|
474
477
|
|
@@ -476,7 +479,7 @@
|
|
476
479
|
|
477
480
|
## Version 0.1.1
|
478
481
|
|
479
|
-
* Add
|
482
|
+
* Add get_options Hash to Model.get_user_permissions
|
480
483
|
* Bug fixes
|
481
484
|
|
482
485
|
## Version 0.1.0
|
@@ -484,82 +487,82 @@
|
|
484
487
|
* Configuration is through Osm::configure not Osm::Api.configure and it takes a different Hash
|
485
488
|
* Api.authorize returns a different Hash
|
486
489
|
* Removal of Osm::Api methods:
|
487
|
-
*
|
488
|
-
*
|
489
|
-
*
|
490
|
+
* get_*
|
491
|
+
* update_*
|
492
|
+
* create_*
|
490
493
|
* EventAttendance is now Event::Attendance
|
491
494
|
* Removal of Osm::Role
|
492
|
-
* Osm::Section now has two new required attributes
|
493
|
-
*
|
494
|
-
* Section has a class method
|
495
|
-
* Activity now has class method get(api,
|
495
|
+
* Osm::Section now has two new required attributes group_id and group_name
|
496
|
+
* long_name and full_name methods should be replaced with something similar to "#{section.name} (#{section.group_name})" in your own code
|
497
|
+
* Section has a class method fetch_user_permissions(api) which returns a Hash (section_id to permissions Hash)
|
498
|
+
* Activity now has class method get(api, activity_id)
|
496
499
|
* ApiAccess: now has class methods
|
497
|
-
*
|
498
|
-
* get(api, section,
|
499
|
-
*
|
500
|
+
* get_all(api, section)
|
501
|
+
* get(api, section, for_api)
|
502
|
+
* get_ours(api, section) -> actually just calls get(api, section, api)
|
500
503
|
* DueBadges now has a class method get(api, section)
|
501
504
|
* Evening now has class methods:
|
502
|
-
*
|
505
|
+
* get_programme(api, section_id, term_id)
|
503
506
|
* create(api, parameters)
|
504
507
|
* Evening now has instance methods:
|
505
508
|
* update(api)
|
506
|
-
*
|
509
|
+
* get_badge_requirements(api, evening)
|
507
510
|
* Event now has class methods:
|
508
|
-
*
|
509
|
-
* get(api, section,
|
511
|
+
* get_for_section(api, section)
|
512
|
+
* get(api, section, event_id)
|
510
513
|
* create(api)
|
511
514
|
* Event now has instance methods:
|
512
515
|
* update(api)
|
513
516
|
* delete(api)
|
514
|
-
*
|
515
|
-
*
|
517
|
+
* get_attendance(api)
|
518
|
+
* add_field(api, label)
|
516
519
|
* Event now has a fields attribute
|
517
|
-
* Event::Attendance has instance method update(api,
|
520
|
+
* Event::Attendance has instance method update(api, field_id)
|
518
521
|
* FlexiRecord has class methods:
|
519
|
-
*
|
520
|
-
*
|
521
|
-
* Grouping now has a class method
|
522
|
-
* Member now has a class method to
|
522
|
+
* get_fields(api, section, flexi_record_id)
|
523
|
+
* get_data(api, section, flexi_record_id, term)
|
524
|
+
* Grouping now has a class method get_for_section(api, section)
|
525
|
+
* Member now has a class method to get_for_section(api, section_id, term_id)
|
523
526
|
* Register now has class methods:
|
524
|
-
*
|
525
|
-
*
|
526
|
-
*
|
527
|
+
* get_structure(api, section)
|
528
|
+
* get_attendance(api, section)
|
529
|
+
* update_attendance(data)
|
527
530
|
* Section now has class methods:
|
528
|
-
*
|
529
|
-
* get(api,
|
530
|
-
* Section now has instance method
|
531
|
+
* get_all(api)
|
532
|
+
* get(api, section_id)
|
533
|
+
* Section now has instance method get_notepad(api)
|
531
534
|
* Term now has class methods:
|
532
|
-
*
|
533
|
-
* get(api,
|
534
|
-
*
|
535
|
-
*
|
535
|
+
* get_all(api)
|
536
|
+
* get(api, term_id)
|
537
|
+
* get_for_section(api, section_id)
|
538
|
+
* get_current_term_for_section(api, section_id)
|
536
539
|
* create(api, parameters)
|
537
540
|
* Term now has instance method update(api)
|
538
541
|
|
539
542
|
## Version 0.0.26
|
540
543
|
|
541
544
|
* Register - Update attendance
|
542
|
-
* Add api.
|
543
|
-
* Add api.
|
545
|
+
* Add api.get_badge_requirements_for_evening
|
546
|
+
* Add api.update_register
|
544
547
|
* Event:
|
545
|
-
* Add api.
|
546
|
-
* Add api.
|
547
|
-
* Add api.
|
548
|
-
* Add api.
|
548
|
+
* Add api.ceate_event
|
549
|
+
* Add api.update_event
|
550
|
+
* Add api.delete_event
|
551
|
+
* Add api.add_event_field
|
549
552
|
* Event attendance:
|
550
|
-
* Add api.
|
551
|
-
* Add api.
|
552
|
-
* Add api.
|
553
|
-
* Add api.
|
553
|
+
* Add api.get_event
|
554
|
+
* Add api.get_event_fields
|
555
|
+
* Add api.get_event_attendance
|
556
|
+
* Add api.update_event_attendance
|
554
557
|
* Fix "uninitialized constant Osm::Api::HTTParty"
|
555
558
|
|
556
559
|
## Version 0.0.25
|
557
560
|
|
558
561
|
* FlexiRecordData, move these attributes to the fields hash:
|
559
|
-
*
|
560
|
-
*
|
562
|
+
* first_name => 'firstname'
|
563
|
+
* last_name => 'lastname'
|
561
564
|
* age => 'age'
|
562
|
-
*
|
565
|
+
* date_of_birth => 'dob'
|
563
566
|
* completed => 'completed'
|
564
567
|
* total => 'total'
|
565
568
|
|
@@ -569,12 +572,12 @@
|
|
569
572
|
|
570
573
|
## Version 0.0.23
|
571
574
|
|
572
|
-
*
|
575
|
+
* get_badge_stock_levels now returns a hash whoose values are Fixnum not String
|
573
576
|
|
574
577
|
## Version 0.0.22
|
575
578
|
|
576
|
-
* Adjustments so DueBadge is similar enough to
|
577
|
-
*
|
579
|
+
* Adjustments so DueBadge is similar enough to badge_stock data to be useful:
|
580
|
+
* by_member Hash -> Keys are member's name (String), values are the badge key (String)
|
578
581
|
* descriptions Hash -> keys are the badge key (String), values are the badge name (String)
|
579
582
|
* totals Hash -> keys are the badge key (String), values are the number required (Fixnum)
|
580
583
|
* Badge keys are the same as are used in getting badge stock levels
|
@@ -584,29 +587,29 @@
|
|
584
587
|
|
585
588
|
## Version 0.0.21
|
586
589
|
|
587
|
-
* Fix getting
|
590
|
+
* Fix getting section_id and grouping_id for api.get_members
|
588
591
|
|
589
592
|
## Version 0.0.20
|
590
593
|
|
591
|
-
* Deprecation of
|
594
|
+
* Deprecation of api_data option in api methods (raise a warning if used and adjust documentation)
|
592
595
|
* Hide sesitive information when printing data sent to OSM in debug mode
|
593
596
|
* Add archived attribute to Event
|
594
|
-
* Add :
|
597
|
+
* Add :include_archived option to api.get_events method
|
595
598
|
* Add retreival of Flexi Records
|
596
|
-
* Make
|
599
|
+
* Make set_user method of Api public
|
597
600
|
|
598
601
|
## Version 0.0.19
|
599
602
|
|
600
|
-
* Fix caching error in api.
|
603
|
+
* Fix caching error in api.get_register_data
|
601
604
|
|
602
605
|
## Version 0.0.18
|
603
606
|
|
604
607
|
* Term's end attribute is now finish
|
605
608
|
* Event's end attribute is now finish
|
606
|
-
* Evening's
|
609
|
+
* Evening's evening_id attribute is now id
|
607
610
|
* DueBadge's totals attribute is now a method (totals are calculated each time rather than during initialization)
|
608
611
|
* Added exception ArgumentIsInvalid (raised when argument.valid? is false when updating through the API)
|
609
|
-
* The following models now use
|
612
|
+
* The following models now use active_attr:
|
610
613
|
* Activity, Activity::File, Activity::Badge and Activity::Version
|
611
614
|
* ApiAccess
|
612
615
|
* DueBadges
|
@@ -628,23 +631,23 @@
|
|
628
631
|
|
629
632
|
## Version 0.0.16
|
630
633
|
|
631
|
-
* -2 is a valid
|
634
|
+
* -2 is a valid grouping_id value (corrected in Grouping)
|
632
635
|
|
633
636
|
## Version 0.0.15
|
634
637
|
|
635
638
|
* Add :debug option to Api.configure
|
636
|
-
* -2 is a valid
|
637
|
-
* Fix check of :
|
639
|
+
* -2 is a valid grouping_id value
|
640
|
+
* Fix check of :section_id in Member.initalize (apparently 0 is allowd in the API return data)
|
638
641
|
* Fix role's section not being set from API data
|
639
642
|
|
640
643
|
## Version 0.0.14
|
641
644
|
|
642
|
-
* Fix api.
|
643
|
-
* Fix check of :
|
645
|
+
* Fix api.get_register_data\ returning wrong object
|
646
|
+
* Fix check of :num_scouts in Section.initalize
|
644
647
|
|
645
648
|
## Version 0.0.13
|
646
649
|
|
647
|
-
* Fix bug - invalid
|
650
|
+
* Fix bug - invalid grouping_leader in member incorrectly risen for -1
|
648
651
|
|
649
652
|
## Version 0.0.12
|
650
653
|
|
@@ -654,14 +657,14 @@
|
|
654
657
|
* Activity.files now returns an array of Osm::Activity::File objects
|
655
658
|
* Activity.versions now returns an array of Osm::Activity::Version objects
|
656
659
|
* Section.flexi_records now returns an array of Osm::Section::FlexiRecord objects
|
657
|
-
* api.
|
658
|
-
* api.
|
660
|
+
* api.get_register_structure now returns an array of RegisterField objects
|
661
|
+
* api.get_register becomes api.get_register_data and now returns an array of RegisterData objects
|
659
662
|
* Attribute name changes:
|
660
|
-
* Activity::Badge.section becomes
|
661
|
-
* Activity::File.
|
662
|
-
* Section.
|
663
|
-
* Member.
|
664
|
-
*
|
663
|
+
* Activity::Badge.section becomes section_type
|
664
|
+
* Activity::File.file_id becomes id
|
665
|
+
* Section.extra_records becomes flexi_records
|
666
|
+
* Member.joined_in_years attribute becomes joining_in_years
|
667
|
+
* from_api method added to:
|
665
668
|
* Activity and sub classes
|
666
669
|
* ApiAccess
|
667
670
|
* DueBadges
|
@@ -677,18 +680,18 @@
|
|
677
680
|
|
678
681
|
## Version 0.0.11
|
679
682
|
|
680
|
-
* Fix undefined variable in
|
683
|
+
* Fix undefined variable in id_for_term
|
681
684
|
|
682
685
|
## Version 0.0.10
|
683
686
|
|
684
687
|
* Fix handling an empty array being returned from OSM for fields (presumably if not allowed to view)
|
685
|
-
* Fix undefined variable in
|
688
|
+
* Fix undefined variable in id_for_term
|
686
689
|
|
687
690
|
## Version 0.0.9
|
688
691
|
|
689
692
|
* Allow passing of Osm::Term objects as well as term IDs
|
690
693
|
* Allow passing of Osm::Section objects as well as section IDs
|
691
|
-
* Allow configuration of text prepended to keys used in the cache (:
|
694
|
+
* Allow configuration of text prepended to keys used in the cache (:cache_prepend_to_key option to configure method)
|
692
695
|
* Require setting of cache class to use caching (:cache option to configure method)
|
693
696
|
|
694
697
|
## version 0.0.8
|
@@ -704,7 +707,7 @@
|
|
704
707
|
## Version 0.0.6
|
705
708
|
|
706
709
|
* Usage changes:
|
707
|
-
* When calling an api.
|
710
|
+
* When calling an api.get_\* method api_data is now passed as an additional paramter not as part of the options
|
708
711
|
* Work on documentation:
|
709
712
|
* Tidy up params
|
710
713
|
* Tidy up returns
|