tb_blog 1.4.beta1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeb69c01292f58e218b4ce91f77177d02821fc94
4
- data.tar.gz: bbb9c52de3278d3fbb9883df111b9bac94990b11
3
+ metadata.gz: ab37b0d808766124759d266757d35eaaea4d359b
4
+ data.tar.gz: ee83293562e1e9246b8bd2df584c07f1deb7f695
5
5
  SHA512:
6
- metadata.gz: 72fc2e62be4d62466eff4b36698fa51b4cd7d24d50a7492b5423273ab2e1e18f635b1cc91dd2af1060f3d65940c727c5421b3b8fcd95167387bd827a66934a14
7
- data.tar.gz: c02c76467d4473a580d5ab9b12acdec552eba806d573f104e18963bbe7ac9239e1c34962a8d289e0768c0fb1e81cccbcf312253b4b8da7428e8c10f6f6ae4cac
6
+ metadata.gz: a641f5ca8ca4c50f518c8dd3636520d07ddc6e5f547e7f7ff4bb3fcb449b3d0a5759a655e33c630f5f2f4828899e785cca31a963afe8e9a2d34346ddb80cd115
7
+ data.tar.gz: cb498d73cd7db7dc97cfdfebf59ef26788d0e6a92d0da47dc60f83f4bb2f6e3c1ab2bb6dd0310bde5e1b425517435c0c31a97864f89e9449435f905bb7fa5b39
@@ -51,7 +51,6 @@ class Admin::PostsController < Admin::ApplicationController
51
51
  SpudPost.new
52
52
  end
53
53
  @post.assign_attributes(post_params)
54
- @post.postprocess_content()
55
54
  render template: post_view_for_action(:show), controller: :posts, layout: @config.layout
56
55
  end
57
56
 
@@ -34,8 +34,6 @@ class Spud::SpudPostModel < ActiveRecord::Base
34
34
  before_validation :set_url_name
35
35
  before_validation :set_identifier
36
36
 
37
- acts_as_tb_liquid_content
38
-
39
37
  def self.for_spud_site(_spud_site_id)
40
38
  ActiveSupport::Deprecation.warn 'SpudBlog.for_spud_site is deprecated and will be removed in the future'
41
39
  return all()
@@ -76,18 +74,23 @@ class Spud::SpudPostModel < ActiveRecord::Base
76
74
  end
77
75
  end
78
76
 
79
- def postprocess_content
80
- template = Liquid::Template.parse(content)
81
- self.content_processed = template.render()
82
- end
77
+ # def postprocess_content
78
+ # template = Liquid::Template.parse(content)
79
+ # self.content_processed = template.render()
80
+ # end
81
+ #
82
+ # def content_processed
83
+ # postprocess_content if self[:content_processed].blank?
84
+ # self[:content_processed]
85
+ # end
83
86
 
84
- def content_processed
85
- postprocess_content if self[:content_processed].blank?
86
- self[:content_processed]
87
- end
87
+ # def content_processed=(content)
88
+ # self[:content_processed] = content
89
+ # end
88
90
 
89
- def content_processed=(content)
90
- self[:content_processed] = content
91
+ def content_processed
92
+ ActiveSupport::Deprecation.warn '#content_processed is deprecated. Use #content instead.'
93
+ content
91
94
  end
92
95
 
93
96
  def display_date
@@ -35,7 +35,7 @@
35
35
  <p><%= disqus_comment_count_for_post(post) %></p>
36
36
  <% end %>
37
37
  <div class="blog-post-content">
38
- <%= truncate_html post.content_processed.html_safe, :length => 250 %>
38
+ <%= truncate_html post.content.html_safe, :length => 250 %>
39
39
  </div>
40
40
  </div>
41
41
  <% end %>
@@ -25,7 +25,7 @@
25
25
  </p>
26
26
  <% end %>
27
27
  <div class="blog-post-content">
28
- <%= raw @post.content_processed %>
28
+ <%= raw @post.content %>
29
29
  </div>
30
30
  <p><%= link_to 'Back to all posts', posts_path %></p>
31
31
  </div>
@@ -1,6 +1,5 @@
1
1
  require 'tb_core'
2
2
  require 'tb_redirects'
3
- require 'tb_liquid'
4
3
  require 'truncate_html'
5
4
 
6
5
  module Spud
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Blog
3
- VERSION = '1.4.beta1'.freeze
3
+ VERSION = '1.4.0'.freeze
4
4
  end
5
5
  end
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -11,135 +10,117 @@
11
10
  #
12
11
  # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(version: 20_161_020_155_452) do
13
+ ActiveRecord::Schema.define(version: 20161020155452) do
15
14
 
