softwear-lib 1.8.9 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/softwear/auth/model.rb +1 -1
- data/lib/softwear/auth/standard_model.rb +2 -2
- data/lib/softwear/auth/stubbed_model.rb +2 -0
- data/lib/softwear/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b501fc3f5c07de96be83c4f3bb5736ed3a6242c2
|
4
|
+
data.tar.gz: ea031f0180aa4a54609a4ca1c7edd8c7d6836418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37ba1e7c853dfa1115b2cd0cd49701589abb4949afc095d8a3660577fe58a4b092c41179abad1f87257e0abafbe29c8a100ffa6ded1f1c7be6d03e4a27bb365d
|
7
|
+
data.tar.gz: 8f56a0de15848b0b8da98399cdfffa5ad91d8f0790b19c151eb3b663a03792b6befdd18e58ececd19d909063b16018591db81f046af82418ba56607401c4f85b
|
data/lib/softwear/auth/model.rb
CHANGED
@@ -382,7 +382,7 @@ module Softwear
|
|
382
382
|
roles = Array(roles)
|
383
383
|
return [] if roles.empty?
|
384
384
|
|
385
|
-
json = validate_response query "ofrole #{roles.split(' ')}"
|
385
|
+
json = validate_response query "ofrole #{Figaro.env.hub_app_name} #{roles.split(' ')}"
|
386
386
|
|
387
387
|
objects = JSON.parse(json).map(&method(:new))
|
388
388
|
objects.each { |u| u.instance_variable_set(:@persisted, true) }
|
@@ -484,7 +484,7 @@ module Softwear
|
|
484
484
|
return true if wanted_roles.empty?
|
485
485
|
|
486
486
|
if @roles.nil?
|
487
|
-
query("role #{id} #{wanted_roles.join(' ')}") == 'yes'
|
487
|
+
query("role #{Figaro.env.hub_app_name} #{id} #{wanted_roles.join(' ')}") == 'yes'
|
488
488
|
else
|
489
489
|
wanted_roles.any? { |r| @roles.include?(r.to_s) }
|
490
490
|
end
|
@@ -21,6 +21,7 @@ users:
|
|
21
21
|
last_name: Baillie
|
22
22
|
roles:
|
23
23
|
- developer
|
24
|
+
- admin
|
24
25
|
|
25
26
|
ricky@annarbortees.com:
|
26
27
|
first_name: Ricky
|
@@ -76,6 +77,7 @@ users:
|
|
76
77
|
if attributes[:profile_picture]
|
77
78
|
attributes[:profile_picture_url] ||= "file://#{attributes[:profile_picture]}"
|
78
79
|
end
|
80
|
+
|
79
81
|
new(attributes).tap { |u| u.instance_variable_set(:@persisted, true) }
|
80
82
|
end
|
81
83
|
|
data/lib/softwear/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: softwear-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nigel Baillie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.4.
|
123
|
+
rubygems_version: 2.4.8
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Common gems and logic for all softwear apps.
|