Permalink
Browse files

Read images to embed as binaries

  • Loading branch information...
1 parent 66984a4 commit 1c08cfe494259e50d481491dafa68f673f3dcf70 @cjohansen committed May 3, 2012
Showing with 31 additions and 9 deletions.
  1. +8 −4 Gemfile.lock
  2. +3 −0 History.txt
  3. +1 −1 VERSION
  4. +17 −2 juicer.gemspec
  5. +1 −1 lib/juicer.rb
  6. +1 −1 lib/juicer/image_embed.rb
View
@@ -1,9 +1,9 @@
PATH
remote: .
specs:
- juicer (1.0.9)
+ juicer (1.0.15)
cmdparse
- nokogiri
+ nokogiri (>= 1.5.0)
rubyzip
GEM
@@ -17,17 +17,21 @@ GEM
git (>= 1.2.5)
rake
mocha (0.9.12)
- nokogiri (1.4.4.1-x86-mingw32)
+ nokogiri (1.5.2)
+ nokogiri (1.5.2-x86-mingw32)
rake (0.9.0)
- rubyzip (0.9.4)
+ redgreen (1.2.2)
+ rubyzip (0.9.8)
shoulda (2.11.3)
PLATFORMS
+ ruby
x86-mingw32
DEPENDENCIES
fakefs (>= 0.2.1)
jeweler (>= 0.2.1)
juicer!
mocha (>= 0.9.8)
+ redgreen (>= 1.2.2)
shoulda (>= 2.10.2)
View
@@ -1,3 +1,6 @@
+== 1.0.16 / 2012-05-02
+* Fix problem with image embeds on Windows (Wesley Crossman)
+
== 1.0.15 / 2012-04-17
* Fix stupid depend-on-self-issue (again!)
View
@@ -1 +1 @@
-1.0.15
+1.0.16
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{juicer}
- s.version = "1.0.15"
+ s.version = "1.0.16"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Christian Johansen"]
- s.date = %q{2012-04-17}
+ s.date = %q{2012-05-03}
s.default_executable = %q{juicer}
s.description = %q{Resolve dependencies, merge and minify CSS and JavaScript files with Juicer - the command line tool for frontend engineers}
s.email = %q{christian@cjohansen.no}
@@ -154,6 +154,11 @@ Happy juicing!
s.add_development_dependency(%q<fakefs>, [">= 0.2.1"])
s.add_development_dependency(%q<jeweler>, [">= 0.2.1"])
s.add_development_dependency(%q<redgreen>, [">= 1.2.2"])
+ s.add_development_dependency(%q<shoulda>, [">= 2.10.2"])
+ s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
+ s.add_development_dependency(%q<fakefs>, [">= 0.2.1"])
+ s.add_development_dependency(%q<jeweler>, [">= 0.2.1"])
+ s.add_development_dependency(%q<redgreen>, [">= 1.2.2"])
s.add_runtime_dependency(%q<cmdparse>, [">= 0"])
s.add_runtime_dependency(%q<nokogiri>, [">= 1.5.0"])
s.add_runtime_dependency(%q<rubyzip>, [">= 0"])
@@ -167,6 +172,11 @@ Happy juicing!
s.add_dependency(%q<fakefs>, [">= 0.2.1"])
s.add_dependency(%q<jeweler>, [">= 0.2.1"])
s.add_dependency(%q<redgreen>, [">= 1.2.2"])
+ s.add_dependency(%q<shoulda>, [">= 2.10.2"])
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
+ s.add_dependency(%q<fakefs>, [">= 0.2.1"])
+ s.add_dependency(%q<jeweler>, [">= 0.2.1"])
+ s.add_dependency(%q<redgreen>, [">= 1.2.2"])
s.add_dependency(%q<cmdparse>, [">= 0"])
s.add_dependency(%q<nokogiri>, [">= 1.5.0"])
s.add_dependency(%q<rubyzip>, [">= 0"])
@@ -181,6 +191,11 @@ Happy juicing!
s.add_dependency(%q<fakefs>, [">= 0.2.1"])
s.add_dependency(%q<jeweler>, [">= 0.2.1"])
s.add_dependency(%q<redgreen>, [">= 1.2.2"])
+ s.add_dependency(%q<shoulda>, [">= 2.10.2"])
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
+ s.add_dependency(%q<fakefs>, [">= 0.2.1"])
+ s.add_dependency(%q<jeweler>, [">= 0.2.1"])
+ s.add_dependency(%q<redgreen>, [">= 1.2.2"])
s.add_dependency(%q<cmdparse>, [">= 0"])
s.add_dependency(%q<nokogiri>, [">= 1.5.0"])
s.add_dependency(%q<rubyzip>, [">= 0"])
View
@@ -3,7 +3,7 @@
module Juicer
# :stopdoc:
- VERSION = '1.0.15'
+ VERSION = "1.0.16"
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
LOGGER = Logger.new(STDOUT)
@@ -102,7 +102,7 @@ def embed_data_uri( path )
if File.exist?( filename )
# read contents of file into memory
- content = File.read( filename )
+ content = File.open(filename, "rb") { |f| f.read }
content_type = "image/#{filetype}"
# encode the url

0 comments on commit 1c08cfe

Please sign in to comment.