favicon_maker 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/README.md +4 -2
- data/lib/version.rb +1 -1
- data/spec/favicon_maker_spec.rb +40 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/support/favicon_base.png +0 -0
- metadata +12 -4
data/.rspec
ADDED
data/Gemfile
ADDED
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
FaviconMaker
|
2
2
|
============
|
3
3
|
|
4
|
-
|
4
|
+
Tired of creating a gazillion different favicons to satisfy all kinds of devices and resolutions in different file formats?
|
5
|
+
|
6
|
+
I know I was, so I created FaviconMaker to ease the tedious process of creating multiple versions of your favicon.
|
5
7
|
|
6
8
|
The basic idea is to have one image file as source for all the different sizes and or formats (png/ico). If the input folder contains a precomposed file like a visually improved version of the 16x16 favicon.ico this file version will not be generated but the file optionally be copied to the output folder. The remaining versions will still be sourced from the input image defined.
|
7
9
|
|
@@ -40,7 +42,7 @@ Uses the following defaults:
|
|
40
42
|
}
|
41
43
|
|
42
44
|
### Advanced
|
43
|
-
(attempted Rails integration,
|
45
|
+
(untested attempted Rails integration, using all available options. Could be used in a Rake task or Capistrano recipe)
|
44
46
|
|
45
47
|
options = {
|
46
48
|
:versions => [:apple_114, :apple_57, :apple, :fav_png, :fav_ico],
|
data/lib/version.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
describe FaviconMaker, '#create_versions' do
|
3
|
+
|
4
|
+
before(:all) do
|
5
|
+
@versions = []
|
6
|
+
options = {
|
7
|
+
:versions => [:apple_114, :apple_57, :apple, :fav_png, :fav_ico],
|
8
|
+
:custom_versions => {:apple_extreme_retina => {:filename => "apple-touch-icon-228x228-precomposed.png", :dimensions => "228x228", :format => "png"}},
|
9
|
+
:root_dir => File.join(Dir.pwd, "spec"),
|
10
|
+
:input_dir => "support",
|
11
|
+
:base_image => "favicon_base.png",
|
12
|
+
:output_dir => "generated",
|
13
|
+
:copy => true
|
14
|
+
}
|
15
|
+
|
16
|
+
@generated_dir = File.join(options[:root_dir], options[:output_dir])
|
17
|
+
Dir.mkdir(@generated_dir)
|
18
|
+
|
19
|
+
FaviconMaker::Generator.create_versions(options) do |filepath|
|
20
|
+
@versions << filepath
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it "creates 6 different versions" do
|
25
|
+
@versions.size.should eql(6)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "creates 6 files" do
|
29
|
+
@versions.each do |file|
|
30
|
+
File.exists?(file).should be_true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
after(:all) do
|
35
|
+
@versions.each do |file|
|
36
|
+
File.delete(file)
|
37
|
+
end
|
38
|
+
Dir.delete(@generated_dir)
|
39
|
+
end
|
40
|
+
end
|
data/spec/spec_helper.rb
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: favicon_maker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-01 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mini_magick
|
16
|
-
requirement: &
|
16
|
+
requirement: &70131795630020 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70131795630020
|
25
25
|
description: Create favicon files in various sizes from a base image
|
26
26
|
email:
|
27
27
|
executables: []
|
@@ -29,11 +29,16 @@ extensions: []
|
|
29
29
|
extra_rdoc_files: []
|
30
30
|
files:
|
31
31
|
- .gitignore
|
32
|
+
- .rspec
|
33
|
+
- Gemfile
|
32
34
|
- LICENSE
|
33
35
|
- README.md
|
34
36
|
- favicon_maker.gemspec
|
35
37
|
- lib/favicon_maker.rb
|
36
38
|
- lib/version.rb
|
39
|
+
- spec/favicon_maker_spec.rb
|
40
|
+
- spec/spec_helper.rb
|
41
|
+
- spec/support/favicon_base.png
|
37
42
|
homepage: https://github.com/follmann/favicon_maker
|
38
43
|
licenses: []
|
39
44
|
post_install_message:
|
@@ -58,4 +63,7 @@ rubygems_version: 1.8.10
|
|
58
63
|
signing_key:
|
59
64
|
specification_version: 3
|
60
65
|
summary: Create favicon files in various sizes from a base image
|
61
|
-
test_files:
|
66
|
+
test_files:
|
67
|
+
- spec/favicon_maker_spec.rb
|
68
|
+
- spec/spec_helper.rb
|
69
|
+
- spec/support/favicon_base.png
|