site_framework 4.3.1 → 4.3.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4d3075dcf3d81f81ed5dad72731ebd95bda0416
|
4
|
+
data.tar.gz: b37089179923df86f622cc0304ebc95b4bf7dc5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae752e4ef290f408b4bf2b3d3b95531e85437aba5c0fa200d8272f8ed32e423cae6cd4caff80be6c637193465b3b3cba29ffd993fa093237f9709f12330426eb
|
7
|
+
data.tar.gz: 07ea2deeaeca9b097da061f248824f3fb3415d02ec00b69a2cd98c6db092d3a4e89721b0c35223563234969672a2914a273c4ba516aec3a0bfc97376f62b51dc
|
data/README.md
CHANGED
@@ -95,6 +95,12 @@ every where just like this:
|
|
95
95
|
SiteFramework::CurrentState.instance.site
|
96
96
|
SiteFramework::CurrentState.instance.domain
|
97
97
|
SiteFramework::CurrentState.instance.domain_name
|
98
|
+
|
99
|
+
# or
|
100
|
+
|
101
|
+
SiteFramework.current_site
|
102
|
+
SiteFramework.current_domain
|
103
|
+
SiteFramework.current_domain_name
|
98
104
|
```
|
99
105
|
|
100
106
|
In case of default site these methods will return `nil`
|
@@ -10,14 +10,15 @@ class SiteFramework::Routing::DefaultConstraint
|
|
10
10
|
|
11
11
|
|
12
12
|
def matches?(request)
|
13
|
-
return true
|
13
|
+
return true if @matched
|
14
|
+
return false if @matched == false
|
15
|
+
|
14
16
|
@domain_name = request.host
|
15
17
|
|
16
18
|
if @mathced = @default_domains.include?(@domain_name)
|
17
19
|
logger.debug('Loading default site configuration')
|
18
20
|
patch_request(request)
|
19
21
|
true
|
20
|
-
|
21
22
|
else
|
22
23
|
logger.warn("Domain name '#{request.host}' does not match with any exist domains")
|
23
24
|
patch_request(request)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06
|
11
|
+
date: 2016-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|