arbre 1.0.3 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/CHANGELOG.md +7 -1
- data/Gemfile +2 -0
- data/lib/arbre/html/tag.rb +4 -1
- data/lib/arbre/version.rb +1 -1
- data/spec/arbre/unit/html/tag_spec.rb +12 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57a6141066e9591c4c32540dcf3a5a6651269f6c
|
4
|
+
data.tar.gz: 879e1cd23e915f6cf8b12db9fc2a3e62290e9b3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4756d852190900a69fb2c43667c370b1c2ec06759169ad769298e0f5b1d5a8656857b55bd74c2ca7c0ff606a8ab0f67d377ed7040ccca78df4ad0dd38c30abe3
|
7
|
+
data.tar.gz: c33cb32cbf8708c9d0f29a417235708008e4ffe5f9632d1e0246e971dc9b7e8755733ba409bc75036573ffa167fbdfab65a8a008aded2268c0e75e86142cb004
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
## unreleased [☰](https://github.com/activeadmin/arbre/compare/v1.0
|
1
|
+
## unreleased [☰](https://github.com/activeadmin/arbre/compare/v1.1.0...master)
|
2
|
+
|
3
|
+
## 1.1.0 [☰](https://github.com/activeadmin/arbre/compare/v1.0.3...v1.1.0)
|
4
|
+
|
5
|
+
* Tag option `for` sets the attribute when value is a string or symbol [#49][] by [@ramontayag][]
|
2
6
|
|
3
7
|
## 1.0.3 [☰](https://github.com/activeadmin/arbre/compare/v1.0.2...v1.0.3)
|
4
8
|
|
@@ -51,6 +55,7 @@ Initial release and extraction from Active Admin
|
|
51
55
|
[#36]: https://github.com/activeadmin/arbre/issues/36
|
52
56
|
[#39]: https://github.com/activeadmin/arbre/issues/39
|
53
57
|
[#40]: https://github.com/activeadmin/arbre/issues/40
|
58
|
+
[#49]: https://github.com/activeadmin/arbre/issues/49
|
54
59
|
[@LTe]: https://github.com/LTe
|
55
60
|
[@OscarBarrett]: https://github.com/OscarBarrett
|
56
61
|
[@alexesDev]: https://github.com/alexesDev
|
@@ -58,4 +63,5 @@ Initial release and extraction from Active Admin
|
|
58
63
|
[@gregbell]: https://github.com/gregbell
|
59
64
|
[@jpmckinney]: https://github.com/jpmckinney
|
60
65
|
[@kaapa]: https://github.com/kaapa
|
66
|
+
[@ramontayag]: https://github.com/ramontayag
|
61
67
|
[@seanlinsley]: https://github.com/seanlinsley
|
data/Gemfile
CHANGED
data/lib/arbre/html/tag.rb
CHANGED
@@ -20,7 +20,10 @@ module Arbre
|
|
20
20
|
attributes = extract_arguments(args)
|
21
21
|
self.content = args.first if args.first
|
22
22
|
|
23
|
-
|
23
|
+
for_value = attributes[:for]
|
24
|
+
unless for_value.is_a?(String) || for_value.is_a?(Symbol)
|
25
|
+
set_for_attribute(attributes.delete(:for))
|
26
|
+
end
|
24
27
|
|
25
28
|
attributes.each do |key, value|
|
26
29
|
set_attribute(key, value)
|
data/lib/arbre/version.rb
CHANGED
@@ -66,6 +66,18 @@ describe Arbre::HTML::Tag do
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
describe "creating a tag with a for attribute" do
|
70
|
+
it "sets the `for` attribute when a string is given" do
|
71
|
+
tag.build for: "email"
|
72
|
+
expect(tag.attributes[:for]).to eq "email"
|
73
|
+
end
|
74
|
+
|
75
|
+
it "sets the `for` attribute when a symbol is given" do
|
76
|
+
tag.build for: :email
|
77
|
+
expect(tag.attributes[:for]).to eq :email
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
69
81
|
describe "css class names" do
|
70
82
|
|
71
83
|
it "should add a class" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arbre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Bell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.5.1
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: An Object Oriented DOM Tree in Ruby
|
@@ -140,4 +140,3 @@ test_files:
|
|
140
140
|
- spec/rails/templates/erb/_partial.erb
|
141
141
|
- spec/spec_helper.rb
|
142
142
|
- spec/support/bundle.rb
|
143
|
-
has_rdoc:
|