seo_pages 1.1.0 → 1.2.0

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/seo_pages/application_helper.rb +28 -0
  3. data/app/views/layouts/seo_pages/application.html.erb +1 -1
  4. data/lib/seo_pages/version.rb +1 -1
  5. data/test/dummy/app/views/layouts/application.html.erb +1 -1
  6. data/test/dummy/config/initializers/seo.rb +9 -0
  7. data/test/dummy/db/development.sqlite3 +0 -0
  8. data/test/dummy/db/migrate/20130909135320_create_seo_pages_seo_page_defaults.seo_pages.rb +12 -0
  9. data/test/dummy/db/migrate/20130909135321_create_seo_pages_seo_pages.seo_pages.rb +13 -0
  10. data/test/dummy/db/migrate/20130909135322_create_default_record.seo_pages.rb +11 -0
  11. data/test/dummy/db/schema.rb +33 -0
  12. data/test/dummy/log/development.log +1578 -0
  13. data/test/dummy/tmp/cache/assets/development/sprockets/01fbd25f95749291c3002e82372ce4c7 +0 -0
  14. data/test/dummy/tmp/cache/assets/development/sprockets/111856d8daa1082bf05efab4077547a6 +0 -0
  15. data/test/dummy/tmp/cache/assets/development/sprockets/19dc844a3495c2ebc1346a3a3c12e263 +0 -0
  16. data/test/dummy/tmp/cache/assets/development/sprockets/2147ddaeafe0b9a21df5d34acc0ddeed +0 -0
  17. data/test/dummy/tmp/cache/assets/development/sprockets/2d8705afe57b62d44449d69f4222290f +0 -0
  18. data/test/dummy/tmp/cache/assets/development/sprockets/4f86487aa5d289eda467a8c6537a96d7 +0 -0
  19. data/test/dummy/tmp/cache/assets/development/sprockets/5e49a9e50308d9df9c3b978c189e1a95 +0 -0
  20. data/test/dummy/tmp/cache/assets/development/sprockets/65009485adc1a6a013669d3dd03bccf2 +0 -0
  21. data/test/dummy/tmp/cache/assets/development/sprockets/69d9fcd635a8a7e09a3553bb42dcb9fe +0 -0
  22. data/test/dummy/tmp/cache/assets/development/sprockets/70a21f35131b909ba99755f18f61bc86 +0 -0
  23. data/test/dummy/tmp/cache/assets/development/sprockets/861696f6bec1e79e099c05ac9817ea73 +0 -0
  24. data/test/dummy/tmp/cache/assets/development/sprockets/b273afc43ae2c708d583ed1b9ee0dbdf +0 -0
  25. data/test/dummy/tmp/cache/assets/development/sprockets/b51894bec29fad0fe908ff07013df296 +0 -0
  26. data/test/dummy/tmp/cache/assets/development/sprockets/b64ef79b76b687f0bcd96c61bfcbad04 +0 -0
  27. data/test/dummy/tmp/cache/assets/development/sprockets/d2b80b70d9f90c0787c9cdcfca9a7cc0 +0 -0
  28. data/test/dummy/tmp/cache/assets/development/sprockets/d85a70becfb7be07108c6a9b1a530599 +0 -0
  29. data/test/dummy/tmp/cache/assets/development/sprockets/dced4195b263fd551435b0ba4c6e1ce6 +0 -0
  30. data/test/dummy/tmp/cache/assets/development/sprockets/e79502ecdcd92526d5d53dde53001f93 +0 -0
  31. metadata +52 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6da756cfcc11ae841753f1c44613c92e180c9b70
4
- data.tar.gz: 00e5dec6c6e65e7d375343c4b43f8e3c652c9089
3
+ metadata.gz: 4a1cd0e4634fdc3a6e8227729151c90bc2ba6aa0
4
+ data.tar.gz: 521278f72d73e0c5a4c5e95c47afdc909072890a
5
5
  SHA512:
