aaf-lipstick 3.0.0 → 3.0.1

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: 93e1198bdc898a7e82d6f144f47d501f8eb9eb33
4
- data.tar.gz: 5fc825d84d6047fcf8e974eaac6cc8c3a860b780
3
+ metadata.gz: bfcd45c6c601b809340890852d183333006b2175
4
+ data.tar.gz: 01e01466e571f79b72e0cdc985a419e4f1ebc58f
5
5
  SHA512:
6
- metadata.gz: 2c7ed8998b9808a710d860f2fce5a480ccc388c40cec99afd5b426752834af7f00da476c2f38bf557d1a3e68de176910591a66e400ea85a25f20046a3ca32f19
7
- data.tar.gz: f086c71a83158f0b9f468c59c33e13909b6ed2039abfd17dcf12d01d0e5623390eea63d60a889f8bf397cb900d0eb1695811f0eaa7306e2f391ed4ea9dbb6267
6
+ metadata.gz: 90c8dc5b4cad84050c8e884b6d6ece9ce23fe54a1a76bd30d2a5576e7355bc94ad0e8e4e9119cd7676fb1a12a369a5d374a97bf6ac768e35b003dbd5d7ca95cb
7
+ data.tar.gz: 26acd5ddf6a344004116fd9aaf6b46135c2e6a6869d716e1a2b8396c64709147dadbd804441a65a5c24e553b940cf47e8f6cb0db8978a63af209c4e3a860ecfc
@@ -7,22 +7,23 @@ module Lipstick
7
7
  module DynamicErrors
8
8
  Forbidden = Class.new(StandardError)
9
9
  private_constant :Forbidden
10
- ::ActionController::Base.rescue_from Forbidden, with: :forbidden
11
10
 
12
11
  Unauthorized = Class.new(StandardError)
13
12
  private_constant :Unauthorized
14
- ::ActionController::Base.rescue_from Unauthorized, with: :unauthorized
15
13
 
16
14
  BadRequest = Class.new(StandardError)
17
15
  private_constant :BadRequest
18
- ::ActionController::Base.rescue_from BadRequest, with: :bad_request
19
16
 
20
17
  NotFound = Class.new(StandardError)
21
18
  private_constant :NotFound
22
- ::ActionController::Base.rescue_from NotFound, with: :not_found
23
- ::ActionController::Base.rescue_from(
24
- ::ActiveRecord::RecordNotFound, with: :not_found
25
- )
19
+
20
+ def self.included(base)
21
+ base.rescue_from Forbidden, with: :forbidden
22
+ base.rescue_from Unauthorized, with: :unauthorized
23
+ base.rescue_from BadRequest, with: :bad_request
24
+ base.rescue_from NotFound, with: :not_found
25
+ base.rescue_from(::ActiveRecord::RecordNotFound, with: :not_found)
26
+ end
26
27
 
27
28
  private
28
29
 
@@ -23,7 +23,7 @@ module Lipstick
23
23
  content_tag('p') do
24
24
  concat('Logged in as: ')
25
25
  concat(content_tag('strong', user.name))
26
- concat(" (#{user.targeted_id})")
26
+ concat(" (#{user.targeted_id})") if user.targeted_id
27
27
  end
28
28
  end
29
29
 
@@ -22,8 +22,7 @@ module Lipstick
22
22
  end
23
23
  end
24
24
 
25
- def prepare
26
- end
25
+ def prepare; end
27
26
 
28
27
  def evaluate(context, _locals)
29
28
  DSL.new(context).run(data)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Lipstick
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aaf-lipstick
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaun Mangelsdorf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2017-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis
@@ -345,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
345
  version: '0'
346
346
  requirements: []
347
347
  rubyforge_project:
348
- rubygems_version: 2.6.6
348
+ rubygems_version: 2.6.10
349
349
  signing_key:
350
350
  specification_version: 4
351
351
  summary: A gem for applying AAF branding to our services