16
- create_table 'spud_liquid_tags', force: :cascade do |t|
17
- t.integer 'attachment_id', limit: 4
18
- t.string 'attachment_type', limit: 255
19
- t.string 'tag_name', limit: 255
20
- t.string 'value', limit: 255
21
- t.datetime 'created_at'
22
- t.datetime 'updated_at'
15
+ create_table "spud_permissions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
16
+ t.string "name", null: false
17
+ t.string "tag", null: false
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
+ t.index ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree
23
21
  end
24
22
 
25
- add_index 'spud_liquid_tags', ['tag_name', 'value'], name: 'index_spud_liquid_tags_on_tag_name_and_value', using: :btree
26
-
27
- create_table 'spud_permissions', force: :cascade do |t|
28
- t.string 'name', limit: 255, null: false
29
- t.string 'tag', limit: 255, null: false
30
- t.datetime 'created_at'
31
- t.datetime 'updated_at'
23
+ create_table "spud_post_categories", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
24
+ t.string "name"
25
+ t.datetime "created_at"
26
+ t.datetime "updated_at"
27
+ t.string "url_name"
28
+ t.index ["url_name"], name: "index_spud_post_categories_on_url_name", using: :btree
32
29
  end
33
30
 
34
- add_index 'spud_permissions', ['tag'], name: 'index_spud_permissions_on_tag', unique: true, using: :btree
35
-
36
- create_table 'spud_post_categories', force: :cascade do |t|
37
- t.string 'name', limit: 255
38
- t.datetime 'created_at'
39
- t.datetime 'updated_at'
40
- t.string 'url_name', limit: 255
41
- end
42
-
43
- add_index 'spud_post_categories', ['url_name'], name: 'index_spud_post_categories_on_url_name', using: :btree
44
-
45
- create_table 'spud_post_categories_posts', force: :cascade do |t|
46
- t.integer 'spud_post_id', limit: 4
47
- t.integer 'spud_post_category_id', limit: 4
31
+ create_table "spud_post_categories_posts", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
32
+ t.integer "spud_post_id"
33
+ t.integer "spud_post_category_id"
34
+ t.index ["spud_post_category_id"], name: "index_spud_post_categories_posts_on_spud_post_category_id", using: :btree
48
35
  end
49
36
 
50
- add_index 'spud_post_categories_posts', ['spud_post_category_id'], name: 'index_spud_post_categories_posts_on_spud_post_category_id', using: :btree
51
-
52
- create_table 'spud_posts', force: :cascade do |t|
53
- t.integer 'spud_user_id', limit: 4
54
- t.string 'title', limit: 255
55
- t.text 'content', limit: 65_535
56
- t.boolean 'comments_enabled', default: false
57
- t.boolean 'visible', default: true
58
- t.datetime 'published_at'
59
- t.datetime 'created_at'
60
- t.datetime 'updated_at'
61
- t.string 'url_name', limit: 255
62
- t.boolean 'is_news', default: false
63
- t.string 'meta_keywords', limit: 255
64
- t.text 'meta_description', limit: 65_535
65
- t.string 'content_format', limit: 255, default: 'HTML'
66
- t.text 'content_processed', limit: 65_535
67
- t.string 'blog_key', limit: 255
68
- t.string 'custom_author', limit: 255
69
- t.string 'identifier', limit: 255
37
+ create_table "spud_posts", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
38
+ t.integer "spud_user_id"
39
+ t.string "title"
40
+ t.text "content", limit: 65535
41
+ t.boolean "comments_enabled", default: false
42
+ t.boolean "visible", default: true
43
+ t.datetime "published_at"
44
+ t.datetime "created_at"
45
+ t.datetime "updated_at"
46
+ t.string "url_name"
47
+ t.boolean "is_news", default: false
48
+ t.string "meta_keywords"
49
+ t.text "meta_description", limit: 65535
50
+ t.string "content_format", default: "HTML"
51
+ t.text "content_processed", limit: 65535
52
+ t.string "blog_key"
53
+ t.string "custom_author"
54
+ t.string "identifier"
55
+ t.index ["blog_key"], name: "index_spud_posts_on_blog_key", using: :btree
56
+ t.index ["identifier"], name: "index_spud_posts_on_identifier", unique: true, using: :btree
57
+ t.index ["is_news"], name: "index_spud_posts_on_is_news", using: :btree
58
+ t.index ["spud_user_id"], name: "index_spud_posts_on_spud_user_id", using: :btree
59
+ t.index ["url_name"], name: "index_spud_posts_on_url_name", using: :btree
60
+ t.index ["visible"], name: "index_spud_posts_on_visible", using: :btree
70
61
  end
71
62
 