6
- metadata.gz: 44a9e35dd4e95333cf6e6a9e89db5b0f4db106a829e50a54c3e11a20c648024720ff7013ce8e226ef4df9a1bf9845cfd00107c4ade450d491f4dc65f90516095
7
- data.tar.gz: 706333f30406e840f780698b32669ed95598c8ff5f5b143b24e8f186de6f24864d17dfdd405ff3c08e61363d95534ce6a8df194d5cfb3c51450250b5b9498914
6
+ metadata.gz: 60789c5e0ba36f2c879232b46bd01b6dd8b1c6cc8ffb5b3eb7af850074ae5c4b11c2b8b3897deb687c8e4608febfe37049c3e22919f7eed290618517ee047278
7
+ data.tar.gz: 731b8d6c15a973da4a6c4db80dd0956abcea084a0edf095502b1c78a759089d67964a5759f69b72cfe7db431e4c261bf502a4d2fc303ccb87d5394a2297492cd
@@ -10,5 +10,33 @@ module SeoPages
10
10
 
11
11
  @seo
12
12
  end
13
+
14
+ def seo_title_tag(content)
15
+ "<title>#{content}</title>"
16
+ end
17
+
18
+
19
+ def seo_meta_tag(type, content)
20
+ "<meta name='#{type}' content='#{content}'>"
21
+ end
22
+
23
+ def seo_page
24
+ s_title = seo_title_tag(content_for?(:title) ? content_for(:title) : seo_data.page_title)
25
+ s_desc = seo_meta_tag('description', content_for?(:meta_description) ? content_for(:meta_description) : "#{seo_data.meta_description}")
26
+ s_keywords = seo_meta_tag('keywords', content_for?(:meta_keywords) ? content_for(:meta_keywords) : "#{seo_data.meta_keywords}")
27
+ raw("#{s_title} \n #{s_desc} \n #{s_keywords}")
28
+ end
29
+
30
+ def seo_page_title(content)
31
+ content_for(:title) { content }
32
+ end
33
+
34
+ def seo_page_meta_description(content)
35
+ content_for(:meta_description) { content }
36
+ end
37
+
38
+ def seo_page_meta_keywrods(content)
39
+ content_for(:meta_keywords) { content }
40
+ end
13
41
  end
14
42
  end
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title>SeoPages</title>
4
+ <%= seo_page %>
5
5
  <%= stylesheet_link_tag "seo_pages/application", media: "all" %>
6
6
  <%= javascript_include_tag "seo_pages/application" %>
7
7
  <%= csrf_meta_tags %>
@@ -1,3 +1,3 @@
1
1
  module SeoPages
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title>Dummy</title>
4
+ <title><%= seo_page %></title>
5
5
  <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
6
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
7
  <%= csrf_meta_tags %>
@@ -0,0 +1,9 @@
1
+ module SeoPages
2
+ class ApplicationController < ActionController::Base
3
+
4
+ def require_seo_admin
5
+ # redirect_to(root_path) unless current_user.admin?
6
+ end
7
+
8
+ end
9
+ end
Binary file
@@ -0,0 +1,12 @@
1
+ # This migration comes from seo_pages (originally 20130905104532)
2
+ class CreateSeoPagesSeoPageDefaults < ActiveRecord::Migration
3
+ def change
4
+ create_table :seo_pages_seo_page_defaults do |t|
5
+ t.string :page_title
6
+ t.string :meta_keywords
7
+ t.string :meta_description
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # This migration comes from seo_pages (originally 20130905104642)
2
+ class CreateSeoPagesSeoPages < ActiveRecord::Migration
3
+ def change
4
+ create_table :seo_pages_seo_pages do |t|
5
+ t.string :url_identifier
6
+ t.string :page_title
7
+ t.string :meta_keywords
8
+ t.string :meta_description
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # This migration comes from seo_pages (originally 20130905104716)
2
+ class CreateDefaultRecord < ActiveRecord::Migration
3
+ def up
4
+ SeoPages::SeoPageDefault.create(page_title: 'Edit Page Title Default',
5
+ meta_keywords: 'Edit Page Meta Keywords Default',
6
+ meta_description: 'Edit Page Meta Description Default')
7
+ end
8
+
9
+ def down
10
+ end
11
+ end
@@ -0,0 +1,33 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20130909135322) do
15
+
16
+ create_table "seo_pages_seo_page_defaults", force: true do |t|
17
+ t.string "page_title"
18
+ t.string "meta_keywords"
19
+ t.string "meta_description"
20
+ t.datetime "created_at"
21
+ t.datetime "updated_at"
22
+ end
23
+
24
+ create_table "seo_pages_seo_pages", force: true do |t|
25
+ t.string "url_identifier"
26
+ t.string "page_title"
27
+ t.string "meta_keywords"
28
+ t.string "meta_description"
29
+ t.datetime "created_at"
30
+ t.datetime "updated_at"
31
+ end
32
+
33
+ end