publify_core 9.0.0 → 9.0.1
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.
Potentially problematic release.
This version of publify_core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +46 -37
- data/app/controllers/base_controller.rb +0 -6
- data/app/controllers/theme_controller.rb +5 -2
- data/app/helpers/authors_helper.rb +1 -13
- data/app/helpers/base_helper.rb +5 -0
- data/app/models/blog.rb +0 -1
- data/app/models/content.rb +9 -6
- data/app/views/articles/feedback_rss_feed.rss.builder +1 -2
- data/app/views/articles/index_rss_feed.rss.builder +1 -2
- data/app/views/authors/show_rss_feed.rss.builder +1 -2
- data/app/views/feedback/index.rss.builder +1 -2
- data/app/views/layouts/default.html.erb +1 -0
- data/app/views/shared/_atom_item_article.atom.builder +1 -12
- data/app/views/shared/_rss_item_article.rss.builder +1 -1
- data/config/routes.rb +1 -1
- data/lib/publify_core/engine.rb +5 -0
- data/lib/publify_core/version.rb +1 -1
- data/themes/plain/javascripts/theme.js +0 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a1cf89cac6e217d23be79402f8ea4fab3ef6d88
|
4
|
+
data.tar.gz: 1c7a95fab11db0e9c95a10b21094f59d959b7d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41c5ddd206410b9c6fbe1a9849a811e0fc074c9092924c1725e0a03f498807eb84e2c43b4f52d527497901d58bbda91b3293d5c492b6cd7077c2bc3aef18f82
|
7
|
+
data.tar.gz: a56f839f4b1cff29318ffcd76fe6c1f4e680474534bd54d9ae184e28b4c1fe7e24400f2ce2ec46010cd382dfeae22080a5ddb0324dca648fcca5a8b9fcba654d
|
data/CHANGELOG.md
CHANGED
@@ -1,70 +1,79 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 9.0.1
|
4
|
+
|
5
|
+
* Remove link_to_author setting: author email is no longer shown. Whoever
|
6
|
+
really wants to have it shown should create a new theme (mvz)
|
7
|
+
* Update dependencies (mvz)
|
8
|
+
* Make Devise use the correct layout (mvz)
|
9
|
+
* Ensure email parameter is processed correctly on sign up (mvz)
|
10
|
+
* Correctly serve js files from themes (cantin)
|
11
|
+
|
3
12
|
## 9.0.0
|
4
13
|
|
5
|
-
* Replace page caching with fragment caching
|
6
|
-
* Replace home-grown state machine with aasm
|
7
|
-
* Remove automigration. Users should run db:migrate themselves
|
8
|
-
* Let first-run users pick their own password instead of generating one
|
14
|
+
* Replace page caching with fragment caching (mvz)
|
15
|
+
* Replace home-grown state machine with aasm (mvz)
|
16
|
+
* Remove automigration. Users should run db:migrate themselves (mvz)
|
17
|
+
* Let first-run users pick their own password instead of generating one (mvz)
|
9
18
|
|
10
19
|
* Dependencies
|
11
|
-
- Update dependencies
|
12
|
-
- Drop support for Ruby 2.1
|
20
|
+
- Update dependencies (mvz)
|
21
|
+
- Drop support for Ruby 2.1 (mvz)
|
13
22
|
|
14
23
|
* Removing of old/outdated functionality
|
15
|
-
- Remove support for feedburner
|
16
|
-
- Drop old redirects
|
17
|
-
- Remove RSD end point
|
24
|
+
- Remove support for feedburner (mvz)
|
25
|
+
- Drop old redirects (mvz)
|
26
|
+
- Remove RSD end point (mvz)
|
18
27
|
|
19
28
|
* Feedback
|
20
|
-
- Stop sending trackbacks and pingbacks
|
21
|
-
- Stop accepting trackbacks
|
29
|
+
- Stop sending trackbacks and pingbacks (mvz)
|
30
|
+
- Stop accepting trackbacks (mvz)
|
22
31
|
|
23
32
|
* Improve Atom/RSS feeds
|
24
|
-
- Fix URLs used for resources
|
25
|
-
- Fix URL/alternate links to not just point to the site root
|
26
|
-
- Unify comment and trackback feeds into feedback feed
|
27
|
-
- Add caching for feeds
|
28
|
-
- Fix atom entry publication date
|
29
|
-
- Fix ordering of feedback feed by using created_at
|
33
|
+
- Fix URLs used for resources (mvz)
|
34
|
+
- Fix URL/alternate links to not just point to the site root (mvz)
|
35
|
+
- Unify comment and trackback feeds into feedback feed (mvz)
|
36
|
+
- Add caching for feeds (mvz)
|
37
|
+
- Fix atom entry publication date (mvz)
|
38
|
+
- Fix ordering of feedback feed by using created_at (mvz)
|
30
39
|
|
31
40
|
* Bug fixes
|
32
|
-
- Fix user resource image display when using Fog
|
33
|
-
- Fix sending of welcome email
|
34
|
-
- Fix Tag page description
|
35
|
-
- Handle setting published_at to blank
|
36
|
-
- Handle preview of articles without publication date
|
37
|
-
- Include CSRF meta tag so remote forms work
|
38
|
-
- Fix sidebar field rendering in admin
|
39
|
-
- Fix formatting of settings forms in admin
|
41
|
+
- Fix user resource image display when using Fog (mvz)
|
42
|
+
- Fix sending of welcome email (mvz)
|
43
|
+
- Fix Tag page description (mvz)
|
44
|
+
- Handle setting published_at to blank (mvz)
|
45
|
+
- Handle preview of articles without publication date (mvz)
|
46
|
+
- Include CSRF meta tag so remote forms work (mvz)
|
47
|
+
- Fix sidebar field rendering in admin (mvz)
|
48
|
+
- Fix formatting of settings forms in admin (mvz)
|
40
49
|
|
41
50
|
* Code improvements
|
42
|
-
- Performance improvements
|
43
|
-
- Improve tags controller
|
44
|
-
- Clean up archives and authors page code
|
45
|
-
- Unify content models more to improve performance when mixing models
|
51
|
+
- Performance improvements (mvz)
|
52
|
+
- Improve tags controller (mvz)
|
53
|
+
- Clean up archives and authors page code (mvz)
|
54
|
+
- Unify content models more to improve performance when mixing models (mvz)
|
46
55
|
|
47
56
|
## 9.0.0.pre6 / 2016-12-23
|
48
57
|
|
49
|
-
* Remove now-broken caching of theme assets
|
50
|
-
* Remove cache invalidation support code from content
|
58
|
+
* Remove now-broken caching of theme assets (mvz)
|
59
|
+
* Remove cache invalidation support code from content (mvz)
|
51
60
|
|
52
61
|
## 9.0.0.pre5 / 2016-12-17
|
53
62
|
|
54
|
-
* Update dependencies
|
63
|
+
* Update dependencies (mvz)
|
55
64
|
* Remove activerecord-session_store. The main application should decide on the
|
56
|
-
store to use
|
57
|
-
* Remove unused translations
|
65
|
+
store to use (mvz)
|
66
|
+
* Remove unused translations (mvz)
|
58
67
|
|
59
68
|
## 9.0.0.pre4
|
60
69
|
|
61
|
-
* Ensure theme files are part of the gem
|
70
|
+
* Ensure theme files are part of the gem (mvz)
|
62
71
|
|
63
72
|
## 9.0.0.pre3
|
64
73
|
|
65
|
-
* Update to Rails 5.0
|
74
|
+
* Update to Rails 5.0 (mvz)
|
66
75
|
* Remove page caching since the released version of actionpack-page_caching is
|
67
|
-
incompatible with Rails 5
|
76
|
+
incompatible with Rails 5 (mvz)
|
68
77
|
|
69
78
|
## 9.0.0.pre2
|
70
79
|
|
@@ -2,15 +2,9 @@ require 'cancancan'
|
|
2
2
|
|
3
3
|
class BaseController < ApplicationController
|
4
4
|
before_action :fire_triggers, :load_lang, :set_paths
|
5
|
-
before_action :configure_permitted_parameters, if: :devise_controller?
|
6
5
|
|
7
6
|
private
|
8
7
|
|
9
|
-
def configure_permitted_parameters
|
10
|
-
# TODO: Check if this is still needed
|
11
|
-
devise_parameter_sanitizer.permit(:sign_up, keys: [:email])
|
12
|
-
end
|
13
|
-
|
14
8
|
def login_required
|
15
9
|
authenticate_user! && authorize!(params[:action], params[:controller])
|
16
10
|
end
|
@@ -1,10 +1,13 @@
|
|
1
1
|
class ThemeController < ContentController
|
2
|
+
# Allow javascripts via Get request
|
3
|
+
skip_before_action :verify_authenticity_token, only: :javascripts
|
4
|
+
|
2
5
|
def stylesheets
|
3
6
|
render_theme_item(:stylesheets, params[:filename], 'text/css; charset=utf-8')
|
4
7
|
end
|
5
8
|
|
6
|
-
def
|
7
|
-
render_theme_item(:
|
9
|
+
def javascripts
|
10
|
+
render_theme_item(:javascripts, params[:filename], 'text/javascript; charset=utf-8')
|
8
11
|
end
|
9
12
|
|
10
13
|
def images
|
@@ -22,18 +22,6 @@ module AuthorsHelper
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def author_link(article)
|
25
|
-
|
26
|
-
return h(article.user.name) if just_name?(article.user)
|
27
|
-
content_tag(:a, href: "mailto:#{h article.user.email}") { h(article.user.name) }
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
def just_author?(author)
|
33
|
-
author.nil? || author.name.blank?
|
34
|
-
end
|
35
|
-
|
36
|
-
def just_name?(author)
|
37
|
-
author.present? && !this_blog.link_to_author
|
25
|
+
h(article.author_name)
|
38
26
|
end
|
39
27
|
end
|
data/app/helpers/base_helper.rb
CHANGED
@@ -31,6 +31,11 @@ module BaseHelper
|
|
31
31
|
stylesheet_link_tag "/stylesheets/theme/#{name}.css" if File.exist? src
|
32
32
|
end
|
33
33
|
|
34
|
+
def themeable_javascript_include_tag(name)
|
35
|
+
src = this_blog.current_theme.path + "/javascripts/#{name}.js"
|
36
|
+
javascript_include_tag "/javascripts/theme/#{name}.js" if File.exist? src
|
37
|
+
end
|
38
|
+
|
34
39
|
def render_to_string(*args, &block)
|
35
40
|
controller.send(:render_to_string, *args, &block)
|
36
41
|
end
|
data/app/models/blog.rb
CHANGED
@@ -54,7 +54,6 @@ class Blog < ActiveRecord::Base
|
|
54
54
|
setting :default_allow_pings, :boolean, false
|
55
55
|
setting :default_allow_comments, :boolean, true
|
56
56
|
setting :default_moderate_comments, :boolean, false
|
57
|
-
setting :link_to_author, :boolean, false
|
58
57
|
setting :show_extended_on_rss, :boolean, true # deprecated but still needed for backward compatibility
|
59
58
|
setting :hide_extended_on_rss, :boolean, false
|
60
59
|
setting :theme, :string, 'plain'
|
data/app/models/content.rb
CHANGED
@@ -45,6 +45,14 @@ class Content < ActiveRecord::Base
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def author_name
|
49
|
+
if user.present? && user.name.present?
|
50
|
+
user.name
|
51
|
+
else
|
52
|
+
author
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
48
56
|
# Set the text filter for this object.
|
49
57
|
# NOTE: Due to how Rails injects association methods, this cannot be put in ContentBase
|
50
58
|
# TODO: Allowing assignment of a string here is not very clean.
|
@@ -109,16 +117,11 @@ class Content < ActiveRecord::Base
|
|
109
117
|
self[:whiteboard] ||= {}
|
110
118
|
end
|
111
119
|
|
112
|
-
def link_to_author?
|
113
|
-
user.email.present? && blog.link_to_author
|
114
|
-
end
|
115
|
-
|
116
120
|
def get_rss_description
|
117
121
|
return '' unless blog.rss_description
|
118
|
-
return '' unless respond_to?(:user) && user && user.name
|
119
122
|
|
120
123
|
rss_desc = blog.rss_description_text
|
121
|
-
rss_desc.gsub!('%author%',
|
124
|
+
rss_desc.gsub!('%author%', author_name)
|
122
125
|
rss_desc.gsub!('%blog_url%', blog.base_url)
|
123
126
|
rss_desc.gsub!('%blog_name%', blog.blog_name)
|
124
127
|
rss_desc.gsub!('%permalink_url%', permalink_url)
|
@@ -2,8 +2,7 @@ xml.instruct! :xml, version: '1.0', encoding: 'UTF-8'
|
|
2
2
|
xml.instruct! 'xml-stylesheet', type: 'text/css', href: url_for('/stylesheets/rss.css')
|
3
3
|
|
4
4
|
xml.rss 'version' => '2.0', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
|
5
|
-
'xmlns:atom' => 'http://www.w3.org/2005/Atom'
|
6
|
-
'xmlns:trackback' => 'http://madskills.com/public/xml/rss/module/trackback/' do
|
5
|
+
'xmlns:atom' => 'http://www.w3.org/2005/Atom' do
|
7
6
|
xml.channel do
|
8
7
|
xml.title feed_title
|
9
8
|
xml.link @article.permalink_url
|
@@ -2,8 +2,7 @@ xml.instruct! :xml, version: '1.0', encoding: 'UTF-8'
|
|
2
2
|
xml.instruct! 'xml-stylesheet', type: 'text/css', href: url_for('/stylesheets/rss.css')
|
3
3
|
|
4
4
|
xml.rss 'version' => '2.0', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
|
5
|
-
'xmlns:atom' => 'http://www.w3.org/2005/Atom'
|
6
|
-
'xmlns:trackback' => 'http://madskills.com/public/xml/rss/module/trackback/' do
|
5
|
+
'xmlns:atom' => 'http://www.w3.org/2005/Atom' do
|
7
6
|
xml.channel do
|
8
7
|
xml.title feed_title
|
9
8
|
xml.link this_blog.base_url
|
@@ -2,8 +2,7 @@ xml.instruct! :xml, version: '1.0', encoding: 'UTF-8'
|
|
2
2
|
xml.instruct! 'xml-stylesheet', type: 'text/css', href: url_for('/stylesheets/rss.css')
|
3
3
|
|
4
4
|
xml.rss 'version' => '2.0', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
|
5
|
-
'xmlns:atom' => 'http://www.w3.org/2005/Atom'
|
6
|
-
'xmlns:trackback' => 'http://madskills.com/public/xml/rss/module/trackback/' do
|
5
|
+
'xmlns:atom' => 'http://www.w3.org/2005/Atom' do
|
7
6
|
xml.channel do
|
8
7
|
xml.title feed_title
|
9
8
|
xml.link this_blog.base_url
|
@@ -2,8 +2,7 @@ xml.instruct! :xml, version: '1.0', encoding: 'UTF-8'
|
|
2
2
|
xml.instruct! 'xml-stylesheet', type: 'text/css', href: url_for('/stylesheets/rss.css')
|
3
3
|
|
4
4
|
xml.rss 'version' => '2.0', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
|
5
|
-
'xmlns:atom' => 'http://www.w3.org/2005/Atom'
|
6
|
-
'xmlns:trackback' => 'http://madskills.com/public/xml/rss/module/trackback/' do
|
5
|
+
'xmlns:atom' => 'http://www.w3.org/2005/Atom' do
|
7
6
|
xml.channel do
|
8
7
|
xml.title feed_title
|
9
8
|
xml.link this_blog.base_url
|
@@ -1,17 +1,6 @@
|
|
1
1
|
feed.entry item, id: "urn:uuid:#{item.guid}", published: item.published_at, url: item.permalink_url do |entry|
|
2
2
|
entry.author do
|
3
|
-
name
|
4
|
-
item.user.name
|
5
|
-
rescue
|
6
|
-
item.author
|
7
|
-
end
|
8
|
-
email = begin
|
9
|
-
item.user.email
|
10
|
-
rescue
|
11
|
-
nil
|
12
|
-
end
|
13
|
-
entry.name name
|
14
|
-
entry.email email unless email.blank? || !this_blog.link_to_author
|
3
|
+
entry.name item.author_name
|
15
4
|
end
|
16
5
|
|
17
6
|
if item.is_a?(Note)
|
@@ -8,7 +8,7 @@ xm.item do
|
|
8
8
|
xm.description content_html + item.get_rss_description
|
9
9
|
xm.pubDate item.published_at.rfc822
|
10
10
|
xm.guid "urn:uuid:#{item.guid}", 'isPermaLink' => 'false'
|
11
|
-
xm.
|
11
|
+
xm.dc :creator, item.author_name
|
12
12
|
|
13
13
|
if item.is_a?(Article)
|
14
14
|
xm.comments(item.permalink_url('comments'))
|
data/config/routes.rb
CHANGED
@@ -48,7 +48,7 @@ Rails.application.routes.draw do
|
|
48
48
|
# ThemeController
|
49
49
|
scope controller: 'theme', filename: /.*/ do
|
50
50
|
get 'stylesheets/theme/:filename', action: 'stylesheets', format: false
|
51
|
-
get 'javascripts/theme/:filename', action: '
|
51
|
+
get 'javascripts/theme/:filename', action: 'javascripts', format: false
|
52
52
|
get 'images/theme/:filename', action: 'images', format: false
|
53
53
|
get 'fonts/theme/:filename', action: 'fonts', format: false
|
54
54
|
end
|
data/lib/publify_core/engine.rb
CHANGED
@@ -5,6 +5,11 @@ module PublifyCore
|
|
5
5
|
generators.fixture_replacement :factory_girl, dir: 'spec/factories'
|
6
6
|
end
|
7
7
|
|
8
|
+
config.to_prepare do
|
9
|
+
DeviseController.layout 'accounts'
|
10
|
+
DeviseController.before_action { devise_parameter_sanitizer.permit(:sign_up, keys: [:email]) }
|
11
|
+
end
|
12
|
+
|
8
13
|
initializer 'publify_core.assets.precompile' do |app|
|
9
14
|
app.config.assets.precompile += %w(
|
10
15
|
publify.js
|
data/lib/publify_core/version.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: publify_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-08-31 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -145,14 +145,14 @@ dependencies:
|
|
145
145
|
requirements:
|
146
146
|
- - "~>"
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version: 1.
|
148
|
+
version: 1.2.0
|
149
149
|
type: :runtime
|
150
150
|
prerelease: false
|
151
151
|
version_requirements: !ruby/object:Gem::Requirement
|
152
152
|
requirements:
|
153
153
|
- - "~>"
|
154
154
|
- !ruby/object:Gem::Version
|
155
|
-
version: 1.
|
155
|
+
version: 1.2.0
|
156
156
|
- !ruby/object:Gem::Dependency
|
157
157
|
name: dynamic_form
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,14 +187,14 @@ dependencies:
|
|
187
187
|
requirements:
|
188
188
|
- - "~>"
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version: 1.
|
190
|
+
version: 1.4.0
|
191
191
|
type: :runtime
|
192
192
|
prerelease: false
|
193
193
|
version_requirements: !ruby/object:Gem::Requirement
|
194
194
|
requirements:
|
195
195
|
- - "~>"
|
196
196
|
- !ruby/object:Gem::Version
|
197
|
-
version: 1.
|
197
|
+
version: 1.4.0
|
198
198
|
- !ruby/object:Gem::Dependency
|
199
199
|
name: jquery-rails
|
200
200
|
requirement: !ruby/object:Gem::Requirement
|
@@ -859,6 +859,7 @@ files:
|
|
859
859
|
- lib/theme.rb
|
860
860
|
- lib/transforms.rb
|
861
861
|
- themes/plain/about.markdown
|
862
|
+
- themes/plain/javascripts/theme.js
|
862
863
|
- themes/plain/preview.png
|
863
864
|
- themes/plain/stylesheets/theme.css
|
864
865
|
homepage: https://publify.co
|
@@ -881,7 +882,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
881
882
|
version: '0'
|
882
883
|
requirements: []
|
883
884
|
rubyforge_project:
|
884
|
-
rubygems_version: 2.6.
|
885
|
+
rubygems_version: 2.6.11
|
885
886
|
signing_key:
|
886
887
|
specification_version: 4
|
887
888
|
summary: Core engine for the Publify blogging system.
|