ruhl 0.11.0 → 0.11.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.
- data/VERSION +1 -1
- data/lib/ruhl/engine.rb +1 -1
- data/ruhl.gemspec +2 -2
- data/spec/html/parameters.html +2 -2
- data/spec/ruhl_spec.rb +9 -3
- data/spec/spec_helper.rb +4 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.1
|
data/lib/ruhl/engine.rb
CHANGED
data/ruhl.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruhl}
|
8
|
-
s.version = "0.11.
|
8
|
+
s.version = "0.11.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew Stone"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-27}
|
13
13
|
s.description = %q{Make your HTML dynamic with the addition of a data-ruhl attribute.}
|
14
14
|
s.email = %q{andy@stonean.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/html/parameters.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
</head>
|
5
5
|
<body>
|
6
6
|
<div id="wrap">
|
7
|
-
<div id="sidebar" data-ruhl="_partial: partial
|
7
|
+
<div id="sidebar" data-ruhl="_partial: partial|sidebar">
|
8
8
|
<h3>Sidebar links</h3>
|
9
9
|
<ul>
|
10
10
|
<li><a href="#">Link 1</a></li>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</ul>
|
15
15
|
</div>
|
16
16
|
<div id="main">
|
17
|
-
<h1>
|
17
|
+
<h1 data-ruhl="page_title|Home page">My main content</h1>
|
18
18
|
<p>Text designers would put here to test their layout</p>
|
19
19
|
</div>
|
20
20
|
</div>
|
data/spec/ruhl_spec.rb
CHANGED
@@ -69,11 +69,10 @@ describe Ruhl do
|
|
69
69
|
|
70
70
|
shared_examples_for "having sidebar" do
|
71
71
|
it "should replace sidebar with partial contents" do
|
72
|
-
doc
|
73
|
-
doc.xpath('/html/body/div/div/div//h3')[0].inner_html.
|
72
|
+
@doc.xpath('/html/body/div/div/div//h3')[0].inner_html.
|
74
73
|
should == "Real Sidebarlinks"
|
75
74
|
|
76
|
-
doc.xpath('/html/body/div/div/div/ul/li//a')[0].inner_html.
|
75
|
+
@doc.xpath('/html/body/div/div/div/ul/li//a')[0].inner_html.
|
77
76
|
should == "Real Link 1"
|
78
77
|
end
|
79
78
|
end
|
@@ -81,6 +80,7 @@ describe Ruhl do
|
|
81
80
|
describe "main_with_sidebar.html" do
|
82
81
|
before do
|
83
82
|
@html = File.read html(:main_with_sidebar)
|
83
|
+
@doc = create_doc
|
84
84
|
end
|
85
85
|
|
86
86
|
it_should_behave_like "having sidebar"
|
@@ -89,9 +89,15 @@ describe Ruhl do
|
|
89
89
|
describe "parameters.html" do
|
90
90
|
before do
|
91
91
|
@html = File.read html(:parameters)
|
92
|
+
@doc = create_doc
|
92
93
|
end
|
93
94
|
|
94
95
|
it_should_behave_like "having sidebar"
|
96
|
+
|
97
|
+
it "should update the h1" do
|
98
|
+
puts @doc.xpath("//div[@id='main']").first.children[1].
|
99
|
+
inner_html.should == "Welcome to the Home page"
|
100
|
+
end
|
95
101
|
end
|
96
102
|
|
97
103
|
shared_examples_for "if with no users" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruhl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Stone
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-27 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|