osm 1.2.19 → 1.2.20
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/osm/api_access.rb +1 -1
- data/lib/osm/section.rb +3 -6
- data/spec/osm/api_access_spec.rb +1 -1
- data/version.rb +1 -1
- metadata +2 -2
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/osm/api_access.rb
CHANGED
@@ -37,7 +37,7 @@ module Osm
|
|
37
37
|
return get_from_ids(api, ids, cache_key, section, options, :get_all)
|
38
38
|
end
|
39
39
|
|
40
|
-
data = api.perform_query("
|
40
|
+
data = api.perform_query("ext/settings/access/?action=getAPIAccess§ionid=#{section_id}")
|
41
41
|
|
42
42
|
permissions_map = {
|
43
43
|
10 => [:read],
|
data/lib/osm/section.rb
CHANGED
@@ -379,13 +379,10 @@ module Osm
|
|
379
379
|
|
380
380
|
# Compare Section based on group_name type (age order), then name
|
381
381
|
def <=>(another)
|
382
|
+
type_order = [:beavers, :cubs, :scouts, :explorers, :network, :adults, :waiting]
|
382
383
|
result = self.group_name <=> another.try(:group_name)
|
383
|
-
|
384
|
-
|
385
|
-
if result == 0
|
386
|
-
result = -1 if self.type == type
|
387
|
-
result = 1 if another.try(:type) == type
|
388
|
-
end
|
384
|
+
if result == 0
|
385
|
+
result = type_order.find_index(self.type) <=> type_order.find_index(another.try(:type))
|
389
386
|
end
|
390
387
|
result = self.name <=> another.try(:name) if result == 0
|
391
388
|
return result
|
data/spec/osm/api_access_spec.rb
CHANGED
@@ -43,7 +43,7 @@ describe "API Access" do
|
|
43
43
|
}
|
44
44
|
]
|
45
45
|
}
|
46
|
-
FakeWeb.register_uri(:post, "https://www.onlinescoutmanager.co.uk/
|
46
|
+
FakeWeb.register_uri(:post, "https://www.onlinescoutmanager.co.uk/ext/settings/access/?action=getAPIAccess§ionid=1", :body => body.to_json, :content_type => 'application/json')
|
47
47
|
end
|
48
48
|
|
49
49
|
describe "Get All" do
|
data/version.rb
CHANGED
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: 1.2.
|
4
|
+
version: 1.2.20
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|