sibu 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/sibu/sites_controller.rb +5 -5
- data/app/models/sibu/dynamic_style.rb +2 -2
- data/lib/sibu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d80e0d86c6b0ae3ee81f45775acf1c021fe15a17
|
4
|
+
data.tar.gz: 712c3383c6bb99034f988e9ecd45933f7cd60957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a51aca986aff80d8a5c0341aa6081bf464f66ee74eacae47aedf730035a123d19edf9219e4d3df56e00b3adf56dfb2aff72841677b2459ceec37a1892f09ccb5
|
7
|
+
data.tar.gz: 79751582c4674b13b2d7da12cd50224d2073f695bdb746d2d222457eb97c5a4ccb01fb9962777ff71c95313c4c4f554b26a5da8d47661f4200469f9236cf0fe5
|
@@ -38,8 +38,8 @@ module Sibu
|
|
38
38
|
|
39
39
|
def update
|
40
40
|
if @site.update(site_params)
|
41
|
-
if conf[:custom_styles]
|
42
|
-
generate_styles(@site)
|
41
|
+
if conf[:custom_styles]
|
42
|
+
generate_styles(@site, @site.previous_changes.has_key?(:custom_data))
|
43
43
|
end
|
44
44
|
if @site.previous_changes.has_key?(:version)
|
45
45
|
@site.update_paths
|
@@ -61,7 +61,7 @@ module Sibu
|
|
61
61
|
if new_site.save
|
62
62
|
if conf[:custom_styles]
|
63
63
|
generate_styles(@site)
|
64
|
-
generate_styles(new_site)
|
64
|
+
generate_styles(new_site, true)
|
65
65
|
end
|
66
66
|
redirect_to sites_url, notice: "Le site a bien été copié."
|
67
67
|
else
|
@@ -81,8 +81,8 @@ module Sibu
|
|
81
81
|
params.require(:site).permit!
|
82
82
|
end
|
83
83
|
|
84
|
-
def generate_styles(site)
|
85
|
-
ds = Sibu::DynamicStyle.new(site.id)
|
84
|
+
def generate_styles(site, force_styles = false)
|
85
|
+
ds = Sibu::DynamicStyle.new(site.id, force_styles)
|
86
86
|
ds.compile
|
87
87
|
end
|
88
88
|
end
|
@@ -3,9 +3,9 @@ module Sibu
|
|
3
3
|
|
4
4
|
attr_reader :site, :body, :env, :filename, :scss_file, :styles_changed
|
5
5
|
|
6
|
-
def initialize(site_id)
|
6
|
+
def initialize(site_id, force_styles = false)
|
7
7
|
@site = Sibu::Site.find(site_id)
|
8
|
-
@styles_changed = @site.style.nil? || styles_changed?(@site.style_url)
|
8
|
+
@styles_changed = @site.style.nil? || force_styles || styles_changed?(@site.style_url)
|
9
9
|
if @styles_changed
|
10
10
|
@filename = "#{site_id}_#{Time.current.to_i}"
|
11
11
|
@scss_file = File.new(scss_file_path, 'w')
|
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: 1.0.
|
4
|
+
version: 1.0.12
|
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: 2020-
|
11
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|