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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e0d3fccfeff5dd825b338a10a2f377607e7a7b5
4
- data.tar.gz: 8a5db4791088efbf5cebf1d30989baff10f42160
3
+ metadata.gz: b501fc3f5c07de96be83c4f3bb5736ed3a6242c2
4
+ data.tar.gz: ea031f0180aa4a54609a4ca1c7edd8c7d6836418
5
5
  SHA512:
6
- metadata.gz: e72326033232d5319d0e1e8380f11f4fd5414093b0c757d9731f9c1e2ee2808adeaf5f05fb82b29f8144b336a4da396e82cbc26ffc89d97f943f8b58f8233e0f
7
- data.tar.gz: d2a45d610d1db752ee671a9e4d304cb2470f8295789a5dadf27e5e6408e5781b86a13670408f196039e5fa6ea7849d7edfaa9c497d00c88af616c3fa62b80155
6
+ metadata.gz: 37ba1e7c853dfa1115b2cd0cd49701589abb4949afc095d8a3660577fe58a4b092c41179abad1f87257e0abafbe29c8a100ffa6ded1f1c7be6d03e4a27bb365d
7
+ data.tar.gz: 8f56a0de15848b0b8da98399cdfffa5ad91d8f0790b19c151eb3b663a03792b6befdd18e58ececd19d909063b16018591db81f046af82418ba56607401c4f85b
@@ -3,7 +3,7 @@ require 'softwear/auth/stubbed_model'
3
3
 
4
4
  module Softwear
5
5
  module Auth
6
- if Rails.env.development? && ENV['AUTH_SERVER'].blank?
6
+ if Rails.env.development? && ENV['AUTH_SERVER'] != 'true'
7
7
  class Model < StubbedModel
8
8
  STUBBED = true
9
9
  end
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Softwear
2
2
  module Lib
3
- VERSION = "1.8.9"
3
+ VERSION = "1.9.0"
4
4
  end
5
5
  end
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.8.9
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-08 00:00:00.000000000 Z
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.3
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.