shakespeare 0.1.0 → 0.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.
Files changed (41) hide show
  1. data/README.md +88 -84
  2. data/Rakefile +42 -42
  3. data/app/controllers/admin/pages_controller.rb +46 -46
  4. data/app/controllers/pages_controller.rb +4 -4
  5. data/app/models/page.rb +9 -9
  6. data/app/views/admin/pages/_form.html.erb +37 -37
  7. data/app/views/admin/pages/edit.html.erb +2 -2
  8. data/app/views/admin/pages/index.html.erb +23 -23
  9. data/app/views/admin/pages/new.html.erb +2 -2
  10. data/app/views/layouts/admin.html.erb +8 -8
  11. data/app/views/pages/show.html.erb +2 -2
  12. data/config/cucumber.yml +7 -7
  13. data/config/routes.rb +7 -7
  14. data/features/admin_pages.feature +37 -37
  15. data/features/public_pages.feature +11 -11
  16. data/features/step_definitions/page_steps.rb +6 -6
  17. data/features/step_definitions/web_steps.rb +258 -258
  18. data/features/support/env.rb +55 -55
  19. data/features/support/paths.rb +32 -32
  20. data/features/support/shakespeare_env.rb +2 -2
  21. data/generators/shakespeare/USAGE +4 -4
  22. data/generators/shakespeare/shakespeare_generator.rb +7 -7
  23. data/generators/shakespeare/templates/20091230095600_create_pages.rb +25 -25
  24. data/lib/shakespeare.rb +6 -6
  25. data/lib/shakespeare/helpers.rb +15 -15
  26. data/lib/shakespeare/settings.rb +29 -29
  27. data/lib/shakespeare/shakespeare.rb +7 -7
  28. data/lib/shakespeare/view_helpers.rb +28 -28
  29. data/rerun.txt +1 -1
  30. data/shakespeare.gemspec +89 -0
  31. data/spec/blueprints.rb +8 -8
  32. data/spec/controllers/admin/pages_controller_spec.rb +34 -34
  33. data/spec/database.yml +20 -20
  34. data/spec/helpers_spec.rb +19 -19
  35. data/spec/models/page_spec.rb +27 -27
  36. data/spec/schema.rb +15 -15
  37. data/spec/shakespeare_generator_spec.rb +35 -35
  38. data/spec/shakespeare_spec.rb +2 -2
  39. data/spec/spec_helper.rb +40 -40
  40. data/spec/view_helpers_spec.rb +102 -102
  41. metadata +2 -1
@@ -1,103 +1,103 @@
1
- require 'spec/spec_helper'
2
-
3
- describe Shakespeare::ViewHelpers do
4
- include Shakespeare::Helpers
5
- include Shakespeare::ViewHelpers
6
-
7
- def controller_name; end
8
-
9
- def action_name; end
10
-
11
- before(:all) do
12
- @page = Page.make_unsaved(
13
- :title => "Made Up",
14
- :description => "A description",
15
- :keywords => "awesome, code",
16
- :canonical => "http://pabcas.com",
17
- :nofollow => true
18
- )
19
- end
20
-
21
- context "no page" do
22
- describe "#page_title" do
23
- it "should be nil" do
24
- page_title.should be_nil
25
- end
26
- end
27
-
28
-
29
- describe "#description_meta_tag" do
30
- it "should be nil" do
31
- description_meta_tag.should be_nil
32
- end
33
- end
34
-
35
- describe "#keywords_meta_tag" do
36
- it "should be nil" do
37
- keywords_meta_tag.should be_nil
38
- end
39
- end
40
-
41
- describe "#robots_meta_tag" do
42
- it "should be nil" do
43
- robots_meta_tag.should be_nil
44
- end
45
- end
46
-
47
- describe "#canonical_link_tag" do
48
- it "should be nil" do
49
- canonical_link_tag.should be_nil
50
- end
51
- end
52
- end
53
-
54
-
55
- context "with a page" do
56
-
57
- before(:all) do
58
- Page.stub!(:find_by_url).and_return(@page)
59
- end
60
-
61
- describe "#page_title" do
62
- it "should be the page title" do
63
- page_title.should == "Made Up"
64
- end
65
- end
66
-
67
- describe "#description_meta_tag" do
68
- it "should generate the tag" do
69
- description_meta_tag.should == %Q[<meta name="description" content="A description">]
70
- end
71
- end
72
-
73
- describe "#keywords_meta_tag" do
74
- it "should generate the tag" do
75
- keywords_meta_tag.should == %Q[<meta name="keywords" content="awesome, code">]
76
- end
77
- end
78
-
79
- describe "#robots_meta_tag" do
80
- it "should generate the tag" do
81
- robots_meta_tag.should == %Q[<meta name="robots" content="nofollow">]
82
- end
83
- end
84
-
85
- describe "#canonical_link_tag" do
86
- context "active" do
87
- it "should generate the tag" do
88
- @page.stub!(:enable_canonical?).and_return(true)
89
-
90
- canonical_link_tag.should == %Q[<link href="http://pabcas.com" rel="canonical" />]
91
- end
92
- end
93
-
94
- context "inactive" do
95
- it "should not generate the tag" do
96
- canonical_link_tag.should be_nil
97
- end
98
- end
99
- end
100
-
101
- end
102
-
1
+ require 'spec/spec_helper'
2
+
3
+ describe Shakespeare::ViewHelpers do
4
+ include Shakespeare::Helpers
5
+ include Shakespeare::ViewHelpers
6
+
7
+ def controller_name; end
8
+
9
+ def action_name; end
10
+
11
+ before(:all) do
12
+ @page = Page.make_unsaved(
13
+ :title => "Made Up",
14
+ :description => "A description",
15
+ :keywords => "awesome, code",
16
+ :canonical => "http://pabcas.com",
17
+ :nofollow => true
18
+ )
19
+ end
20
+
21
+ context "no page" do
22
+ describe "#page_title" do
23
+ it "should be nil" do
24
+ page_title.should be_nil
25
+ end
26
+ end
27
+
28
+
29
+ describe "#description_meta_tag" do
30
+ it "should be nil" do
31
+ description_meta_tag.should be_nil
32
+ end
33
+ end
34
+
35
+ describe "#keywords_meta_tag" do
36
+ it "should be nil" do
37
+ keywords_meta_tag.should be_nil
38
+ end
39
+ end
40
+
41
+ describe "#robots_meta_tag" do
42
+ it "should be nil" do
43
+ robots_meta_tag.should be_nil
44
+ end
45
+ end
46
+
47
+ describe "#canonical_link_tag" do
48
+ it "should be nil" do
49
+ canonical_link_tag.should be_nil
50
+ end
51
+ end
52
+ end
53
+
54
+
55
+ context "with a page" do
56
+
57
+ before(:all) do
58
+ Page.stub!(:find_by_url).and_return(@page)
59
+ end
60
+
61
+ describe "#page_title" do
62
+ it "should be the page title" do
63
+ page_title.should == "Made Up"
64
+ end
65
+ end
66
+
67
+ describe "#description_meta_tag" do
68
+ it "should generate the tag" do
69
+ description_meta_tag.should == %Q[<meta name="description" content="A description">]
70
+ end
71
+ end
72
+
73
+ describe "#keywords_meta_tag" do
74
+ it "should generate the tag" do
75
+ keywords_meta_tag.should == %Q[<meta name="keywords" content="awesome, code">]
76
+ end
77
+ end
78
+
79
+ describe "#robots_meta_tag" do
80
+ it "should generate the tag" do
81
+ robots_meta_tag.should == %Q[<meta name="robots" content="nofollow">]
82
+ end
83
+ end
84
+
85
+ describe "#canonical_link_tag" do
86
+ context "active" do
87
+ it "should generate the tag" do
88
+ @page.stub!(:enable_canonical?).and_return(true)
89
+
90
+ canonical_link_tag.should == %Q[<link href="http://pabcas.com" rel="canonical" />]
91
+ end
92
+ end
93
+
94
+ context "inactive" do
95
+ it "should not generate the tag" do
96
+ canonical_link_tag.should be_nil
97
+ end
98
+ end
99
+ end
100
+
101
+ end
102
+
103
103
  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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Campbell
@@ -53,6 +53,7 @@ files:
53
53
  - lib/shakespeare/view_helpers.rb
54
54
  - rails/init.rb
55
55
  - rerun.txt
56
+ - shakespeare.gemspec
56
57
  - spec/blueprints.rb
57
58
  - spec/controllers/admin/pages_controller_spec.rb
58
59
  - spec/database.yml