middleman-favicon-maker 4.0.5 → 4.1.0
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 +4 -4
- data/lib/middleman-favicon-maker/extension.rb +12 -21
- data/lib/middleman-favicon-maker/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37e88f68bd6296f3109b10f7ad61702769689e7f
|
4
|
+
data.tar.gz: 15135900040a395325ec3351af7e664127c2b6f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d67dba363b0cd21d699da024516e2c73802f9ccba721d71a6c062af24671117c3f24afe3dd4ae869babbe405de8e6006588ac526cafcc0c3f1b4bb9c3d5829d
|
7
|
+
data.tar.gz: 6f1e61b5f2f4932d3359c5af476d2491cc05f651081218344663023ec81b7950b20e7edc3872dbb525b1a2b6525d26edd0ea7d9c66a6132df6875efb175b0c01
|
@@ -10,13 +10,11 @@ module Middleman
|
|
10
10
|
option :icons, {}, "Hash with template filename (key) and Array of Hashes with icon configs"
|
11
11
|
|
12
12
|
def after_configuration
|
13
|
-
options[:template_dir] ||=
|
14
|
-
options[:output_dir] ||=
|
13
|
+
options[:template_dir] ||= app.config.source
|
14
|
+
options[:output_dir] ||= app.config.build_dir
|
15
15
|
end
|
16
16
|
|
17
17
|
def after_build(builder)
|
18
|
-
|
19
|
-
template_files = []
|
20
18
|
::FaviconMaker.generate do
|
21
19
|
setup do
|
22
20
|
template_dir options[:template_dir]
|
@@ -31,18 +29,10 @@ module Middleman
|
|
31
29
|
end
|
32
30
|
end
|
33
31
|
|
34
|
-
each_icon do |filepath,
|
35
|
-
|
36
|
-
rel_path =
|
37
|
-
if pathname.absolute?
|
38
|
-
pathname.relative_path_from(Pathname.new(app.root)).to_s
|
39
|
-
else
|
40
|
-
filepath
|
41
|
-
end
|
42
|
-
builder.trigger(:created, rel_path)
|
32
|
+
each_icon do |filepath, _template_filepath|
|
33
|
+
builder.trigger(:created, relative_path_to_root(filepath))
|
43
34
|
end
|
44
35
|
end
|
45
|
-
|
46
36
|
end
|
47
37
|
|
48
38
|
def manipulate_resource_list(resources)
|
@@ -51,7 +41,7 @@ module Middleman
|
|
51
41
|
::Middleman::Sitemap::Resource.new(
|
52
42
|
app.sitemap,
|
53
43
|
item[:icon],
|
54
|
-
File.join(app.root, options[:template_dir], src)
|
44
|
+
File.join(app.root, relative_path_to_root(options[:template_dir]), src)
|
55
45
|
)
|
56
46
|
end
|
57
47
|
end
|
@@ -60,12 +50,13 @@ module Middleman
|
|
60
50
|
|
61
51
|
private
|
62
52
|
|
63
|
-
def
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
53
|
+
def relative_path_to_root(filepath)
|
54
|
+
pathname = Pathname.new(filepath)
|
55
|
+
if pathname.absolute?
|
56
|
+
pathname.relative_path_from(Pathname.new(app.root)).to_s
|
57
|
+
else
|
58
|
+
filepath
|
59
|
+
end
|
69
60
|
end
|
70
61
|
end
|
71
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-favicon-maker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Follmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.5.1
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Generate favicon files in various sizes from a base image in your Middleman
|