shakespeare 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Rakefile +42 -42
- data/app/controllers/admin/pages_controller.rb +46 -46
- data/app/controllers/pages_controller.rb +4 -4
- data/app/models/page.rb +26 -9
- data/app/views/admin/pages/_form.html.erb +37 -37
- data/config/routes.rb +7 -7
- data/features/admin_pages.feature +38 -37
- data/features/public_pages.feature +11 -11
- data/features/step_definitions/page_steps.rb +6 -6
- data/features/step_definitions/web_steps.rb +192 -259
- data/features/support/env.rb +55 -55
- data/features/support/paths.rb +32 -32
- data/lib/shakespeare.rb +6 -6
- data/rerun.txt +1 -1
- data/shakespeare.gemspec +5 -3
- data/spec/blueprints.rb +10 -8
- data/spec/debug.log +457 -0
- data/spec/models/page_spec.rb +43 -27
- metadata +4 -3
data/spec/models/page_spec.rb
CHANGED
@@ -1,28 +1,44 @@
|
|
1
|
-
require 'spec/spec_helper'
|
2
|
-
|
3
|
-
describe Page do
|
4
|
-
|
5
|
-
describe "#robots" do
|
6
|
-
|
7
|
-
before do
|
8
|
-
@page = Page.make_unsaved
|
9
|
-
end
|
10
|
-
|
11
|
-
it "should have no robots" do
|
12
|
-
@page.robots.should be_blank
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should have nofollow by itself" do
|
16
|
-
@page.nofollow = true
|
17
|
-
@page.robots.should == 'nofollow'
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should have both nofollow and noindex" do
|
21
|
-
@page.nofollow = true
|
22
|
-
@page.noindex = true
|
23
|
-
@page.robots.should == 'noindex, nofollow'
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
1
|
+
require 'spec/spec_helper'
|
2
|
+
|
3
|
+
describe Page do
|
4
|
+
|
5
|
+
describe "#robots" do
|
6
|
+
|
7
|
+
before do
|
8
|
+
@page = Page.make_unsaved
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should have no robots" do
|
12
|
+
@page.robots.should be_blank
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should have nofollow by itself" do
|
16
|
+
@page.nofollow = true
|
17
|
+
@page.robots.should == 'nofollow'
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should have both nofollow and noindex" do
|
21
|
+
@page.nofollow = true
|
22
|
+
@page.noindex = true
|
23
|
+
@page.robots.should == 'noindex, nofollow'
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#set_url" do
|
29
|
+
before do
|
30
|
+
@page = Page.new(:title => "Harry B")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should set the URL" do
|
34
|
+
@page.clean_url.should == "harry-b"
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should save the URL" do
|
38
|
+
@page.save!
|
39
|
+
@page.url.should == 'harry-b'
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
28
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shakespeare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Campbell
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-15 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -22,6 +22,7 @@ extensions: []
|
|
22
22
|
extra_rdoc_files:
|
23
23
|
- README.md
|
24
24
|
files:
|
25
|
+
- CHANGELOG
|
25
26
|
- README.md
|
26
27
|
- Rakefile
|
27
28
|
- app/controllers/admin/pages_controller.rb
|
@@ -65,7 +66,7 @@ files:
|
|
65
66
|
- spec/shakespeare_spec.rb
|
66
67
|
- spec/spec_helper.rb
|
67
68
|
- spec/view_helpers_spec.rb
|
68
|
-
has_rdoc:
|
69
|
+
has_rdoc: false
|
69
70
|
homepage: http://www.github.com/paulca/shakespeare
|
70
71
|
licenses: []
|
71
72
|
|