middleman-scavenger 1.0.0 → 1.0.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 +9 -0
- data/lib/svg_processor.rb +2 -2
- data/middleman-scavenger.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03fc307b4e2083ec766f6109af7695694015e0a7
|
4
|
+
data.tar.gz: d1419d0d8734fa2efe621f9cfdddcf877699c4ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd574ac3ad9e7d7ff714df4652eaca07f33f871f594c50c71e9065004d48ec3b3e6b8be07635318d561d12186325cdb40a82be5c891ce75fb69b5405270d346
|
7
|
+
data.tar.gz: 36a5f38bdf0d2cc95b83b088e155bf4df8608c77a64322c0570b3158ce1cc299c36be1c9e16247f8ad35911025364471d64d9a2f3d039c006fc85c69b62d6215
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
### 1.0.1 - 2015-11-06
|
4
|
+
Bug fixes
|
5
|
+
- Removes hardcoded "images" path for sprite_path (https://github.com/varvet/middleman-scavenger/issues/1)
|
6
|
+
- Limit file reading to just files with the ".svg" file ending
|
7
|
+
|
8
|
+
### 1.0.0 - 2015-10-17
|
9
|
+
Initial release
|
data/lib/svg_processor.rb
CHANGED
@@ -8,14 +8,14 @@ class SVGProcessor
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def rebuild
|
11
|
-
@svgs = Dir["#{@path}
|
11
|
+
@svgs = Dir["#{@path}/*.svg"].map { |file| get_svg(file) }
|
12
12
|
puts "rebuilding: #{@svgs.length} svgs found"
|
13
13
|
@symbols = @svgs.map { |svg| convert_to_symbol(svg) }
|
14
14
|
|
15
15
|
@symbol_string = @symbols.join("\n")
|
16
16
|
|
17
17
|
if @sprite_path != nil
|
18
|
-
File.write(
|
18
|
+
File.write(@sprite_path, "<svg xmlns=\"http://www.w3.org/2000/svg\">#{@symbol_string}</svg>")
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
data/middleman-scavenger.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-scavenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Halse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -47,6 +47,7 @@ extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
49
|
- ".gitignore"
|
50
|
+
- CHANGELOG.md
|
50
51
|
- Gemfile
|
51
52
|
- README.md
|
52
53
|
- Rakefile
|