osm 1.2.23 → 1.2.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/osm/api.rb +6 -2
- data/spec/osm/api_spec.rb +1 -1
- data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c000055060e9bf9c68a29ee0a70c9904f65a632d
|
4
|
+
data.tar.gz: b3ea3125f4a8e0cd3af8cd79f7adeaa8a2c497d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014a4e51a7e8ab1b2d85beeeeb58bfe440bcbeabdbe489d52b020b07620da2916f55aed25b5b2342a8b4db3a9ac6614e173f78c66e98d588d2f7ad8affc8a383
|
7
|
+
data.tar.gz: f559e2d25bbb91459322012301a61bdaf5e9a29d766727e94b8ee6db9343194b2312a74c83d25c6abe5607d57d61ce3ff2f3368e3f24877b708b78e18a9b79a6
|
data/CHANGELOG.md
CHANGED
data/lib/osm/api.rb
CHANGED
@@ -194,8 +194,12 @@ module Osm
|
|
194
194
|
|
195
195
|
begin
|
196
196
|
data = perform_query('api.php?action=getUserRoles')
|
197
|
-
|
198
|
-
|
197
|
+
unless data.eql?(false)
|
198
|
+
# false equates to no roles
|
199
|
+
Osm::Model.cache_write(self, cache_key, data)
|
200
|
+
return data
|
201
|
+
end
|
202
|
+
fail Osm::NoActiveRoles, "You do not have any active roles in OSM."
|
199
203
|
|
200
204
|
rescue Osm::Error => e
|
201
205
|
if e.message.eql?('false')
|
data/spec/osm/api_spec.rb
CHANGED
@@ -84,7 +84,7 @@ describe "API" do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it "User has no roles in OSM" do
|
87
|
-
@api.stub(:perform_query).with('api.php?action=getUserRoles'){
|
87
|
+
@api.stub(:perform_query).with('api.php?action=getUserRoles'){ false }
|
88
88
|
expect{ @api.get_user_roles! }.to raise_error(Osm::NoActiveRoles)
|
89
89
|
@api.get_user_roles.should == []
|
90
90
|
end
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Gauld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|