shakespeare 0.3.0 → 0.3.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/Rakefile CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  require 'jeweler'
26
26
  Jeweler::Tasks.new do |s|
27
27
  s.name = "shakespeare"
28
- s.version = "0.3.0"
28
+ s.version = "0.3.1"
29
29
  s.author = "Paul Campbell"
30
30
  s.email = "paul@rslw.com"
31
31
  s.homepage = "http://www.github.com/paulca/shakespeare"
@@ -1,7 +1,7 @@
1
1
  <h2><%= @page.title %></h2>
2
2
 
3
3
  <%- if Shakespeare::Settings.format_method -%>
4
- <%= send(Shakespeare::Settings.format_method, @page.content) %>
4
+ <%= send(Shakespeare::Settings.format_method, @page.content).html_safe! %>
5
5
  <%- else -%>
6
- <%= @page.content %>
6
+ <%= @page.content.html_safe! %>
7
7
  <%- end -%>
@@ -9,4 +9,5 @@ Feature: Public Pages
9
9
 
10
10
  When I am on the page for "Mr. MacAllister's Christmas"
11
11
 
12
- Then I should see "I was Home Alone"
12
+ Then I should see "I was Home Alone"
13
+ And I should not see "Shakespeare"
@@ -3,6 +3,6 @@ require 'shakespeare/shakespeare'
3
3
  require 'shakespeare/helpers'
4
4
  require 'shakespeare/view_helpers'
5
5
 
6
- ApplicationController.send(:include, Shakespeare::Helpers)
6
+ ActionController::Base.send(:include, Shakespeare::Helpers)
7
7
  ActionView::Base.send(:include, Shakespeare::Helpers)
8
8
  ActionView::Base.send(:include, Shakespeare::ViewHelpers)
@@ -1,29 +1,29 @@
1
- module Shakespeare
2
- module ViewHelpers
3
- def page_title
4
- return if page_content.nil? or page_content.title.blank?
5
- page_content.title
6
- end
7
-
8
- def description_meta_tag
9
- return if page_content.nil? or page_content.description.blank?
10
- %Q[<meta name="description" content="#{page_content.description}">]
11
- end
12
-
13
- def keywords_meta_tag
14
- return if page_content.nil? or page_content.keywords.blank?
15
- %Q[<meta name="keywords" content="#{page_content.keywords}">]
16
- end
17
-
18
- def robots_meta_tag
19
- return if page_content.nil? or page_content.robots.blank?
20
- %Q[<meta name="robots" content="#{page_content.robots}">]
21
- end
22
-
23
- def canonical_link_tag
24
- return if page_content.nil? or page_content.canonical.blank?
25
- return unless page_content.enable_canonical?
26
- %Q[<link href="#{page_content.canonical}" rel="canonical" />]
27
- end
28
- end
1
+ module Shakespeare
2
+ module ViewHelpers
3
+ def page_title
4
+ return if page_content.nil? or page_content.title.blank?
5
+ page_content.title
6
+ end
7
+
8
+ def description_meta_tag
9
+ return if page_content.nil? or page_content.description.blank?
10
+ %Q[<meta name="description" content="#{page_content.description}">]
11
+ end
12
+
13
+ def keywords_meta_tag
14
+ return if page_content.nil? or page_content.keywords.blank?
15
+ %Q[<meta name="keywords" content="#{page_content.keywords}">]
16
+ end
17
+
18
+ def robots_meta_tag
19
+ return if page_content.nil? or page_content.robots.blank?
20
+ %Q[<meta name="robots" content="#{page_content.robots}">]
21
+ end
22
+
23
+ def canonical_link_tag
24
+ return if page_content.nil? or page_content.canonical.blank?
25
+ return unless page_content.enable_canonical?
26
+ %Q[<link href="#{page_content.canonical}" rel="canonical" />]
27
+ end
28
+ end
29
29
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shakespeare}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
12
- s.date = %q{2010-03-09}
12
+ s.date = %q{2010-04-27}
13
13
  s.email = %q{paul@rslw.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.md"
@@ -2535,3 +2535,73 @@
2535
2535
  Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."url" = '/') LIMIT 1
2536
2536
  Page Load (0.2ms) SELECT * FROM "pages" 
2537
2537
  Page Create (2.0ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-03-09 17:53:25', 'Harry B', '2010-03-09 17:53:25', 'harry-b', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2538
+ SQL (0.2ms) select sqlite_version(*)
2539
+ SQL (0.4ms)  SELECT name
2540
+ FROM sqlite_master
2541
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2542
+ 
2543
+ SQL (2.6ms) DROP TABLE "pages"
2544
+ SQL (1.6ms) CREATE TABLE "pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "url" varchar(255), "keywords" text, "description" text, "content" text, "created_at" datetime, "updated_at" datetime, "noindex" boolean, "nofollow" boolean, "canonical" varchar(255), "enable_canonical" boolean, "enable_keywords" boolean) 
2545
+ SQL (0.3ms)  SELECT name
2546
+ FROM sqlite_master
2547
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2548
+ 
2549
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
2550
+ Page Load (0.3ms) SELECT * FROM "pages" 
2551
+ Page Load (0.2ms) SELECT * FROM "pages" 
2552
+ Page Create (0.6ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES('http://hendersons.com', '2010-03-09 17:57:57', 'Harry and the Hendersons', '2010-03-09 17:57:57', '', 't', '', 't', '', 't', NULL, '80s, movie')
2553
+ Page Load (0.4ms) SELECT * FROM "pages" 
2554
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-03-09 17:57:57', 'Harry and the Hendersons', '2010-03-09 17:57:57', 'kundesmith.co.uk', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2555
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2556
+ Page Load (0.3ms) SELECT * FROM "pages" 
2557
+ Page Load (1.2ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'kundesmith.co.uk') LIMIT 1
2558
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'kundesmith.co.uk') LIMIT 1
2559
+ Page Update (0.2ms) UPDATE "pages" SET "keywords" = '', "updated_at" = '2010-03-09 17:57:57', "title" = 'Three Men and a Baby', "content" = '', "nofollow" = 'f', "canonical" = '', "description" = '', "noindex" = 'f', "enable_canonical" = 'f' WHERE "id" = 1
2560
+ Page Load (0.4ms) SELECT * FROM "pages" 
2561
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-03-09 17:57:57', 'The Departed', '2010-03-09 17:57:57', 'kautzergoyette.name', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2562
+ Page Load (0.5ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2563
+ Page Load (0.4ms) SELECT * FROM "pages" 
2564
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'kautzergoyette.name') LIMIT 1
2565
+ Page Destroy (0.1ms) DELETE FROM "pages" WHERE "id" = 1
2566
+ Page Load (0.2ms) SELECT * FROM "pages" 
2567
+ Page Create (0.5ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-03-09 17:57:57', 'Mr. MacAllister''s Christmas', '2010-03-09 17:57:57', 'gutmann.ca', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2568
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2569
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2570
+ Page Update (0.1ms) UPDATE "pages" SET "updated_at" = '2010-03-09 17:57:57', "content" = 'I was Home Alone' WHERE "id" = 1
2571
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2572
+ Page Load (0.5ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'gutmann.ca') LIMIT 1
2573
+ SQL (0.2ms) select sqlite_version(*)
2574
+ SQL (0.5ms)  SELECT name
2575
+ FROM sqlite_master
2576
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2577
+ 
2578
+ SQL (3.5ms) DROP TABLE "pages"
2579
+ SQL (1.7ms) CREATE TABLE "pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "url" varchar(255), "keywords" text, "description" text, "content" text, "created_at" datetime, "updated_at" datetime, "noindex" boolean, "nofollow" boolean, "canonical" varchar(255), "enable_canonical" boolean, "enable_keywords" boolean) 
2580
+ SQL (0.3ms)  SELECT name
2581
+ FROM sqlite_master
2582
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2583
+ 
2584
+ SQL (0.4ms) SELECT version FROM "schema_migrations"
2585
+ Page Load (0.2ms) SELECT * FROM "pages" 
2586
+ Page Load (0.2ms) SELECT * FROM "pages" 
2587
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES('http://hendersons.com', '2010-04-27 13:15:30', 'Harry and the Hendersons', '2010-04-27 13:15:30', '', 't', '', 't', '', 't', NULL, '80s, movie')
2588
+ Page Load (0.5ms) SELECT * FROM "pages" 
2589
+ Page Create (3.7ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-04-27 13:15:30', 'Harry and the Hendersons', '2010-04-27 13:15:30', 'kundesmith.co.uk', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2590
+ Page Load (4.5ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2591
+ Page Load (0.6ms) SELECT * FROM "pages" 
2592
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'kundesmith.co.uk') LIMIT 1
2593
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'kundesmith.co.uk') LIMIT 1
2594
+ Page Update (0.1ms) UPDATE "pages" SET "keywords" = '', "updated_at" = '2010-04-27 13:15:30', "title" = 'Three Men and a Baby', "content" = '', "nofollow" = 'f', "canonical" = '', "description" = '', "noindex" = 'f', "enable_canonical" = 'f' WHERE "id" = 1
2595
+ Page Load (0.4ms) SELECT * FROM "pages" 
2596
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-04-27 13:15:30', 'The Departed', '2010-04-27 13:15:30', 'kautzergoyette.name', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2597
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2598
+ Page Load (0.9ms) SELECT * FROM "pages" 
2599
+ Page Load (0.5ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'kautzergoyette.name') LIMIT 1
2600
+ Page Destroy (0.1ms) DELETE FROM "pages" WHERE "id" = 1
2601
+ Page Load (0.1ms) SELECT * FROM "pages" 
2602
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-04-27 13:15:30', 'Mr. MacAllister''s Christmas', '2010-04-27 13:15:30', 'gutmann.ca', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2603
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2604
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2605
+ Page Update (0.1ms) UPDATE "pages" SET "updated_at" = '2010-04-27 13:15:30', "content" = 'I was Home Alone' WHERE "id" = 1
2606
+ Page Load (0.8ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2607
+ Page Load (0.5ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'gutmann.ca') LIMIT 1
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Campbell
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-09 00:00:00 +00:00
17
+ date: 2010-04-27 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20