site_framework 4.3.1 → 4.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6147c84db82fe6f09dd37ac221064f32acbc8c56
4
- data.tar.gz: 1c15fa8f2ebc86f23573ca3b6cbba1e95d954dc7
3
+ metadata.gz: a4d3075dcf3d81f81ed5dad72731ebd95bda0416
4
+ data.tar.gz: b37089179923df86f622cc0304ebc95b4bf7dc5b
5
5
  SHA512:
6
- metadata.gz: db3115d284c3d2d52a3fcf2971890bfe857a298da6769a22b71b34985305b42876f92a26ffcfdaef6aa519541676d6d3d89b908e26eb82229edc9f586e5c2a01
7
- data.tar.gz: 5d73b22978c0667418c1ab626d93c42ee98e2875d58b0908c0a78536a7353238a654fd76d096124e8d4b2f75687ef5f199a2e382d9f5e33edb8b11e41353f32a
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 if @matched
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)
@@ -20,7 +20,8 @@ class SiteFramework::Routing::SiteConstraint
20
20
  end
21
21
 
22
22
  def matches?(request)
23
- return true if @domain_obj
23
+ return true if @domain_obj
24
+ return false if @domain_obj == false
24
25
 
25
26
  if @domain_obj = domain(request.host)
26
27
  @domain_name = request.host
@@ -1,3 +1,3 @@
1
1
  module SiteFramework
2
- VERSION = '4.3.1'
2
+ VERSION = '4.3.2'
3
3
  end
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.1
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-01 00:00:00.000000000 Z
11
+ date: 2016-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties