ie_conditional_tag 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 63e9ad85af0e4cb414affcba453804b7813a840f
4
+ data.tar.gz: 1f2dd4f0a43555771ee02784c5ae865a765e7eb1
5
+ SHA512:
6
+ metadata.gz: 4f930dba3c2f912243eead69d0f7a689127d35050454fb858a831fb4c0b66ccfb0ef8f4e62e37f153b775318cf928632dbd40fbaee8a07e8e239c956817a94e6
7
+ data.tar.gz: 9dd3493aca4b365915ce4475bffd38cd6818f6f7574a985c3140f82efc6ffe19c201faac74083f5c85ad78a8ac108e669457c5563485d2060410329c97ada563
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,25 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ *.gem
23
+ coverage
24
+ .bundle
25
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # A sample Gemfile
2
+ source "https://rubygems.org"
3
+
4
+ gem "rails"
5
+ gem "simplecov"
6
+ gem "rdoc"
data/README.md CHANGED
@@ -14,44 +14,50 @@ Example
14
14
  Shown generating the `html` tag (as [recommended][1]), and adding a
15
15
  custom class:
16
16
 
17
- <!DOCTYPE html>
18
- <%= ie_conditional_tag :html, :class => 'some-custom-class' %>
19
- <head>
20
- <title>New HTML5 page</title>
21
- </head>
22
- <body>
23
- <%= yield %>
24
- </body>
25
- </html>
17
+ ```erb
18
+ <!DOCTYPE html>
19
+ <%= ie_conditional_tag :html, class: 'some-custom-class' %>
20
+ <head>
21
+ <title>New HTML5 page</title>
22
+ </head>
23
+ <body>
24
+ <%= yield %>
25
+ </body>
26
+ </html>
27
+ ```
26
28
 
27
29
  This would give you (with some prettied indentation):
28
30
 
29
- <!DOCTYPE html>
30
- <!--[if lt IE 7]><html class="ie ie6 some-custom-class"><![endif]-->
31
- <!--[if IE 7]><html class="ie ie7 some-custom-class"><![endif]-->
32
- <!--[if IE 8]><html class="ie ie8 some-custom-class"><![endif]-->
33
- <!--[if IE 9]><html class="ie ie9 some-custom-class"><![endif]-->
34
- <!--[if gt IE 9]><html class="ie some-custom-class"><![endif]-->
35
- <!--[if !IE]><!--><html class="some-custom-class"><!--<![endif]-->
36
- <head>
37
- <title>New HTML5 page</title>
38
- </head>
39
- <body>
40
- <!-- your content -->
41
- </body>
42
- </html>
31
+ ```html
32
+ <!DOCTYPE html>
33
+ <!--[if lt IE 7]><html class="ie ie6 some-custom-class"><![endif]-->
34
+ <!--[if IE 7]><html class="ie ie7 some-custom-class"><![endif]-->
35
+ <!--[if IE 8]><html class="ie ie8 some-custom-class"><![endif]-->
36
+ <!--[if IE 9]><html class="ie ie9 some-custom-class"><![endif]-->
37
+ <!--[if gt IE 9]><html class="ie some-custom-class"><![endif]-->
38
+ <!--[if !IE]><!--><html class="some-custom-class"><!--<![endif]-->
39
+ <head>
40
+ <title>New HTML5 page</title>
41
+ </head>
42
+ <body>
43
+ <!-- your content -->
44
+ </body>
45
+ </html>
46
+ ```
43
47
 
44
48
  `ie_conditional_tag` will also accept a block, so this also works:
45
-
46
- <!DOCTYPE html>
47
- <%= ie_conditional_tag :html, :class => 'some-custom-class' do %>
48
- <head>
49
- <title>New HTML5 page</title>
50
- </head>
51
- <body>
52
- <%= yield %>
53
- </body>
54
- <% end %>
49
+
50
+ ```html
51
+ <!DOCTYPE html>
52
+ <%= ie_conditional_tag :html, class: 'some-custom-class' do %>
53
+ <head>
54
+ <title>New HTML5 page</title>
55
+ </head>
56
+ <body>
57
+ <%= yield %>
58
+ </body>
59
+ <% end %>
60
+ ```
55
61
 
56
62
  Wait, that's an ugly name!
57
63
  --------------------------
@@ -59,34 +65,40 @@ Wait, that's an ugly name!
59
65
  We aimed for descriptive and agnostic; you may want to add a helper to
60
66
  call it, eg:
61
67
 
62
- module ApplicationHelper
68
+ ```ruby
69
+ module ApplicationHelper
63
70
 
64
- # ...
71
+ # ...
65
72
 
66
- def html_tag(*args, &block)
67
- ie_conditional_tag(*args, &block)
68
- end
73
+ def html_tag(*args, &block)
74
+ ie_conditional_tag(*args, &block)
75
+ end
69
76
 
70
- end
77
+ end
78
+ ```
71
79
 
72
80
  Installation
73
81
  ------------
74
82
 
75
83
  Use bundler. In your `Gemfile`:
76
84
 
77
- gem 'ie_conditional_tag'
85
+ ```ruby
86
+ gem 'ie_conditional_tag'
87
+ ```
78
88
 
79
89
  Install it:
80
90
 
81
- $ bundler install
91
+ ```shell
92
+ $ bundler install
93
+ ```
82
94
 
83
95
  Then, run the following:
84
96
 
85
- $ rails generate ie_conditional_tag:install
86
-
87
- This will add the following initializer:
97
+ ```shell
98
+ $ rails generate ie_conditional_tag:install
99
+ ```
88
100
 
89
- config/initializers/ie_conditional_tag.rb
101
+ This will add `config/initializers/ie_conditional_tag.rb`.
90
102
 
91
103
  You may want to look/tweak the settings there.
92
104
 
@@ -104,13 +116,10 @@ Dependencies
104
116
 
105
117
  This plugin is only designed to work with Rails 3.0+.
106
118
 
107
- Note: We're happy to accept pull requests that add backwards
108
- compatibility with older versions of Rails.
109
-
110
119
  Copyright
111
120
  ---------
112
121
 
113
- Copyright (c) 2010 Anthony Burns, Bruce Williams. See LICENSE for
122
+ Copyright (c) 2010-2014 Anthony Burns, Bruce Williams. See LICENSE for
114
123
  details.
115
124
 
116
125
  [1]: http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+ Rake::TestTask.new(:test) do |test|
5
+ test.libs << 'lib' << 'test'
6
+ test.pattern = 'test/**/test_*.rb'
7
+ test.verbose = true
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ie_conditional_tag/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ie_conditional_tag"
8
+ spec.version = IEConditionalTag::VERSION
9
+ spec.authors = ["Anthony Burns", "Bruce Williams"]
10
+ spec.email = ["brwcodes@gmail.com"]
11
+ spec.description = "Provides an easy-to-use helper for generating multiple tags inside IE-specific conditional comments"
12
+ spec.summary = "IE conditional comments for Rails"
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "rails", ">= 3.0"
22
+ spec.add_development_dependency "bundler", "~> 1.3"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "simplecov"
25
+ spec.add_development_dependency "rcov"
26
+ end
@@ -1,3 +1,3 @@
1
1
  module IEConditionalTag
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -1,14 +1,15 @@
1
1
  require 'rubygems'
2
2
  require 'test/unit'
3
+
3
4
  require 'active_support'
4
5
  require 'active_support/core_ext'
5
6
  require 'action_view'
6
7
  require 'action_controller'
7
8
  require 'action_controller/test_case'
8
9
 
9
- begin
10
- require 'turn'
11
- rescue LoadError
10
+ if ENV['COVERAGE']
11
+ require 'simplecov'
12
+ SimpleCov.start
12
13
  end
13
14
 
14
15
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
@@ -13,5 +13,5 @@ class TestConfiguration < ActiveSupport::TestCase
13
13
  end
14
14
  assert_equal 1, IEConditionalTag.config.conditions.size
15
15
  end
16
-
16
+
17
17
  end
metadata CHANGED
@@ -1,43 +1,105 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ie_conditional_tag
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.5.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Anthony Burns
9
8
  - Bruce Williams
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
-
14
- date: 2011-05-09 00:00:00 -07:00
15
- default_executable:
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
12
+ date: 2014-03-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
18
15
  name: rails
19
- prerelease: false
20
- requirement: &id001 !ruby/object:Gem::Requirement
21
- none: false
22
- requirements:
23
- - - ~>
24
- - !ruby/object:Gem::Version
25
- version: "3.0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '3.0'
26
21
  type: :runtime
27
- version_requirements: *id001
28
- description: Provides an easy-to-use helper for generating multiple tags inside IE-specific conditional comments
29
- email:
30
- - bruce@codefluency.com
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '3.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.3'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: simplecov
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rcov
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ description: Provides an easy-to-use helper for generating multiple tags inside IE-specific
85
+ conditional comments
86
+ email:
87
+ - brwcodes@gmail.com
31
88
  executables: []
32
-
33
89
  extensions: []
34
-
35
90
  extra_rdoc_files: []
36
-
37
- files:
91
+ files:
92
+ - ".document"
93
+ - ".gitignore"
94
+ - Gemfile
95
+ - LICENSE
96
+ - README.md
97
+ - Rakefile
98
+ - ie_conditional_tag.gemspec
38
99
  - lib/generators/ie_conditional_tag/install_generator.rb
39
- - lib/generators/templates/ie_conditional_tag.rb
40
100
  - lib/generators/templates/README
101
+ - lib/generators/templates/ie_conditional_tag.rb
102
+ - lib/ie_conditional_tag.rb
41
103
  - lib/ie_conditional_tag/condition.rb
42
104
  - lib/ie_conditional_tag/configuration.rb
43
105
  - lib/ie_conditional_tag/dsl.rb
@@ -46,40 +108,36 @@ files:
46
108
  - lib/ie_conditional_tag/railtie.rb
47
109
  - lib/ie_conditional_tag/unprotected_condition.rb
48
110
  - lib/ie_conditional_tag/version.rb
49
- - lib/ie_conditional_tag.rb
50
111
  - test/helper.rb
51
112
  - test/test_condition.rb
52
113
  - test/test_configuration.rb
53
114
  - test/test_tag_helper.rb
54
- - LICENSE
55
- - README.md
56
- has_rdoc: true
57
- homepage: http://github.com/bruce/ie_conditional_tag
58
- licenses: []
59
-
115
+ homepage: ''
116
+ licenses:
117
+ - MIT
118
+ metadata: {}
60
119
  post_install_message:
61
120
  rdoc_options: []
62
-
63
- require_paths:
121
+ require_paths:
64
122
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
123
+ required_ruby_version: !ruby/object:Gem::Requirement
124
+ requirements:
68
125
  - - ">="
69
- - !ruby/object:Gem::Version
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
74
130
  - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 1.3.6
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
77
133
  requirements: []
78
-
79
134
  rubyforge_project:
80
- rubygems_version: 1.6.2
135
+ rubygems_version: 2.2.0
81
136
  signing_key:
82
- specification_version: 3
137
+ specification_version: 4
83
138
  summary: IE conditional comments for Rails
84
- test_files: []
85
-
139
+ test_files:
140
+ - test/helper.rb
141
+ - test/test_condition.rb
142
+ - test/test_configuration.rb
143
+ - test/test_tag_helper.rb