html_attributes 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/lib/html_attributes/rails/tag_helper.rb +2 -2
- data/lib/html_attributes/version.rb +2 -2
- data/lib/html_attributes.rb +6 -3
- metadata +2 -3
- data/Gemfile.lock +0 -59
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17207d28d748bc86025194248244278b5baa2f14
|
|
4
|
+
data.tar.gz: f74c943314eb6cf59f24556c2f377406aeb7f55d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f328b93be218490cbeab3ea7d3166b4bfbd6da3f55f0a4895d1bde69ba24f830dfdd907eee4de100f0105760868decab77886a27e861885a8a311a4c64c9e528
|
|
7
|
+
data.tar.gz: da7e48403c5ec0c2764c3786b79b2009a03d2186fe9e4b1081602011e8d2ce4ddb2871af95e565a59a41b548efebc257d5272f715b581bde54c24a3c7d170c1d
|
|
@@ -8,8 +8,8 @@ module HtmlAttributes #:nodoc:
|
|
|
8
8
|
module TagHelper #:nodoc:
|
|
9
9
|
|
|
10
10
|
def self.included(base) #:nodoc:
|
|
11
|
-
base.alias_method :tag_options_without_html_attributes, :tag_options
|
|
12
|
-
base.alias_method :tag_options, :tag_options_with_html_attributes
|
|
11
|
+
base.send(:alias_method, :tag_options_without_html_attributes, :tag_options)
|
|
12
|
+
base.send(:alias_method, :tag_options, :tag_options_with_html_attributes)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def tag_options_with_html_attributes(options, escape = true) #:nodoc:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
module HtmlAttributes
|
|
2
|
-
VERSION = "0.1.
|
|
2
|
+
VERSION = "0.1.3"
|
|
3
3
|
|
|
4
4
|
module Version
|
|
5
5
|
version = VERSION.to_s.split(".").map { |i| i.to_i }
|
|
6
6
|
MAJOR = version[0]
|
|
7
7
|
MINOR = version[1]
|
|
8
|
-
PATCH = version[
|
|
8
|
+
PATCH = version[3]
|
|
9
9
|
STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
|
|
10
10
|
end
|
|
11
11
|
|
data/lib/html_attributes.rb
CHANGED
|
@@ -5,11 +5,14 @@ if defined?(ActionView::Helpers::TagHelper)
|
|
|
5
5
|
|
|
6
6
|
require "html_attributes/rails/tag_helper"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
include HtmlAttributes::TagHelper
|
|
8
|
+
if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR >= 1
|
|
9
|
+
ActionView::Helpers::TagHelper::TagBuilder.send(:include, HtmlAttributes::TagHelper)
|
|
10
|
+
else
|
|
11
|
+
ActionView::Helpers::TagHelper.module_eval do
|
|
12
|
+
include HtmlAttributes::TagHelper
|
|
13
|
+
end
|
|
10
14
|
end
|
|
11
15
|
|
|
12
16
|
ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES.merge(::HtmlAttributes::BOOLEAN_ATTRIBUTES)
|
|
13
17
|
ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES.merge(ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES.map(&:to_sym))
|
|
14
|
-
|
|
15
18
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html_attributes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Sebastian Siwy
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2017-10-
|
|
13
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: actionview
|
|
@@ -56,7 +56,6 @@ extensions: []
|
|
|
56
56
|
extra_rdoc_files: []
|
|
57
57
|
files:
|
|
58
58
|
- Gemfile
|
|
59
|
-
- Gemfile.lock
|
|
60
59
|
- MIT-LICENSE
|
|
61
60
|
- README.md
|
|
62
61
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
html_attributes (0.1.2)
|
|
5
|
-
actionview (>= 4.0, < 5.2)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
actionview (5.1.4)
|
|
11
|
-
activesupport (= 5.1.4)
|
|
12
|
-
builder (~> 3.1)
|
|
13
|
-
erubi (~> 1.4)
|
|
14
|
-
rails-dom-testing (~> 2.0)
|
|
15
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
16
|
-
activesupport (5.1.4)
|
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
|
-
i18n (~> 0.7)
|
|
19
|
-
minitest (~> 5.1)
|
|
20
|
-
tzinfo (~> 1.1)
|
|
21
|
-
builder (3.2.3)
|
|
22
|
-
concurrent-ruby (1.0.5)
|
|
23
|
-
crass (1.0.2)
|
|
24
|
-
diff-lcs (1.1.3)
|
|
25
|
-
erubi (1.6.1)
|
|
26
|
-
i18n (0.8.6)
|
|
27
|
-
loofah (2.1.1)
|
|
28
|
-
crass (~> 1.0.2)
|
|
29
|
-
nokogiri (>= 1.5.9)
|
|
30
|
-
mini_portile2 (2.3.0)
|
|
31
|
-
minitest (5.10.3)
|
|
32
|
-
nokogiri (1.8.1)
|
|
33
|
-
mini_portile2 (~> 2.3.0)
|
|
34
|
-
rails-dom-testing (2.0.3)
|
|
35
|
-
activesupport (>= 4.2.0)
|
|
36
|
-
nokogiri (>= 1.6)
|
|
37
|
-
rails-html-sanitizer (1.0.3)
|
|
38
|
-
loofah (~> 2.0)
|
|
39
|
-
rspec (2.11.0)
|
|
40
|
-
rspec-core (~> 2.11.0)
|
|
41
|
-
rspec-expectations (~> 2.11.0)
|
|
42
|
-
rspec-mocks (~> 2.11.0)
|
|
43
|
-
rspec-core (2.11.1)
|
|
44
|
-
rspec-expectations (2.11.3)
|
|
45
|
-
diff-lcs (~> 1.1.3)
|
|
46
|
-
rspec-mocks (2.11.2)
|
|
47
|
-
thread_safe (0.3.6)
|
|
48
|
-
tzinfo (1.2.3)
|
|
49
|
-
thread_safe (~> 0.1)
|
|
50
|
-
|
|
51
|
-
PLATFORMS
|
|
52
|
-
ruby
|
|
53
|
-
|
|
54
|
-
DEPENDENCIES
|
|
55
|
-
html_attributes!
|
|
56
|
-
rspec
|
|
57
|
-
|
|
58
|
-
BUNDLED WITH
|
|
59
|
-
1.15.4
|