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.
- checksums.yaml +4 -4
 - data/app/helpers/seo_pages/application_helper.rb +28 -0
 - data/app/views/layouts/seo_pages/application.html.erb +1 -1
 - data/lib/seo_pages/version.rb +1 -1
 - data/test/dummy/app/views/layouts/application.html.erb +1 -1
 - data/test/dummy/config/initializers/seo.rb +9 -0
 - data/test/dummy/db/development.sqlite3 +0 -0
 - data/test/dummy/db/migrate/20130909135320_create_seo_pages_seo_page_defaults.seo_pages.rb +12 -0
 - data/test/dummy/db/migrate/20130909135321_create_seo_pages_seo_pages.seo_pages.rb +13 -0
 - data/test/dummy/db/migrate/20130909135322_create_default_record.seo_pages.rb +11 -0
 - data/test/dummy/db/schema.rb +33 -0
 - data/test/dummy/log/development.log +1578 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/01fbd25f95749291c3002e82372ce4c7 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/111856d8daa1082bf05efab4077547a6 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/19dc844a3495c2ebc1346a3a3c12e263 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/2147ddaeafe0b9a21df5d34acc0ddeed +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/2d8705afe57b62d44449d69f4222290f +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/4f86487aa5d289eda467a8c6537a96d7 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/5e49a9e50308d9df9c3b978c189e1a95 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/65009485adc1a6a013669d3dd03bccf2 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/69d9fcd635a8a7e09a3553bb42dcb9fe +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/70a21f35131b909ba99755f18f61bc86 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/861696f6bec1e79e099c05ac9817ea73 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/b273afc43ae2c708d583ed1b9ee0dbdf +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/b51894bec29fad0fe908ff07013df296 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/b64ef79b76b687f0bcd96c61bfcbad04 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/d2b80b70d9f90c0787c9cdcfca9a7cc0 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/d85a70becfb7be07108c6a9b1a530599 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/dced4195b263fd551435b0ba4c6e1ce6 +0 -0
 - data/test/dummy/tmp/cache/assets/development/sprockets/e79502ecdcd92526d5d53dde53001f93 +0 -0
 - metadata +52 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 4a1cd0e4634fdc3a6e8227729151c90bc2ba6aa0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 521278f72d73e0c5a4c5e95c47afdc909072890a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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
         
     | 
    
        data/lib/seo_pages/version.rb
    CHANGED
    
    
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <!DOCTYPE html>
         
     | 
| 
       2 
2 
     | 
    
         
             
            <html>
         
     | 
| 
       3 
3 
     | 
    
         
             
            <head>
         
     | 
| 
       4 
     | 
    
         
            -
              <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 %>
         
     | 
| 
         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
         
     |