arbre 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.0.rc3
2
+
3
+ * Implemented `Arbre::HTML::Tag#default_id_for_prefix`
4
+
1
5
  ## 1.0.0.rc2
2
6
 
3
7
  * Fixed bug where Component's build methods were being rendered within the
@@ -162,7 +162,7 @@ module Arbre
162
162
  record.object_id
163
163
  end
164
164
 
165
- [dom_class_name_for(record), id].join("_")
165
+ [default_id_for_prefix, dom_class_name_for(record), id].compact.join("_")
166
166
  end
167
167
 
168
168
  def default_id_for_prefix
data/lib/arbre/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Arbre
2
- VERSION = "1.0.0.rc2"
2
+ VERSION = "1.0.0.rc3"
3
3
  end
@@ -31,6 +31,22 @@ describe Arbre::HTML::Tag do
31
31
  it "should add a class name" do
32
32
  tag.class_list.should include("resource_class")
33
33
  end
34
+
35
+ describe "with a default_id_for_prefix" do
36
+
37
+ let(:tag) do
38
+ Class.new(Arbre::HTML::Tag) do
39
+ def default_id_for_prefix
40
+ "a_prefix"
41
+ end
42
+ end.new
43
+ end
44
+
45
+ it "should set the id to the type and id" do
46
+ tag.id.should == "a_prefix_resource_class_5"
47
+ end
48
+
49
+ end
34
50
  end
35
51
 
36
52
  describe "css class names" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arbre
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0.rc3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70272484758820 !ruby/object:Gem::Requirement
16
+ requirement: &70108108400940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70272484758820
24
+ version_requirements: *70108108400940
25
25
  description: An Object Oriented DOM Tree in Ruby
26
26
  email:
27
27
  - gregdbell@gmail.com