72
- add_index 'spud_posts', ['blog_key'], name: 'index_spud_posts_on_blog_key', using: :btree
73
- add_index 'spud_posts', ['identifier'], name: 'index_spud_posts_on_identifier', unique: true, using: :btree
74
- add_index 'spud_posts', ['is_news'], name: 'index_spud_posts_on_is_news', using: :btree
75
- add_index 'spud_posts', ['spud_user_id'], name: 'index_spud_posts_on_spud_user_id', using: :btree
76
- add_index 'spud_posts', ['url_name'], name: 'index_spud_posts_on_url_name', using: :btree
77
- add_index 'spud_posts', ['visible'], name: 'index_spud_posts_on_visible', using: :btree
78
-
79
- create_table 'spud_role_permissions', force: :cascade do |t|
80
- t.integer 'spud_role_id', limit: 4, null: false
81
- t.string 'spud_permission_tag', limit: 255, null: false
82
- t.datetime 'created_at'
83
- t.datetime 'updated_at'
63
+ create_table "spud_role_permissions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
64
+ t.integer "spud_role_id", null: false
65
+ t.string "spud_permission_tag", null: false
66
+ t.datetime "created_at"
67
+ t.datetime "updated_at"
68
+ t.index ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree
69
+ t.index ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree
84
70
  end
85
71
 
86
- add_index 'spud_role_permissions', ['spud_permission_tag'], name: 'index_spud_role_permissions_on_spud_permission_tag', using: :btree
87
- add_index 'spud_role_permissions', ['spud_role_id'], name: 'index_spud_role_permissions_on_spud_role_id', using: :btree
88
-
89
- create_table 'spud_roles', force: :cascade do |t|
90
- t.string 'name', limit: 255
91
- t.datetime 'created_at'
92
- t.datetime 'updated_at'
72
+ create_table "spud_roles", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
73
+ t.string "name"
74
+ t.datetime "created_at"
75
+ t.datetime "updated_at"
93
76
  end
94
77
 
95
- create_table 'spud_user_settings', force: :cascade do |t|
96
- t.integer 'spud_user_id', limit: 4
97
- t.string 'key', limit: 255
98
- t.string 'value', limit: 255
99
- t.datetime 'created_at'
100
- t.datetime 'updated_at'
78
+ create_table "spud_user_settings", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
79
+ t.integer "spud_user_id"
80
+ t.string "key"
81
+ t.string "value"
82
+ t.datetime "created_at"
83
+ t.datetime "updated_at"
101
84
  end
102
85
 
103
- create_table 'spud_users', force: :cascade do |t|
104
- t.string 'first_name', limit: 255
105
- t.string 'last_name', limit: 255
106
- t.boolean 'super_admin'
107
- t.string 'login', limit: 255, null: false
108
- t.string 'email', limit: 255, null: false
109
- t.string 'crypted_password', limit: 255, null: false
110
- t.string 'password_salt', limit: 255, null: false
111
- t.string 'persistence_token', limit: 255, null: false
112
- t.string 'single_access_token', limit: 255, null: false
113
- t.string 'perishable_token', limit: 255, null: false
114
- t.integer 'login_count', limit: 4, default: 0, null: false
115
- t.integer 'failed_login_count', limit: 4, default: 0, null: false
116
- t.datetime 'last_request_at'
117
- t.datetime 'current_login_at'
118
- t.datetime 'last_login_at'
119
- t.string 'current_login_ip', limit: 255
120
- t.string 'last_login_ip', limit: 255
121
- t.datetime 'created_at'
122
- t.datetime 'updated_at'
123
- t.string 'time_zone', limit: 255
124
- t.integer 'spud_role_id', limit: 4
125
- t.boolean 'requires_password_change', default: false
86
+ create_table "spud_users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
87
+ t.string "first_name"
88
+ t.string "last_name"
89
+ t.boolean "super_admin"
90
+ t.string "login", null: false
91
+ t.string "email", null: false
92
+ t.string "crypted_password", null: false
93
+ t.string "password_salt", null: false
94
+ t.string "persistence_token", null: false
95
+ t.string "single_access_token", null: false
96
+ t.string "perishable_token", null: false
97
+ t.integer "login_count", default: 0, null: false
98
+ t.integer "failed_login_count", default: 0, null: false
99
+ t.datetime "last_request_at"
100
+ t.datetime "current_login_at"
101
+ t.datetime "last_login_at"
102
+ t.string "current_login_ip"
103
+ t.string "last_login_ip"
104
+ t.datetime "created_at"
105
+ t.datetime "updated_at"
106
+ t.string "time_zone"
107
+ t.integer "spud_role_id"
108
+ t.boolean "requires_password_change", default: false
109
+ t.index ["email"], name: "index_spud_users_on_email", using: :btree
110
+ t.index ["login"], name: "index_spud_users_on_login", using: :btree
111
+ t.index ["spud_role_id"], name: "index_spud_users_on_spud_role_id", using: :btree
126
112
  end
