iron-web 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Version.txt +1 -1
- data/lib/iron/web/html/element.rb +3 -0
- data/spec/web/element_spec.rb +2 -1
- metadata +6 -6
data/History.txt
CHANGED
data/Version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -19,6 +19,9 @@
|
|
19
19
|
#
|
20
20
|
class Html
|
21
21
|
class Element
|
22
|
+
# Remove everything that would normally come from Object and Kernel etc. so our attrs can be anything
|
23
|
+
instance_methods.each { |m| undef_method m if m =~ /^[a-z0-9]+=?$/ }
|
24
|
+
|
22
25
|
# Add back in our accessors
|
23
26
|
attr_accessor :tag, :attrs
|
24
27
|
|
data/spec/web/element_spec.rb
CHANGED
@@ -43,9 +43,10 @@ describe Html::Element do
|
|
43
43
|
it 'should add attributes when called as setters' do
|
44
44
|
span = Html::Element.new(:span)
|
45
45
|
span.class = 'dynamic'
|
46
|
+
span.class += ' frenetic'
|
46
47
|
span.id = 'header'
|
47
48
|
span.attrs.keys.should include(:class, :id)
|
48
|
-
span.render.should == '<span class="dynamic" id="header"></span>'
|
49
|
+
span.render.should == '<span class="dynamic frenetic" id="header"></span>'
|
49
50
|
end
|
50
51
|
|
51
52
|
it 'should yield a block for customization on creation' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-02 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: iron-extensions
|
16
|
-
requirement: &
|
16
|
+
requirement: &2151828700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2151828700
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2161843460 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '2.6'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2161843460
|
36
36
|
description: Html builder, color helper class and url parser/builder class for use
|
37
37
|
in Rails projects or other web-based content generation.
|
38
38
|
email:
|