trusty-multi-site-extension 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 750b1feaef5da194df213a3835260260a687f979
4
- data.tar.gz: 9ff98909509cbfc8d7a64fe9020483a4122da997
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZjAwODNiMzcxZGU0NDUyMDFlYzMwZDliNTMyZDQ3ZjA1M2UxZWE3MA==
5
+ data.tar.gz: !binary |-
6
+ MTliZGM2NTY3MTRmMTFhYzY1ZGMzNWFmYjhkYjJiZWNmZGFmNDU3OA==
5
7
  SHA512:
6
- metadata.gz: 654deb13b9a78f8915a74eb3053f1090230f0bc0f68de7036fb61804d171626d1375be3a9dcb2fcbec0ae2fca3024772fddd19ffec65c4e37bfed129fd34be7a
7
- data.tar.gz: fcc1aa8653b9948dbc93b59856437bd137128bde6ec3246212b2624b84ce705cb3fb803e473674b2362a4cae57bb00148d01af75b5eb7e36d8e3a1ac6a61e567
8
+ metadata.gz: !binary |-
9
+ Y2VkMmZkMDlhMDkzNDBlMjU5MTg1NWJhYTI2ZjYwMTY4MmYzMTM3NWVhMmVj
10
+ YTA0YTBkNzIwOWJjZmMzNTIzNzY4NjkwZTE3MzJhNjk5OTk0MmNhYWFhNmFk
11
+ MTcyZGFkOGNhMTE4MDFlZGM0N2VkOGUxNGYxZTNiNzY2NzQzNmQ=
12
+ data.tar.gz: !binary |-
13
+ NWNmYWQ1NGZlYTAxZTk4YmZhMjViNmVhY2I2MDc3NWNkMTdhOWZkMmVkZWY5
14
+ NmJlMTQ4OTZiMTMwMTMwNWY1NzMzMTA0MTMxZGM4OGExNjY0NWJmZjhkZGI2
15
+ ODA1NmE0ODQ5MzBhNTQ2NDMzMzU3MzY2OTkxMjcxZDE4NTNkN2Q=
@@ -15,6 +15,7 @@ module MultiSite::PageExtensions
15
15
  def find_by_path(path, live=true)
16
16
  root = homepage
17
17
  raise Page::MissingRootPageError unless root
18
+ path = root.path if clean_path(path) == "/"
18
19
  root.find_by_path(path, live)
19
20
  end
20
21
  def current_site
@@ -23,6 +24,9 @@ module MultiSite::PageExtensions
23
24
  def current_site=(site)
24
25
  @current_site = site
25
26
  end
27
+ def clean_path(path)
28
+ "/#{ path.to_s.strip }/".gsub(%r{//+}, '/')
29
+ end
26
30
  end
27
31
  end
28
32
 
@@ -4,7 +4,7 @@ require "trusty-multi-site-extension"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "trusty-multi-site-extension"
7
- s.version = "1.2.0"
7
+ s.version = "1.2.1"
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Eric Sipple"]
10
10
  s.date = %q{2014-10-07}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-multi-site-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Sipple
@@ -28,28 +28,28 @@ dependencies:
28
28
  name: trusty-snippets-extension
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: trusty-cms
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.2'
55
55
  description: Extends Trusty CMS Layouts to support multiple sites, defined by domain
@@ -129,17 +129,17 @@ require_paths:
129
129
  - lib
130
130
  required_ruby_version: !ruby/object:Gem::Requirement
131
131
  requirements:
132
- - - ">="
132
+ - - ! '>='
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ">="
137
+ - - ! '>='
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.4.3
142
+ rubygems_version: 2.4.5
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Extends Trusty CMS Layouts to support multiple sites, defined by domain