sibu 0.6.8 → 0.6.9
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: 11718eee8d05389ba6c3e54992c419d06e87039f
|
4
|
+
data.tar.gz: 64985305666f99c3f52636d5447a37389044b0f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef9befafde933e52bdcd6617efb75385d79e7cd7c075fab9fa6e0d04396840e4131d858180b1ac5f7c0a52cef9737fe3bef600e6104399dfb318a10289cd8490
|
7
|
+
data.tar.gz: 2cb79f2f07fb033870f71f38f4975c3ce757f584e65fc872bd12c7cb27a84cb87859c0f275b18d0f137598e9b7991bd7cf61f799b1e8b88e65962bc6a0eab2b1
|
@@ -25,7 +25,7 @@ class Sibu::ImageUploader < Shrine
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def generate_location(io, context)
|
28
|
-
user_id = context[:record].user_id
|
28
|
+
user_id = context[:record] ? context[:record].user_id : nil
|
29
29
|
style = context[:version] != :original ? "resized" : "originals"
|
30
30
|
name = super
|
31
31
|
|
@@ -3,11 +3,7 @@ module Sibu
|
|
3
3
|
include ActiveSupport::Concern
|
4
4
|
|
5
5
|
def for_user(usr)
|
6
|
-
Rails.application.config.sibu[:multi_user] ?
|
7
|
-
end
|
8
|
-
|
9
|
-
def shared
|
10
|
-
where(user_id: nil)
|
6
|
+
Rails.application.config.sibu[:multi_user] ? where(user_id: [nil, usr.id]) : all
|
11
7
|
end
|
12
8
|
end
|
13
9
|
end
|
data/app/models/sibu/page.rb
CHANGED
@@ -31,7 +31,8 @@ module Sibu
|
|
31
31
|
|
32
32
|
# Todo : fix me (is_home flag ?)
|
33
33
|
def update_path
|
34
|
-
|
34
|
+
prefix = site.version == Sibu::Site::DEFAULT_VERSION ? '' : "#{site.version}/"
|
35
|
+
self.path = "#{prefix}#{name != 'Accueil' ? name.parameterize : ''}" if self.path.blank?
|
35
36
|
end
|
36
37
|
|
37
38
|
def site_template
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "shrine"
|
2
2
|
require "shrine/storage/file_system"
|
3
|
+
require "mini_magick"
|
3
4
|
|
4
5
|
Shrine.storages = {
|
5
6
|
cache: Shrine::Storage::FileSystem.new("public", prefix: "uploads/cache"),
|
@@ -11,4 +12,8 @@ Shrine.storages = {
|
|
11
12
|
}
|
12
13
|
|
13
14
|
Shrine.plugin :activerecord
|
14
|
-
Shrine.plugin :cached_attachment_data
|
15
|
+
Shrine.plugin :cached_attachment_data
|
16
|
+
|
17
|
+
MiniMagick.configure do |config|
|
18
|
+
config.whiny = false
|
19
|
+
end
|
data/lib/sibu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sibu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|