generate_data_uri 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/generate_data_uri.rb +1 -1
  2. metadata +5 -7
@@ -14,7 +14,7 @@ module GenerateDataUri
14
14
 
15
15
  @_uri_cache ||= {}
16
16
  data = Base64.encode64(File.open(path, 'rb') {|f| f.read }).gsub(/\n/, '')
17
- content_type = MIME::Types.type_for(path)
17
+ content_type = MIME::Types.type_for(path).first
18
18
 
19
19
  @_uri_cache[path] = "data:#{content_type};charset=utf-8;base64,#{data}"
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: generate_data_uri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-29 00:00:00.000000000 -04:00
13
- default_executable:
12
+ date: 2012-03-20 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: mime-types
17
- requirement: &2165493980 !ruby/object:Gem::Requirement
16
+ requirement: &70343808039980 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,7 +21,7 @@ dependencies:
22
21
  version: '1.1'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2165493980
24
+ version_requirements: *70343808039980
26
25
  description: Turn a file into a string to embed as a data-uri in your HTML.
27
26
  email: nick.ragaz@gmail.com
28
27
  executables: []
@@ -33,7 +32,6 @@ files:
33
32
  - MIT-LICENSE
34
33
  - Rakefile
35
34
  - README.md
36
- has_rdoc: true
37
35
  homepage: http://github.com/nragaz/generate_data_uri
38
36
  licenses: []
39
37
  post_install_message:
@@ -54,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
52
  version: '0'
55
53
  requirements: []
56
54
  rubyforge_project:
57
- rubygems_version: 1.6.2
55
+ rubygems_version: 1.8.11
58
56
  signing_key:
59
57
  specification_version: 3
60
58
  summary: Turn a file into a string to embed as a data-uri in your HTML.