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 +4 -4
- data/app/controllers/admin/posts_controller.rb +0 -1
- data/app/models/spud/spud_post_model.rb +15 -12
- data/app/views/posts/index.html.erb +1 -1
- data/app/views/posts/show.html.erb +1 -1
- data/lib/spud_blog/engine.rb +0 -1
- data/lib/spud_blog/version.rb +1 -1
- data/spec/dummy/db/schema.rb +94 -113
- metadata +4 -20
- data/spec/dummy/db/migrate/20161020155436_create_tb_liquid_spud_liquid_tags.tb_liquid.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab37b0d808766124759d266757d35eaaea4d359b
|
4
|
+
data.tar.gz: ee83293562e1e9246b8bd2df584c07f1deb7f695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a641f5ca8ca4c50f518c8dd3636520d07ddc6e5f547e7f7ff4bb3fcb449b3d0a5759a655e33c630f5f2f4828899e785cca31a963afe8e9a2d34346ddb80cd115
|
7
|
+
data.tar.gz: cb498d73cd7db7dc97cfdfebf59ef26788d0e6a92d0da47dc60f83f4bb2f6e3c1ab2bb6dd0310bde5e1b425517435c0c31a97864f89e9449435f905bb7fa5b39
|
@@ -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
|
-
|
81
|
-
|
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
|
-
|
86
|
-
|
87
|
-
end
|
87
|
+
# def content_processed=(content)
|
88
|
+
# self[:content_processed] = content
|
89
|
+
# end
|
88
90
|
|
89
|
-
def content_processed
|
90
|
-
|
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.
|
38
|
+
<%= truncate_html post.content.html_safe, :length => 250 %>
|
39
39
|
</div>
|
40
40
|
</div>
|
41
41
|
<% end %>
|
data/lib/spud_blog/engine.rb
CHANGED
data/lib/spud_blog/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -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:
|
13
|
+
ActiveRecord::Schema.define(version: 20161020155452) do
|
15
14
|
|
16
|
-
create_table
|
17
|
-
t.
|
18
|
-
t.string
|
19
|
-
t.
|
20
|
-
t.
|
21
|
-
t.
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
t.
|
29
|
-
t.string
|
30
|
-
t.
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
t.
|
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
|
-
|
51
|
-
|
52
|
-
|
53
|
-
t.
|
54
|
-
t.
|
55
|
-
t.
|
56
|
-
t.
|
57
|
-
t.
|
58
|
-
t.datetime
|
59
|
-
t.
|
60
|
-
t.
|
61
|
-
t.string
|
62
|
-
t.
|
63
|
-
t.string
|
64
|
-
t.text
|
65
|
-
t.string
|
66
|
-
t.
|
67
|
-
t.string
|
68
|
-
t.
|
69
|
-
t.
|
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
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
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
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
96
|
-
t.integer
|
97
|
-
t.string
|
98
|
-
t.string
|
99
|
-
t.datetime
|
100
|
-
t.datetime
|
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
|
104
|
-
t.string
|
105
|
-
t.string
|
106
|
-
t.boolean
|
107
|
-
t.string
|
108
|
-
t.string
|
109
|
-
t.string
|
110
|
-
t.string
|
111
|
-
t.string
|
112
|
-
t.string
|
113
|
-
t.string
|
114
|
-
t.integer
|
115
|
-
t.integer
|
116
|
-
t.datetime
|
117
|
-
t.datetime
|
118
|
-
t.datetime
|
119
|
-
t.string
|
120
|
-
t.string
|
121
|
-
t.datetime
|
122
|
-
t.datetime
|
123
|
-
t.string
|
124
|
-
t.integer
|
125
|
-
t.boolean
|
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
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
t.string
|
134
|
-
t.
|
135
|
-
t.
|
136
|
-
t.
|
137
|
-
t.
|
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.
|
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:
|
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:
|
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
|