publify_core 9.2.10 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +57 -18
- data/app/assets/javascripts/lang/ar_AR.js +17 -0
- data/app/controllers/admin/{content_controller.rb → articles_controller.rb} +24 -24
- data/app/controllers/admin/dashboard_controller.rb +3 -3
- data/app/controllers/admin/feedback_controller.rb +23 -23
- data/app/controllers/admin/pages_controller.rb +2 -2
- data/app/controllers/admin/post_types_controller.rb +10 -4
- data/app/controllers/admin/redirects_controller.rb +10 -6
- data/app/controllers/admin/resources_controller.rb +2 -2
- data/app/controllers/admin/sidebar_controller.rb +2 -2
- data/app/controllers/admin/tags_controller.rb +5 -3
- data/app/controllers/admin/themes_controller.rb +1 -2
- data/app/controllers/admin/users_controller.rb +5 -3
- data/app/controllers/articles_controller.rb +5 -5
- data/app/controllers/authors_controller.rb +2 -2
- data/app/controllers/base_controller.rb +0 -3
- data/app/controllers/feedback_controller.rb +3 -3
- data/app/controllers/tags_controller.rb +3 -3
- data/app/helpers/authors_helper.rb +1 -1
- data/app/helpers/base_helper.rb +6 -6
- data/app/models/ability.rb +1 -1
- data/app/models/archives_sidebar.rb +3 -3
- data/app/models/article.rb +13 -13
- data/app/models/blog.rb +3 -6
- data/app/models/content.rb +1 -3
- data/app/models/content_base.rb +2 -13
- data/app/models/feedback.rb +1 -2
- data/app/models/meta_sidebar.rb +1 -1
- data/app/models/note.rb +2 -2
- data/app/models/redirect.rb +0 -1
- data/app/models/sidebar.rb +1 -1
- data/app/models/static_sidebar.rb +1 -1
- data/app/models/tag.rb +7 -8
- data/app/models/tag_sidebar.rb +3 -3
- data/app/models/text_filter.rb +17 -43
- data/app/models/user.rb +2 -2
- data/app/services/title_builder.rb +4 -4
- data/app/views/admin/{content → articles}/_article_list.html.erb +3 -3
- data/app/views/admin/{content → articles}/_form.html.erb +11 -1
- data/app/views/admin/{content → articles}/index.html.erb +1 -1
- data/app/views/admin/dashboard/_drafts.html.erb +2 -2
- data/app/views/admin/dashboard/_overview.html.erb +1 -1
- data/app/views/admin/dashboard/_welcome.html.erb +4 -4
- data/app/views/admin/dashboard/index.html.erb +0 -7
- data/app/views/admin/feedback/article.html.erb +12 -6
- data/app/views/admin/feedback/edit.html.erb +14 -2
- data/app/views/admin/feedback/index.html.erb +6 -7
- data/app/views/admin/pages/_form.html.erb +13 -14
- data/app/views/admin/seo/show.html.erb +12 -1
- data/app/views/admin/shared/_menu.html.erb +5 -4
- data/app/views/admin/tags/_index_and_form.html.erb +2 -1
- data/app/views/articles/_comment_errors.html.erb +11 -1
- data/app/views/articles/read.html.erb +1 -1
- data/app/views/layouts/administration.html.erb +9 -17
- data/config/i18n-tasks.yml +8 -1
- data/config/initializers/devise.rb +1 -1
- data/config/locales/ar.yml +885 -0
- data/config/locales/da.yml +12 -12
- data/config/locales/de.yml +12 -12
- data/config/locales/en.yml +12 -12
- data/config/locales/es-MX.yml +12 -12
- data/config/locales/fr.yml +12 -12
- data/config/locales/he.yml +12 -12
- data/config/locales/it.yml +12 -12
- data/config/locales/ja.yml +13 -13
- data/config/locales/lt.yml +12 -12
- data/config/locales/{nb-NO.yml → nb.yml} +13 -13
- data/config/locales/nl.yml +13 -13
- data/config/locales/pl.yml +12 -12
- data/config/locales/pt-BR.yml +12 -12
- data/config/locales/ro.yml +12 -12
- data/config/locales/ru.yml +13 -13
- data/config/locales/sidebars.ar.yml +20 -0
- data/config/locales/{sidebars.nb-NO.yml → sidebars.nb.yml} +1 -1
- data/config/locales/zh-CN.yml +12 -12
- data/config/locales/zh-TW.yml +12 -12
- data/config/routes.rb +2 -2
- data/db/migrate/20150807134129_simplify_redirect_relations.rb +1 -0
- data/db/migrate/20150808052637_add_blog_ids.rb +3 -1
- data/db/migrate/20160605103918_replace_profile_id_with_string.rb +1 -0
- data/db/migrate/20160701062604_add_blog_id_to_resources.rb +2 -0
- data/db/migrate/20190208152646_move_text_filter_to_name.rb +17 -17
- data/db/migrate/20221007091049_remove_table_sitealizer.rb +19 -0
- data/db/migrate/20221010092846_remove_page_caches_table.rb +15 -0
- data/db/migrate/20221012163214_remove_itunes_fields_from_resources.rb +14 -0
- data/db/seeds.rb +0 -4
- data/lib/publify_core/content_text_helpers.rb +11 -0
- data/lib/publify_core/lang.rb +1 -1
- data/lib/publify_core/testing_support/factories/articles.rb +55 -0
- data/lib/publify_core/testing_support/factories/blogs.rb +24 -0
- data/lib/publify_core/testing_support/factories/comments.rb +40 -0
- data/lib/publify_core/testing_support/factories/contents.rb +7 -0
- data/lib/publify_core/testing_support/factories/notes.rb +17 -0
- data/lib/publify_core/testing_support/factories/pages.rb +13 -0
- data/lib/publify_core/testing_support/factories/post_types.rb +8 -0
- data/lib/publify_core/testing_support/factories/redirects.rb +9 -0
- data/lib/publify_core/testing_support/factories/resources.rb +16 -0
- data/lib/publify_core/testing_support/factories/sequences.rb +12 -0
- data/lib/publify_core/testing_support/factories/sidebars.rb +10 -0
- data/lib/publify_core/testing_support/factories/tags.rb +9 -0
- data/lib/publify_core/testing_support/factories/trackbacks.rb +13 -0
- data/lib/publify_core/testing_support/factories/users.rb +43 -0
- data/lib/publify_core/version.rb +1 -1
- data/lib/publify_core.rb +3 -3
- data/lib/publify_textfilter_markdown.rb +8 -9
- data/lib/publify_textfilter_markdown_smartquotes.rb +20 -0
- data/lib/publify_textfilter_twitterfilter.rb +36 -18
- data/lib/sidebar_field.rb +2 -2
- data/lib/sidebar_registry.rb +0 -12
- data/lib/text_filter_plugin.rb +23 -30
- metadata +213 -105
- data/lib/publify_core/testing_support/factories.rb +0 -240
- data/lib/publify_textfilter_textile.rb +0 -24
- data/lib/tasks/i18n.rake +0 -9
- /data/app/views/admin/{content → articles}/autosave.js.erb +0 -0
- /data/app/views/admin/{content → articles}/edit.html.erb +0 -0
- /data/app/views/admin/{content → articles}/index.js.erb +0 -0
- /data/app/views/admin/{content → articles}/new.html.erb +0 -0
@@ -1,240 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "publify_core/testing_support/upload_fixtures"
|
4
|
-
|
5
|
-
# Factory definitions
|
6
|
-
FactoryBot.define do
|
7
|
-
sequence(:name) { |n| "name_#{n}" }
|
8
|
-
sequence(:body) { |n| "body #{n}" * (n + 3 % 5) }
|
9
|
-
sequence(:user) { |n| "user#{n}" }
|
10
|
-
sequence(:email) { |n| "user#{n}@example.com" }
|
11
|
-
sequence(:guid) { |n| "deadbeef#{n}" }
|
12
|
-
sequence(:label) { |n| "lab_#{n}" }
|
13
|
-
sequence(:file_name) { |f| "file_name_#{f}" }
|
14
|
-
sequence(:time) { |n| Time.new(2012, 3, 26, 19, 56).in_time_zone - n }
|
15
|
-
|
16
|
-
factory :user do
|
17
|
-
login { FactoryBot.generate(:user) }
|
18
|
-
email { generate(:email) }
|
19
|
-
name { "Bond" }
|
20
|
-
nickname { "James Bond" }
|
21
|
-
notify_via_email { false }
|
22
|
-
notify_on_new_articles { false }
|
23
|
-
notify_on_comments { false }
|
24
|
-
password { "top-Secret12!$#" }
|
25
|
-
state { "active" }
|
26
|
-
profile { User::CONTRIBUTOR }
|
27
|
-
|
28
|
-
trait :without_twitter do
|
29
|
-
twitter { nil }
|
30
|
-
association :resource, nil
|
31
|
-
end
|
32
|
-
|
33
|
-
trait :with_a_full_profile do
|
34
|
-
description { "I am a poor lonesone factory generated user" }
|
35
|
-
url { "http://myblog.net" }
|
36
|
-
msn { "random@mail.com" }
|
37
|
-
aim { "randomaccount" }
|
38
|
-
yahoo { "anotherrandomaccount" }
|
39
|
-
twitter { "@random" }
|
40
|
-
jabber { "random@account.com" }
|
41
|
-
end
|
42
|
-
|
43
|
-
trait :as_admin do
|
44
|
-
profile { User::ADMIN }
|
45
|
-
end
|
46
|
-
|
47
|
-
trait :as_publisher do
|
48
|
-
profile { User::PUBLISHER }
|
49
|
-
end
|
50
|
-
|
51
|
-
trait :as_contributor do
|
52
|
-
profile { User::CONTRIBUTOR }
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
factory :article do
|
57
|
-
title { "A big article" }
|
58
|
-
body { "A content with several data" }
|
59
|
-
extended { "extended content for fun" }
|
60
|
-
guid
|
61
|
-
published_at { Time.zone.now }
|
62
|
-
user
|
63
|
-
allow_comments { true }
|
64
|
-
state { :published }
|
65
|
-
allow_pings { true }
|
66
|
-
text_filter_name { "markdown" }
|
67
|
-
|
68
|
-
after :build do |article|
|
69
|
-
article.blog ||= Blog.first || create(:blog)
|
70
|
-
end
|
71
|
-
|
72
|
-
after :stub do |article|
|
73
|
-
article.blog ||= Blog.first || create(:blog)
|
74
|
-
end
|
75
|
-
|
76
|
-
trait :with_tags do
|
77
|
-
keywords { "a tag" }
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
factory :unpublished_article, parent: :article do
|
82
|
-
published_at { nil }
|
83
|
-
state { :draft }
|
84
|
-
end
|
85
|
-
|
86
|
-
factory :full_article, parent: :article do
|
87
|
-
after :create do |article|
|
88
|
-
article.resources << create(:resource)
|
89
|
-
article.tags << create(:tag)
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
factory :content do
|
94
|
-
blog { Blog.first || create(:blog) }
|
95
|
-
end
|
96
|
-
|
97
|
-
factory :post_type do
|
98
|
-
name { "foobar" }
|
99
|
-
description { "Some description" }
|
100
|
-
end
|
101
|
-
|
102
|
-
factory :utf8article, parent: :article do
|
103
|
-
title { "ルビー" }
|
104
|
-
permalink { "ルビー" }
|
105
|
-
end
|
106
|
-
|
107
|
-
factory :second_article, parent: :article do
|
108
|
-
title { "Another big article" }
|
109
|
-
end
|
110
|
-
|
111
|
-
factory :article_with_accent_in_html, parent: :article do
|
112
|
-
title { "article with accent" }
|
113
|
-
body { "écoute The future is cool!" }
|
114
|
-
permalink { "article-with-accent" }
|
115
|
-
end
|
116
|
-
|
117
|
-
factory :blog do
|
118
|
-
base_url { "http://test.host/blog" }
|
119
|
-
hide_extended_on_rss { true }
|
120
|
-
blog_name { "test blog" }
|
121
|
-
limit_article_display { 2 }
|
122
|
-
sp_url_limit { 3 }
|
123
|
-
plugin_avatar { "" }
|
124
|
-
blog_subtitle { "test subtitle" }
|
125
|
-
limit_rss_display { 10 }
|
126
|
-
geourl_location { "" }
|
127
|
-
default_allow_pings { false }
|
128
|
-
send_outbound_pings { false }
|
129
|
-
sp_global { true }
|
130
|
-
default_allow_comments { true }
|
131
|
-
email_from { "scott@sigkill.org" }
|
132
|
-
sp_article_auto_close { 0 }
|
133
|
-
permalink_format { "/%year%/%month%/%day%/%title%" }
|
134
|
-
rss_description_text { "rss description text" }
|
135
|
-
lang { "en_US" }
|
136
|
-
end
|
137
|
-
|
138
|
-
factory :tag do |tag|
|
139
|
-
tag.name { FactoryBot.generate(:name) }
|
140
|
-
tag.display_name { |a| a.name } # rubocop:disable Style/SymbolProc
|
141
|
-
blog { Blog.first || create(:blog) }
|
142
|
-
end
|
143
|
-
|
144
|
-
factory :resource do
|
145
|
-
upload { PublifyCore::TestingSupport::UploadFixtures.file_upload }
|
146
|
-
mime { "image/jpeg" }
|
147
|
-
size { 110 }
|
148
|
-
blog { Blog.first || create(:blog) }
|
149
|
-
end
|
150
|
-
|
151
|
-
factory :avatar, parent: :resource do
|
152
|
-
upload { "avatar.jpg" }
|
153
|
-
mime { "image/jpeg" }
|
154
|
-
size { 600 }
|
155
|
-
end
|
156
|
-
|
157
|
-
factory :redirect do
|
158
|
-
from_path { "foo/bar" }
|
159
|
-
to_path { "/someplace/else" }
|
160
|
-
blog { Blog.first || create(:blog) }
|
161
|
-
end
|
162
|
-
|
163
|
-
factory :comment do
|
164
|
-
article
|
165
|
-
author { "Bob Foo" }
|
166
|
-
url { "http://fakeurl.com" }
|
167
|
-
body { "Comment body" }
|
168
|
-
guid
|
169
|
-
state { "ham" }
|
170
|
-
|
171
|
-
factory :unconfirmed_comment do
|
172
|
-
state { "presumed_ham" }
|
173
|
-
end
|
174
|
-
|
175
|
-
factory :published_comment do
|
176
|
-
state { "ham" }
|
177
|
-
end
|
178
|
-
|
179
|
-
factory :not_published_comment do
|
180
|
-
state { "spam" }
|
181
|
-
end
|
182
|
-
|
183
|
-
factory :ham_comment do
|
184
|
-
state { "ham" }
|
185
|
-
end
|
186
|
-
|
187
|
-
factory :presumed_ham_comment do
|
188
|
-
state { "presumed_ham" }
|
189
|
-
end
|
190
|
-
|
191
|
-
factory :presumed_spam_comment do
|
192
|
-
state { "presumed_spam" }
|
193
|
-
end
|
194
|
-
|
195
|
-
factory :spam_comment do
|
196
|
-
state { "spam" }
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
factory :page do
|
201
|
-
name { FactoryBot.generate(:name) }
|
202
|
-
title { "Page One Title" }
|
203
|
-
body { FactoryBot.generate(:body) }
|
204
|
-
published_at { Time.zone.now }
|
205
|
-
user
|
206
|
-
blog { Blog.first || create(:blog) }
|
207
|
-
state { "published" }
|
208
|
-
end
|
209
|
-
|
210
|
-
factory :note do
|
211
|
-
body { "this is a note" }
|
212
|
-
published_at { Time.zone.now }
|
213
|
-
user
|
214
|
-
state { "published" }
|
215
|
-
text_filter_name { "markdown" }
|
216
|
-
guid
|
217
|
-
blog { Blog.first || create(:blog) }
|
218
|
-
end
|
219
|
-
|
220
|
-
factory :unpublished_note, parent: :note do
|
221
|
-
state { "draft" }
|
222
|
-
end
|
223
|
-
|
224
|
-
factory :trackback do
|
225
|
-
state { "ham" }
|
226
|
-
article
|
227
|
-
blog_name { "Trackback Blog" }
|
228
|
-
title { "Trackback Entry" }
|
229
|
-
url { "http://www.example.com" }
|
230
|
-
excerpt { "This is an excerpt" }
|
231
|
-
guid { "dsafsadffsdsf" }
|
232
|
-
end
|
233
|
-
|
234
|
-
factory :sidebar do
|
235
|
-
active_position { 1 }
|
236
|
-
config { { "title" => "Links", "body" => "some links" } }
|
237
|
-
type { "StaticSidebar" }
|
238
|
-
blog { Blog.first || create(:blog) }
|
239
|
-
end
|
240
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "text_filter_plugin"
|
4
|
-
require "RedCloth"
|
5
|
-
|
6
|
-
class PublifyApp
|
7
|
-
class Textfilter
|
8
|
-
class Textile < TextFilterPlugin::Markup
|
9
|
-
plugin_display_name "Textile (Deprecated)"
|
10
|
-
plugin_description "Textile markup language"
|
11
|
-
|
12
|
-
def self.help_text
|
13
|
-
%{
|
14
|
-
See [_why's Textile reference](http://hobix.com/textile/).
|
15
|
-
}
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.filtertext(text)
|
19
|
-
ActiveSupport::Deprecation.warn "Use of Textile is deprecated"
|
20
|
-
RedCloth.new(text).to_html(:textile)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
data/lib/tasks/i18n.rake
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|