127
113
 
128
- add_index 'spud_users', ['email'], name: 'index_spud_users_on_email', using: :btree
129
- add_index 'spud_users', ['login'], name: 'index_spud_users_on_login', using: :btree
130
- add_index 'spud_users', ['spud_role_id'], name: 'index_spud_users_on_spud_role_id', using: :btree
131
-
132
- create_table 'tb_redirects', force: :cascade do |t|
133
- t.string 'owner_type', limit: 255
134
- t.integer 'owner_id', limit: 4
135
- t.string 'source', limit: 255, null: false
136
- t.string 'destination', limit: 255, null: false
137
- t.string 'created_by', limit: 255
138
- t.datetime 'created_at', null: false
139
- t.datetime 'updated_at', null: false
114
+ create_table "tb_redirects", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
115
+ t.string "owner_type"
116
+ t.integer "owner_id"
117
+ t.string "source", null: false
118
+ t.string "destination", null: false
119
+ t.string "created_by"
120
+ t.datetime "created_at", null: false
121
+ t.datetime "updated_at", null: false
122
+ t.index ["owner_type", "owner_id"], name: "index_tb_redirects_on_owner_type_and_owner_id", using: :btree
123
+ t.index ["source"], name: "index_tb_redirects_on_source", unique: true, using: :btree
140
124
  end
141
125
 
142
- add_index 'tb_redirects', ['owner_type', 'owner_id'], name: 'index_tb_redirects_on_owner_type_and_owner_id', using: :btree
143
- add_index 'tb_redirects', ['source'], name: 'index_tb_redirects_on_source', unique: true, using: :btree
144
-
145
126
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.beta1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moser Consulting
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-20 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.0.beta1
55
- - !ruby/object:Gem::Dependency
56
- name: tb_liquid
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: 1.1.beta1
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: 1.1.beta1
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: truncate_html
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -292,7 +278,6 @@ files:
292
278
  - spec/dummy/db/migrate/20161020155433_drop_spud_admin_permissions.tb_core.rb
293
279
  - spec/dummy/db/migrate/20161020155434_add_requires_password_change_to_spud_users.tb_core.rb
294
280
  - spec/dummy/db/migrate/20161020155435_create_tb_redirects.tb_redirects.rb
295
- - spec/dummy/db/migrate/20161020155436_create_tb_liquid_spud_liquid_tags.tb_liquid.rb
296
281
  - spec/dummy/db/migrate/20161020155437_create_spud_posts.tb_blog.rb
297
282
  - spec/dummy/db/migrate/20161020155438_create_spud_post_categories.tb_blog.rb
298
283
  - spec/dummy/db/migrate/20161020155439_add_url_to_spud_posts.tb_blog.rb
@@ -335,9 +320,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
335
320
  version: '0'
336
321
  required_rubygems_version: !ruby/object:Gem::Requirement
337
322
  requirements:
338
- - - ">"
323
+ - - ">="
339
324
  - !ruby/object:Gem::Version
340
- version: 1.3.1
325
+ version: '0'
341
326
  requirements: []
342
327
  rubyforge_project:
343
328
  rubygems_version: 2.5.1
@@ -380,7 +365,6 @@ test_files:
380
365
  - spec/dummy/db/migrate/20161020155433_drop_spud_admin_permissions.tb_core.rb
381
366
  - spec/dummy/db/migrate/20161020155434_add_requires_password_change_to_spud_users.tb_core.rb
382
367
  - spec/dummy/db/migrate/20161020155435_create_tb_redirects.tb_redirects.rb
383
- - spec/dummy/db/migrate/20161020155436_create_tb_liquid_spud_liquid_tags.tb_liquid.rb
384
368
  - spec/dummy/db/migrate/20161020155437_create_spud_posts.tb_blog.rb
385
369
  - spec/dummy/db/migrate/20161020155438_create_spud_post_categories.tb_blog.rb
386
370
  - spec/dummy/db/migrate/20161020155439_add_url_to_spud_posts.tb_blog.rb
@@ -1,13 +0,0 @@
1
- # This migration comes from tb_liquid (originally 20140110142037)
2
- class CreateTbLiquidSpudLiquidTags < ActiveRecord::Migration
3
- def change
4
- create_table :spud_liquid_tags do |t|
5
- t.integer :attachment_id
6
- t.string :attachment_type
7
- t.string :tag_name
8
- t.string :value
9
- t.timestamps
10
- end
11
- add_index :spud_liquid_tags, [:tag_name, :value]
12
- end
13
- end