sibu 0.3.1 → 0.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: cafeed9991ce01fc1516a3caf984c1018132055a
4
- data.tar.gz: fa77974b653ac1dda37f2fe7fba77dcd156b3aff
3
+ metadata.gz: 4753bc0d6b2ac1644d0df9dc61ec9e4d58e4f4e6
4
+ data.tar.gz: 22f1aeafcf2704c1cfeb542d785f34e578f4c533
5
5
  SHA512:
6
- metadata.gz: 63c25f4d9d404cf688d2c94051900ad228813a8d225e4a7f6733a3c2343870c973286955ba3dca74a9fa8db2ee3c751162058ed95675eac1fdf11ccebf412d3a
7
- data.tar.gz: 6b35bb17403d51c88ef7a71fc5048413bea633cfb1d0ddef2a01deb58d770f29f490f76c758d1f96d875f5c370d890abf7b9c9695918363e1ca61aec240c80b6
6
+ metadata.gz: f66b53b0a3527bc86e549a62f8de8880618ce11b57ee0477ba6c7088781f3bc29a27ef0aa1481bbeff7f5c436feda5ec7ea455c445bb79201e6756a1e4874702
7
+ data.tar.gz: ca008929497da27ae45ff05986ed7c24656d42c468f083520d96599925ca09d1a49846d96cf7297b2dcc9dbd313135413e1bb7c701d3f1a57877577d85d91721
@@ -10,8 +10,8 @@ module Sibu
10
10
  validates_presence_of :name, :site
11
11
 
12
12
  def self.lookup(domain_name, page_path)
13
- joins(:site).where("sibu_sites.domain = ? AND ((sibu_sites.version = ? AND sibu_pages.path = ?) OR sibu_pages.path = LTRIM(REPLACE(?, sibu_sites.version, ''), '/'))",
14
- domain_name, Sibu::Site::DEFAULT_VERSION, page_path, page_path).first
13
+ joins(:site).where("sibu_sites.domain = ? AND ((sibu_sites.version = ? AND COALESCE(sibu_pages.path, '') = ?) OR sibu_pages.path = LTRIM(REPLACE(?, sibu_sites.version, ''), '/'))",
14
+ domain_name, Sibu::Site::DEFAULT_VERSION, page_path.nil? ? '' : page_path.strip, page_path.nil? ? '' : page_path.strip).first
15
15
  end
16
16
 
17
17
  def save_and_init
data/lib/sibu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain