softwear-lib 1.7.3 → 1.7.4

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: 9bf325e695fa8022586ea2e5dfcfb85de3ecf96d
4
- data.tar.gz: f3ea2ed655977fc0bfeb830aa6c4b663ec2fb881
3
+ metadata.gz: 2ccf69a70dfd912489c1d640cba158db839417ab
4
+ data.tar.gz: 92e469f1bb2a4cd7b18f94c2abe5a6ba89525454
5
5
  SHA512:
6
- metadata.gz: a2bc80c4d20dba52886a929f5768ef6b64310c81082e147a14e9be432a302bc299ceed9682c167a076def5663fb5810bb6923bd8067b635845a8b908e1dde3ab
7
- data.tar.gz: 50320f752c71f0acff035622eb821e2ff03cb35b631bbf3ea0fc04f5a336dcf51be3e322f740df9fb82b8026be95ad66674ec0c7f34a60ed3663c446ff795d2c
6
+ metadata.gz: e99e7d5f2c2a9b1a3cea78beba87d515a84d19206d4d844957e10332cad393d81cc42e9d2461d8a1bef1231e84e53af331b81726783038b595f33f3131d97022
7
+ data.tar.gz: c2c68e200bd24f872a05eaa3d1c2a1eb0764655be5ef19b46f1c4a153dbc61db0cd6f5d5f4e8cdfdc407463c74e9972700d8262b7f925e6d344887c370520dca
@@ -5,9 +5,11 @@ module Softwear
5
5
  module Auth
6
6
  if Rails.env.development? && ENV['AUTH_SERVER'].blank?
7
7
  class Model < StubbedModel
8
+ STUBBED = true
8
9
  end
9
10
  else
10
11
  class Model < StandardModel
12
+ STUBBED = false
11
13
  end
12
14
  end
13
15
  end
@@ -32,7 +32,12 @@ module Softwear
32
32
  # Action called when a NotSignedInError is raised.
33
33
  # ====================
34
34
  def user_not_signed_in
35
- redirect_to softwear_hub_url + "/users/sign_in?#{{return_to: request.original_url}.to_param}"
35
+ if Softwear::Auth::Model::STUBBED
36
+ self.user_token = "dummy-token"
37
+ authenticate_user!
38
+ else
39
+ redirect_to softwear_hub_url + "/users/sign_in?#{{return_to: request.original_url}.to_param}"
40
+ end
36
41
  end
37
42
 
38
43
  # ====================
@@ -48,7 +53,7 @@ module Softwear
48
53
  "</div>"\
49
54
  "<div class='panel-body'>"\
50
55
  "Not all site functions will work until the problem is resolved. "\
51
- "<a href='javascripr' onclick='history.go(-1);return false;' class='btn btn-default'>Go back.</a>"\
56
+ "<a href='javascript' onclick='history.go(-1);return false;' class='btn btn-default'>Go back.</a>"\
52
57
  "</div>"\
53
58
  "</div>"
54
59
  end
@@ -1,5 +1,5 @@
1
1
  module Softwear
2
2
  module Lib
3
- VERSION = "1.7.3"
3
+ VERSION = "1.7.4"
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.7.3
4
+ version: 1.7.4
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-03-07 00:00:00.000000000 Z
11
+ date: 2016-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler