middleman-favicon-maker 0.0.6 → 3.0.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.
data/.gitignore CHANGED
@@ -1,5 +1,53 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
1
13
  *.gem
2
14
  .bundle
3
15
  Gemfile.lock
4
- pkg/*
16
+
17
+ # jeweler generated
18
+ pkg
19
+
20
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
21
+ #
22
+ # * Create a file at ~/.gitignore
23
+ # * Include files you want ignored
24
+ # * Run: git config --global core.excludesfile ~/.gitignore
25
+ #
26
+ # After doing this, these files will be ignored in all your git projects,
27
+ # saving you from having to 'pollute' every project you touch with them
28
+ #
29
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
30
+ #
31
+ # For MacOS:
32
+ #
33
+ #.DS_Store
34
+
35
+ # For TextMate
36
+ #*.tmproj
37
+ #tmtags
38
+
39
+ # For emacs:
40
+ #*~
41
+ #\#*
42
+ #.\#*
43
+
44
+ # For vim:
45
+ #*.swp
46
+
47
+ # For redcar:
48
+ #.redcar
49
+
50
+ # For rubinius:
51
+ #*.rbc
52
+
5
53
  .rvmrc
data/Gemfile CHANGED
@@ -1,4 +1,15 @@
1
- source "http://rubygems.org"
1
+ source :rubygems
2
2
 
3
3
  # Specify your gem's dependencies in middleman-favicon-maker.gemspec
4
4
  gemspec
5
+
6
+
7
+ # Add dependencies to develop your gem here.
8
+ # Include everything needed to run rake, tests, features, etc.
9
+ group :development do
10
+ gem "shoulda", ">= 0"
11
+ gem "rdoc", "~> 3.12"
12
+ gem "bundler", "~> 1.1.4"
13
+ gem "jeweler", "~> 1.8.4"
14
+ gem "simplecov"
15
+ end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Andreas Follmann
1
+ Copyright (c) 2012 Kematzy, Andreas Follmann, Thomas Reynolds
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,10 +1,22 @@
1
1
  middleman-favicon-maker
2
2
  =======================
3
- Generate favicon files in various sizes from a base image in your middleman project.
3
+ Generate favicon files in various sizes from a base image in your [Middleman](http://middlemanapp.com/) project.
4
+
5
+ This gem integrates []FaviconMaker](https://github.com/follmann/favicon_maker) effortless into your [Middleman](https://github.com/middleman/middleman) project.
6
+
7
+
8
+ ## IMPORTANT:
9
+
10
+ **Updated to support Middleman version 3.0.0 and above.**
11
+
12
+ Due to Middleman code changes **this version is NOT compatible with version 2.x installs of Middleman**.
13
+
14
+ Use version **0.0.6** of the `middleman-favicon-maker` gem for version 2.x installs of Middleman.
15
+
4
16
 
5
- This gem integrates [FaviconMaker](https://github.com/follmann/favicon_maker) effortless into your [Middleman](https://github.com/tdreyno/middleman) project.
6
17
 
7
18
  ## Install
19
+
8
20
  ### Standalone
9
21
  gem install middleman-favicon-maker
10
22
 
@@ -12,8 +24,9 @@ This gem integrates [FaviconMaker](https://github.com/follmann/favicon_maker) ef
12
24
  gem "middleman-favicon-maker"
13
25
 
14
26
  ## How to integrate into a middleman project
15
- 1. Put a file called favicon_base.png into your source folder (ideally with the dimensions of 114x114 pixels)
16
- 2. In your config.rb extend the configure :build block with:
27
+ 1. Put a file called **favicon_base.png** into your source folder (ideally with the **dimensions of 114x114 pixels**)
28
+ <br><br>
29
+ 2. In your config.rb extend the `configure :build` block with:
17
30
 
18
31
  configure :build do
19
32
  ...
@@ -21,7 +34,7 @@ This gem integrates [FaviconMaker](https://github.com/follmann/favicon_maker) ef
21
34
  ...
22
35
  end
23
36
 
24
- That results in the following files being created on middleman build:
37
+ That results in the following files being created in your middleman build directory:
25
38
 
26
39
  build/apple-touch-icon-57x57-precomposed.png
27
40
  build/apple-touch-icon-72x72-precomposed.png
@@ -34,18 +47,25 @@ That results in the following files being created on middleman build:
34
47
  **NOTE: The base image will not be copied to the build folder.**
35
48
 
36
49
  ## Customise integration
37
- You can set the following options for favicon-maker:
38
-
39
- :favicon_root_dir # default: app.root
40
- :favicon_input_dir # default: app.views -> source/
41
- :favicon_output_dir # default: app.build_dir -> build/
42
- :favicon_base_image # default: "favicon_base.png"
43
- :favicon_versions # default: ::FaviconMaker::Generator::ICON_VERSIONS.keys
44
- :favicon_custom_versions # default: {}
50
+
51
+
52
+ **NOTE! v3.x of this gem uses a `favicon_maker_` prefix on the configuration options, whereas v.0.0.6 uses a `favicon_` prefix only.**
53
+
54
+ **Why the change? Consistency with the official activation keyword `:favicon_maker`.**
55
+
56
+
57
+ You can set the following options for `middleman-favicon-maker`:
58
+
59
+ :favicon_maker_root_dir # default: app.root
60
+ :favicon_maker_input_dir # default: app.views -> source/
61
+ :favicon_maker_output_dir # default: app.build_dir -> build/
62
+ :favicon_maker_base_image # default: "favicon_base.png"
63
+ :favicon_maker_versions # default: ::FaviconMaker::Generator::ICON_VERSIONS.keys
64
+ :favicon_maker_custom_versions # default: {}
45
65
 
46
66
  e.g.
47
- set :favicon_input_dir, "favicons"
48
- set :favicon_custom_versions, {:apple_extreme_retina => {:filename => "apple-touch-icon-228x228-precomposed.png", :dimensions => "228x228", :format => "png"}}
67
+ set :favicon_maker_input_dir, "favicons"
68
+ set :favicon_maker_custom_versions, {:apple_extreme_retina => {:filename => "apple-touch-icon-228x228-precomposed.png", :dimensions => "228x228", :format => "png"}}
49
69
 
50
70
  ## Copyright
51
71
 
data/Rakefile ADDED
@@ -0,0 +1,43 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "middleman-favicon-maker"
18
+ gem.homepage = "https://github.com/follmann/middleman-favicon-maker"
19
+ gem.summary = %q{Generate favicon files in various sizes from a base image in your Middleman project}
20
+ gem.description = %q{Generate favicon files in various sizes from a base image in your Middleman project}
21
+ gem.authors = ["Andreas Follmann", "Kematzy"]
22
+ # dependencies defined in Gemfile
23
+ end
24
+ Jeweler::RubygemsDotOrgTasks.new
25
+
26
+ require 'rake/testtask'
27
+ Rake::TestTask.new(:test) do |test|
28
+ test.libs << 'lib' << 'test'
29
+ test.pattern = 'test/**/test_*.rb'
30
+ test.verbose = true
31
+ end
32
+
33
+ task :default => :test
34
+
35
+ require 'rdoc/task'
36
+ Rake::RDocTask.new do |rdoc|
37
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
38
+
39
+ rdoc.rdoc_dir = 'rdoc'
40
+ rdoc.title = "middleman-favicon-maker #{version}"
41
+ rdoc.rdoc_files.include('README*')
42
+ rdoc.rdoc_files.include('lib/**/*.rb')
43
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 3.0.0
@@ -1,39 +1,6 @@
1
- module Middleman
2
- module Features
3
- module FaviconMaker
4
- class << self
5
- def registered(app)
6
- require "favicon_maker"
7
-
8
- app.set :favicon_root_dir, app.root
9
- app.set :favicon_input_dir, app.views
10
- app.set :favicon_output_dir, app.build_dir
11
- app.set :favicon_base_image, "favicon_base.png"
12
- app.set :favicon_versions, ::FaviconMaker::Generator::ICON_VERSIONS.keys
13
- app.set :favicon_custom_versions, {}
14
-
15
- app.after_build do
16
- ::FaviconMaker::Generator.create_versions({
17
- :root_dir => app.settings.favicon_root_dir,
18
- :input_dir => app.settings.favicon_input_dir,
19
- :output_dir => app.settings.favicon_output_dir,
20
- :base_image => app.settings.favicon_base_image,
21
- :versions => app.settings.favicon_versions,
22
- :custom_versions => app.settings.favicon_custom_versions,
23
- }) do |filepath|
24
- say_status :generated, filepath.gsub(app.root + "/", "")
25
- end
26
- end
27
-
28
- # exclude favicon_base_image from being copied to build dir
29
- app.build_reroute do |destination, request_path|
30
- if request_path.include? app.settings.favicon_base_image
31
- throw
32
- end
33
- end
34
- end
35
- alias :included :registered
36
- end
37
- end
38
- end
1
+ require "middleman-core"
2
+
3
+ ::Middleman::Extensions.register(:favicon_maker) do
4
+ require "middleman-favicon-maker/extension"
5
+ ::Middleman::FaviconMaker
39
6
  end
@@ -0,0 +1,56 @@
1
+ module Middleman
2
+ module FaviconMaker
3
+ class << self
4
+ def registered(app, options={})
5
+ app.set :favicon_maker_root_dir, ""
6
+ app.set :favicon_maker_input_dir, ""
7
+ app.set :favicon_maker_output_dir, ""
8
+ app.set :favicon_maker_base_image, "favicon_base.png"
9
+ app.set :favicon_maker_versions, []
10
+ app.set :favicon_maker_custom_versions, {}
11
+
12
+ app.after_configuration do
13
+ # configs are either default or set by user in config.rb
14
+ # due to Middleman extension limitations, we need to ensure they are sane
15
+ # before we continue
16
+ app.set :favicon_maker_root_dir, root if favicon_maker_root_dir.empty?
17
+ app.set :favicon_maker_input_dir, source if favicon_maker_input_dir.empty?
18
+ app.set :favicon_maker_output_dir, build_dir if favicon_maker_output_dir.empty?
19
+ app.set :favicon_maker_base_image, "favicon_base.png" if favicon_maker_base_image.empty?
20
+
21
+ unless favicon_maker_root_dir.empty?
22
+ require "favicon_maker"
23
+ if favicon_maker_versions.empty?
24
+ app.set :favicon_maker_versions, ::FaviconMaker::Generator::ICON_VERSIONS.keys
25
+ end
26
+ end
27
+
28
+ end
29
+
30
+ app.after_build do |builder|
31
+
32
+ ::FaviconMaker::Generator.create_versions({
33
+ :root_dir => favicon_maker_root_dir,
34
+ :input_dir => favicon_maker_input_dir,
35
+ :output_dir => favicon_maker_output_dir,
36
+ :base_image => favicon_maker_base_image,
37
+ :versions => favicon_maker_versions,
38
+ :custom_versions => favicon_maker_custom_versions,
39
+ :copy => true
40
+ }) do |f|
41
+ builder.say_status :generated, f.gsub(root + "/", "")
42
+ end
43
+
44
+ # remove favicon_base_image from the build dir
45
+ builder.remove_file File.join(favicon_maker_root_dir, favicon_maker_output_dir, favicon_maker_base_image)
46
+
47
+ end
48
+
49
+ end
50
+ alias :included :registered
51
+
52
+ end
53
+
54
+ end
55
+
56
+ end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module FaviconMaker
3
- VERSION = "0.0.6"
3
+ VERSION = "3.0.0"
4
4
  end
5
5
  end
File without changes
@@ -1,21 +1,23 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "version"
3
+ require "middleman-favicon-maker/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "middleman-favicon-maker"
7
7
  s.version = Middleman::FaviconMaker::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Andreas Follmann"]
9
+ s.authors = ["Andreas Follmann", "Kematzy"]
10
10
  #s.email = [""]
11
11
  s.homepage = "https://github.com/follmann/middleman-favicon-maker"
12
- s.summary = %q{Generate favicon files in various sizes from a base image in your middleman project}
13
- s.description = %q{Generate favicon files in various sizes from a base image in your middleman project}
12
+ s.summary = %q{Generate favicon files in various sizes from a base image in your Middleman project}
13
+ s.description = %q{Generate favicon files in various sizes from a base image in your Middleman project}
14
14
 
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
19
 
20
- s.add_runtime_dependency("favicon_maker", ["~>0.0.5"])
21
- end
20
+ # Additional dependencies
21
+ s.add_runtime_dependency("middleman-core", [">= 3.0.0"])
22
+ s.add_runtime_dependency("favicon_maker", ["~>0.0.7"])
23
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'middleman-favicon-maker'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestMiddlemanFaviconMaker < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata CHANGED
@@ -1,28 +1,50 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-favicon-maker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 3.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Andreas Follmann
9
+ - Kematzy
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2011-11-01 00:00:00.000000000Z
13
+ date: 2012-08-06 00:00:00.000000000 Z
13
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: middleman-core
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 3.0.0
14
31
  - !ruby/object:Gem::Dependency
15
32
  name: favicon_maker
16
- requirement: &70209257017680 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
17
34
  none: false
18
35
  requirements:
19
36
  - - ~>
20
37
  - !ruby/object:Gem::Version
21
- version: 0.0.5
38
+ version: 0.0.7
22
39
  type: :runtime
23
40
  prerelease: false
24
- version_requirements: *70209257017680
25
- description: Generate favicon files in various sizes from a base image in your middleman
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 0.0.7
47
+ description: Generate favicon files in various sizes from a base image in your Middleman
26
48
  project
27
49
  email:
28
50
  executables: []
@@ -33,10 +55,15 @@ files:
33
55
  - Gemfile
34
56
  - LICENSE
35
57
  - README.md
58
+ - Rakefile
59
+ - VERSION
36
60
  - lib/middleman-favicon-maker.rb
37
- - lib/middleman_init.rb
38
- - lib/version.rb
61
+ - lib/middleman-favicon-maker/extension.rb
62
+ - lib/middleman-favicon-maker/version.rb
63
+ - lib/middleman_extension.rb
39
64
  - middleman-favicon-maker.gemspec
65
+ - test/helper.rb
66
+ - test/test_middleman-favicon-maker.rb
40
67
  homepage: https://github.com/follmann/middleman-favicon-maker
41
68
  licenses: []
42
69
  post_install_message:
@@ -57,9 +84,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
84
  version: '0'
58
85
  requirements: []
59
86
  rubyforge_project:
60
- rubygems_version: 1.8.10
87
+ rubygems_version: 1.8.23
61
88
  signing_key:
62
89
  specification_version: 3
63
- summary: Generate favicon files in various sizes from a base image in your middleman
90
+ summary: Generate favicon files in various sizes from a base image in your Middleman
64
91
  project
65
- test_files: []
92
+ test_files:
93
+ - test/helper.rb
94
+ - test/test_middleman-favicon-maker.rb