lalala 4.0.0.dev.189 → 4.0.0.dev.190

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: 0c385fbcb66b1a07227e9665fc2f08796caa3179
4
- data.tar.gz: 60d7ce4401a5e40aa99def9f3176e1e78f35b968
3
+ metadata.gz: 9e2dec1469dbaf5865b65830c9c6458137461bf7
4
+ data.tar.gz: 6e0c7d2983af923c167d973496f0121ef886de68
5
5
  SHA512:
6
- metadata.gz: 2eb4811462af272611d0b37627867594d12bb5e3ec12938ad1d0b307d49444f73d123ab628ab754ef2d56cbfe6036f7faaf1cf10f7be2f9ad1d4040192d56f2d
7
- data.tar.gz: b745a7c0020233e6b44132b4bb5029b9518f1e6fc8d060ca22a31d8a88c224d0d76a14b1a027a867069733b0c144f43c96ccb1abc216763ebc8c7323ba62ea99
6
+ metadata.gz: c52478d1b09fddff1000e11093d588230ebd18167f607cfe1c20ae37444a09a75ef4ad336903ea83e64175898f424330501a42b543e66f66a9453dbd5276b4f1
7
+ data.tar.gz: 9071aa11a6e348121602a4d1de07f75910a1a474a2a04182ea04b71d5c20943fba18e9d587c12f17b5d22c37584f2280f652cbf4bd983d73cf452fdd38b98a07
@@ -1,16 +1,19 @@
1
1
  class Lalala::Pages::PageTypeConstraint
2
2
 
3
3
  def initialize(type)
4
- unless Class === type
5
- type = type.to_s.classify
6
- type += "Page" unless type.ends_with?("Page")
7
- type = type.constantize
4
+ type = "#{type}_page"
5
+ type = type.classify
6
+
7
+ while type.ends_with?("PagePage")
8
+ type = type[0..-5]
8
9
  end
9
10
 
11
+ type = type.constantize
10
12
  @type = type
11
13
  end
12
14
 
13
15
  def matches?(request)
16
+ return false if env["action_dispatch.exception"]
14
17
  request.env['lalala.page'] and @type === request.env['lalala.page']
15
18
  end
16
19
 
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "189"
3
+ BUILD = "190"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.dev.189
4
+ version: 4.0.0.dev.190
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke