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 +13 -5
- data/lib/multi_site/page_extensions.rb +4 -0
- data/trusty-multi-site-extension.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZjAwODNiMzcxZGU0NDUyMDFlYzMwZDliNTMyZDQ3ZjA1M2UxZWE3MA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MTliZGM2NTY3MTRmMTFhYzY1ZGMzNWFmYjhkYjJiZWNmZGFmNDU3OA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
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.
|
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.
|
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.
|
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
|