kiosk 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ module Kiosk
7
7
  end
8
8
 
9
9
  def matches?(node)
10
- node.is_a?(ClaimedNode) && node.resource.is_a?(@model)
10
+ node.is_a?(ClaimedNode) && @model.ancestors.include?(node.resource.class)
11
11
  end
12
12
 
13
13
  def evaluate(node)
@@ -1,3 +1,3 @@
1
1
  module Kiosk
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -42,12 +42,11 @@ module Kiosk
42
42
  #
43
43
  def slug
44
44
  begin
45
- #parse the url
46
45
  uri = URI.parse(url)
47
- #get the route from the original site uri
46
+ # get the route from the original site uri
48
47
  route = uri.route_from(Kiosk.origin.site_uri)
49
- #return just the path
50
- route.path
48
+ # return just the path without any trailing /
49
+ route.path.sub(/\/$/, '')
51
50
  rescue
52
51
  attributes[:slug]
53
52
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kiosk
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Duvall
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-05-15 00:00:00 Z
13
+ date: 2012-06-21 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri