mosaico 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mosaico/template.rb +5 -6
- data/lib/mosaico/versafix_template.rb +1 -1
- data/lib/mosaico/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: eb08eed391dc9fdea93dfd8112abada6639bc06a
|
4
|
+
data.tar.gz: c26b82633c819545823c7572b3005e54b7156af1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5e720c0531c1e0a8274fe4ec630382994b76b08d769c17d4bbb5772e0ef7e4bfef9a57c29ef9123377fe13c60d56e6b63daedc93afd8e5a7e15d2b6547d7ba8
|
7
|
+
data.tar.gz: 6ba2611446a7b050de4f643b9e9cbcf8f78fd9adeb8fd199142f607e1fd592234628a513e21f00a83fc1842abc2b8e13802803fccea4df43c193e7c967bd73ae
|
data/CHANGELOG.md
CHANGED
data/lib/mosaico/template.rb
CHANGED
@@ -51,7 +51,7 @@ module Mosaico
|
|
51
51
|
def asset_paths
|
52
52
|
@asset_paths ||= list_assets.each_with_object({}) do |asset_path, ret|
|
53
53
|
asset_path = replacement_asset_url(asset_path)
|
54
|
-
short_path = asset_path.sub(/\A#{
|
54
|
+
short_path = asset_path.sub(/\A#{dir}#{File::SEPARATOR}?/, '')
|
55
55
|
ret[short_path] = Mosaico.resolve_asset(asset_path)
|
56
56
|
end
|
57
57
|
end
|
@@ -75,6 +75,7 @@ module Mosaico
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def before_register
|
78
|
+
Rails.application.config.assets.paths << File.dirname(dir)
|
78
79
|
Rails.application.config.assets.precompile += list_assets
|
79
80
|
end
|
80
81
|
|
@@ -83,11 +84,9 @@ module Mosaico
|
|
83
84
|
|
84
85
|
def list_assets
|
85
86
|
subdirs.flat_map do |subdir|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
Dir.glob(File.join('mosaico', 'templates', name, subdir, '**/*.{jpg,gif,png}'))
|
90
|
-
end
|
87
|
+
# only allow images through for now
|
88
|
+
# TODO: what other file types are we going to need?
|
89
|
+
Dir.glob(File.join(dir, subdir, '**/*.{jpg,gif,png}'))
|
91
90
|
end
|
92
91
|
end
|
93
92
|
end
|
@@ -14,7 +14,7 @@ module Mosaico
|
|
14
14
|
new_asset_path = original_asset_path.sub('google+', 'google_plus')
|
15
15
|
|
16
16
|
Rails.application.config.assets.generated.add(new_asset_path, precompile: true) do
|
17
|
-
File.binread(
|
17
|
+
File.binread(original_asset_path)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/lib/mosaico/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mosaico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: css-rewrite
|