pngfix-rails 0.0.1 → 0.0.2

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/lib/pngfix/helper.rb CHANGED
@@ -1,16 +1,23 @@
1
1
  #encoding: utf-8
2
+ require 'active_support/core_ext'
3
+
2
4
  module Pngfix
3
5
  module Helper
4
6
  def pngfix_tags *selectors
5
- concat "<!--[if lt IE 7]>\n".html_safe
7
+ options = selectors.extract_options!
8
+ options[:cc_tag] = true if options[:cc_tag].nil?
9
+ concat("<!--[if lt IE 7]>\n".html_safe) if options[:cc_tag]
6
10
  concat javascript_include_tag("pngfix/DD_belatedPNG")
11
+ concat "\n"
7
12
  concat content_tag(:script, :type => "text/javascript"){
13
+ concat "\n"
8
14
  selectors.each do |selector|
9
- concat "DD_belatedPNG.fix('#{selector}');"
15
+ concat "DD_belatedPNG.fix('#{selector}'); ".html_safe
10
16
  end
11
17
  concat yield if block_given?
18
+ concat "\n"
12
19
  }
13
- concat "\n<![endif]-->".html_safe
20
+ concat("\n<![endif]-->\n".html_safe) if options[:cc_tag]
14
21
  end
15
22
  end
16
- end
23
+ end
@@ -1,4 +1,4 @@
1
1
  #encoding: utf-8
2
2
  module Pngfix
3
- VERSION = "0.0.1"
4
- end
3
+ VERSION = "0.0.2"
4
+ end
data/pngfix-rails.gemspec CHANGED
@@ -4,8 +4,8 @@ require File.expand_path("../lib/pngfix/version", __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["xixilive"]
6
6
  gem.email = ["xixilive@gmail.com"]
7
- gem.description = %q{easy to use DD_belatedPNG in rails}
8
- gem.summary = %q{easy to use DD_belatedPNG in rails}
7
+ gem.description = %q{A easy way to use DD_belatedPNG in rails}
8
+ gem.summary = %q{A easy way to use DD_belatedPNG in rails}
9
9
  gem.homepage = "https://github.com/xixilive/pngfix-rails"
10
10
 
11
11
  gem.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pngfix-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.0'
30
- description: easy to use DD_belatedPNG in rails
30
+ description: A easy way to use DD_belatedPNG in rails
31
31
  email:
32
32
  - xixilive@gmail.com
33
33
  executables: []
@@ -65,8 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  version: '0'
66
66
  requirements: []
67
67
  rubyforge_project:
68
- rubygems_version: 1.8.24
68
+ rubygems_version: 1.8.25
69
69
  signing_key:
70
70
  specification_version: 3
71
- summary: easy to use DD_belatedPNG in rails
71
+ summary: A easy way to use DD_belatedPNG in rails
72
72
  test_files: []