arbre 1.0.3 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c1b05989079a4f6408269a6d5079ac41b957e2c
4
- data.tar.gz: 283b93e148607c2d7537ebab5f330b10312f1828
3
+ metadata.gz: 57a6141066e9591c4c32540dcf3a5a6651269f6c
4
+ data.tar.gz: 879e1cd23e915f6cf8b12db9fc2a3e62290e9b3b
5
5
  SHA512:
6
- metadata.gz: 747b0ee1ddf4ea35e05aaec1d072d96a65edd94d8b63163f791af329baf91a259bd98fba5aaa49e793b5516b357a9378688e59b35e7a0c1b9bb842c892e88ec8
7
- data.tar.gz: 4ebf3319eea32ff425ba13ce734a4c5b11cb5a666a0729c6898f1b9fbb0a326e429d5e3e3eeb421155c8c0e0d6a40fd1b386bfe52a2abf99ecc55e110030ad29
6
+ metadata.gz: 4756d852190900a69fb2c43667c370b1c2ec06759169ad769298e0f5b1d5a8656857b55bd74c2ca7c0ff606a8ab0f67d377ed7040ccca78df4ad0dd38c30abe3
7
+ data.tar.gz: c33cb32cbf8708c9d0f29a417235708008e4ffe5f9632d1e0246e971dc9b7e8755733ba409bc75036573ffa167fbdfab65a8a008aded2268c0e75e86142cb004
@@ -1,4 +1,6 @@
1
- script: bundle exec rake
1
+ language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - 1.9.3
4
- - 2.1
5
+ - 2.3.1
6
+ cache: bundler
@@ -1,4 +1,8 @@
1
- ## unreleased [☰](https://github.com/activeadmin/arbre/compare/v1.0.3...master)
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
@@ -2,6 +2,8 @@ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ gem 'mime-types', '~> 2.6', platforms: :ruby_19
6
+
5
7
  group :test do
6
8
  gem 'rspec'
7
9
  gem 'rack'
@@ -20,7 +20,10 @@ module Arbre
20
20
  attributes = extract_arguments(args)
21
21
  self.content = args.first if args.first
22
22
 
23
- set_for_attribute(attributes.delete(:for))
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)
@@ -1,3 +1,3 @@
1
1
  module Arbre
2
- VERSION = "1.0.3"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -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.0.3
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: 2015-01-14 00:00:00.000000000 Z
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.4.5
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: