osm 0.0.10 → 0.0.11

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.
Files changed (4) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/lib/osm/api.rb +6 -6
  3. data/version.rb +1 -1
  4. metadata +11 -11
@@ -1,3 +1,7 @@
1
+ ## Version 0.0.11
2
+
3
+ * Fix undefined variable in id\_for\_term
4
+
1
5
  ## Version 0.0.10
2
6
 
3
7
  * Fix handling an empty array being returned from OSM for fields (presumably if not allowed to view)
@@ -269,7 +269,7 @@ module Osm
269
269
  # @return [Array<Osm::Evening>]
270
270
  def get_programme(section, term, options={}, api_data={})
271
271
  section_id = id_for_section(section)
272
- term_id = id_for_term(term, section)
272
+ term_id = id_for_term(term, section, api_data)
273
273
 
274
274
  if !options[:no_cache] && cache_exist?("programme-#{section_id}-#{term_id}") && self.user_can_access?(:programme, section_id, api_data)
275
275
  return cache_read("programme-#{section_id}-#{term_id}")
@@ -329,7 +329,7 @@ module Osm
329
329
  # @return [Array<Osm::Member>]
330
330
  def get_members(section, term=nil, options={}, api_data={})
331
331
  section_id = id_for_section(section)
332
- term_id = id_for_term(term, section)
332
+ term_id = id_for_term(term, section, api_data)
333
333
 
334
334
  if !options[:no_cache] && cache_exist?("members-#{section_id}-#{term_id}") && self.user_can_access?(:member, section_id, api_data)
335
335
  return cache_read("members-#{section_id}-#{term_id}")
@@ -428,7 +428,7 @@ module Osm
428
428
  # @return [Osm::DueBadges]
429
429
  def get_due_badges(section, term=nil, options={}, api_data={})
430
430
  section_id = id_for_section(section)
431
- term_id = id_for_term(term, section)
431
+ term_id = id_for_term(term, section, api_data)
432
432
 
433
433
  if !options[:no_cache] && cache_exist?("due_badges-#{section_id}-#{term_id}") && self.user_can_access?(:badge, section_id, api_data)
434
434
  return cache_read("due_badges-#{section_id}-#{term_id}")
@@ -452,7 +452,7 @@ module Osm
452
452
  # @return [Array<Hash>] representing the rows of the register
453
453
  def get_register_structure(section, term=nil, options={}, api_data={})
454
454
  section_id = id_for_section(section)
455
- term_id = id_for_term(term, section)
455
+ term_id = id_for_term(term, section, api_data)
456
456
 
457
457
  if !options[:no_cache] && cache_exist?("register_structure-#{section_id}-#{term_id}") && self.user_can_access?(:register, section_id, api_data)
458
458
  return cache_read("register_structure-#{section_id}-#{term_id}")
@@ -480,7 +480,7 @@ module Osm
480
480
  # @return [Array<Hash>] representing the attendance of each member
481
481
  def get_register(section, term=nil, options={}, api_data={})
482
482
  section_id = id_for_section(section)
483
- term_id = id_for_term(term, section)
483
+ term_id = id_for_term(term, section, api_data)
484
484
 
485
485
  if !options[:no_cache] && cache_exist?("register-#{section_id}-#{term_id}") && self.user_can_access?(:register, section_id, api_data)
486
486
  return cache_read("register-#{section_id}-#{term_id}")
@@ -664,7 +664,7 @@ module Osm
664
664
  def id_for_section(section)
665
665
  id_for(Osm::Section, section, 'section')
666
666
  end
667
- def id_for_term(term, section)
667
+ def id_for_term(term, section, api_data)
668
668
  return term.nil? ? Osm::find_current_term_id(self, id_for_section(section), api_data) : id_for(Osm::Term, term, 'term')
669
669
  end
670
670
 
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Osm
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-08-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &81097930 !ruby/object:Gem::Requirement
16
+ requirement: &77301060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *81097930
24
+ version_requirements: *77301060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: httparty
27
- requirement: &81097720 !ruby/object:Gem::Requirement
27
+ requirement: &77300820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *81097720
35
+ version_requirements: *77300820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &81097480 !ruby/object:Gem::Requirement
38
+ requirement: &77300570 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *81097480
46
+ version_requirements: *77300570
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &81097190 !ruby/object:Gem::Requirement
49
+ requirement: &77300240 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *81097190
57
+ version_requirements: *77300240
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: fakeweb
60
- requirement: &81083410 !ruby/object:Gem::Requirement
60
+ requirement: &77299890 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *81083410
68
+ version_requirements: *77299890
69
69
  description: Use the Online Scout Manager API (https://www.onlinescoutmanager.co.uk)
70
70
  to retrieve and save data.
71
71
  email: