facades 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,12 +107,14 @@ module Facades
107
107
  klasses ||= []
108
108
  wklasses ||= []
109
109
 
110
- matcher = (proc || regex || request.path)
110
+ matcher = (proc || regex || request.path.to_s)
111
+ cpath = request.path.to_s.sub("/","")
112
+ lpath = path.to_s.sub("/","")
111
113
 
112
114
  active = case matcher
113
115
  when Proc then proc.call(path)
114
116
  when Regexp then request.path.match(regex)
115
- when String then (request.path == path || request.path.match(/#{path}\/\w/im))
117
+ when String then (cpath == lpath || cpath.match(/#{lpath}\/\w/i))
116
118
  else raise 'Proc, Regexp or String required... passed #{matcher.class}.'
117
119
  end
118
120
 
@@ -123,9 +125,9 @@ module Facades
123
125
 
124
126
  attrs.merge!(:class => klasses.join(" ")) unless klasses.compact.empty?
125
127
  wrapper_attrs.merge!(:class => wklasses.join(" ")) unless wklasses.compact.empty?
126
-
128
+
127
129
  attrs.merge!(:wrapper => wrapper_attrs)
128
-
130
+ attrs
129
131
  end
130
132
 
131
133
  end
@@ -1,3 +1,3 @@
1
1
  module Facades
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facades
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-19 00:00:00.000000000Z
12
+ date: 2011-11-01 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
16
- requirement: &70346541446360 !ruby/object:Gem::Requirement
16
+ requirement: &70268111367460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70346541446360
24
+ version_requirements: *70268111367460
25
25
  description: ! 'Facades is a front-end development framework which takes '
26
26
  email:
27
27
  - brent@kurbmedia.com