refinerycms-blog 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +28 -10
- data/Gemfile +22 -49
- data/Rakefile +2 -0
- data/app/assets/javascripts/refinery/blog/backend.js +2 -2
- data/app/assets/stylesheets/refinery/blog/backend.css.scss +1 -1
- data/app/controllers/refinery/blog/admin/comments_controller.rb +0 -2
- data/app/controllers/refinery/blog/admin/posts_controller.rb +0 -2
- data/app/controllers/refinery/blog/blog_controller.rb +1 -1
- data/app/controllers/refinery/blog/posts_controller.rb +6 -5
- data/app/models/refinery/blog/comment.rb +2 -2
- data/app/models/refinery/blog/post.rb +1 -1
- data/app/views/refinery/blog/admin/categories/_category.html.erb +3 -1
- data/app/views/refinery/blog/admin/comments/approve.html.erb +0 -0
- data/app/views/refinery/blog/admin/posts/_post.html.erb +3 -1
- data/app/views/refinery/blog/categories/show.html.erb +2 -2
- data/app/views/refinery/blog/posts/_nav.html.erb +6 -6
- data/app/views/refinery/blog/posts/archive.html.erb +1 -1
- data/app/views/refinery/blog/posts/index.html.erb +1 -1
- data/app/views/refinery/blog/posts/show.html.erb +1 -1
- data/app/views/refinery/blog/posts/tagged.html.erb +1 -1
- data/app/views/refinery/blog/shared/_body_content_right.html.erb +1 -1
- data/app/views/refinery/shared/admin/_autocomplete.html.erb +0 -4
- data/config/locales/bg.yml +6 -6
- data/config/locales/en.yml +6 -6
- data/config/locales/fr.yml +6 -6
- data/config/locales/it.yml +6 -6
- data/config/locales/ja.yml +6 -6
- data/config/locales/pl.yml +1 -1
- data/config/locales/pt-BR.yml +2 -2
- data/config/locales/sk.yml +59 -18
- data/config/locales/sv.yml +167 -0
- data/config/routes.rb +2 -2
- data/db/migrate/20110803223522_create_blog_structure.rb +1 -1
- data/lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb +2 -0
- data/lib/refinery/blog/configuration.rb +2 -1
- data/lib/refinery/blog/version.rb +2 -2
- data/readme.md +11 -0
- data/refinerycms-blog.gemspec +2 -1
- data/spec/controllers/refinery/blog/posts_controller_spec.rb +26 -0
- metadata +17 -30
- data/app/models/refinery/blog/comment_mailer.rb +0 -1
- data/app/sweepers/refinery/blog_sweeper.rb +0 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a3112353a79633fd20a81d13c11c85bad6db5c9c
|
4
|
+
data.tar.gz: b8864564da5a0c75a0c037a4c93eadcf8a648227
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3cabbaae668655f98c6ea62758ffe821d17b741cc9ac4152bc1ca33f8f70ee575dd80e0c7d850e0c8ac7488631e554d6bc6e38e0fe11245731de734f7ff56b6b
|
7
|
+
data.tar.gz: b0f32d1805116b613b0f0c4a1b358e7d95e857ad3244b786d7956109af5aef007bed8bd8ffe88648c34ba107eed047eaf0d92b93d1443f0619cf2f8a14a5a0f0
|
data/.travis.yml
CHANGED
@@ -1,18 +1,36 @@
|
|
1
|
+
language: ruby
|
2
|
+
before_install:
|
3
|
+
- 'if [[ "$TRAVIS_RUBY_VERSION" =~ "jruby" ]] ; then gem update --system ; fi'
|
1
4
|
before_script:
|
5
|
+
- "sh -e /etc/init.d/xvfb start"
|
2
6
|
- "bundle exec rake refinery:testing:dummy_app > /dev/null"
|
3
|
-
script:
|
7
|
+
script:
|
8
|
+
- "DISPLAY=:99.0 bundle exec rspec spec"
|
4
9
|
notifications:
|
5
|
-
email:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
email: true
|
11
|
+
irc:
|
12
|
+
use_notice: true
|
13
|
+
skip_join: true
|
14
|
+
channels:
|
15
|
+
- "irc.freenode.org#refinerycms"
|
16
|
+
campfire:
|
17
|
+
on_success: always
|
18
|
+
on_failure: always
|
19
|
+
rooms:
|
20
|
+
- secure: "JaX+Ckvdd2wqL2bD6t8PHvMDBHxWBlCrkBKPcDKxV0t0DOwzzzwxMryVqcRi\nPsmM/zvmWFATDyRmivhNOpu4lRg9RytSroxZ9nkmbLDqjCyEAZ6tv4yZXME/\nPaxPwmfwgS9g8TKjj3lSWS7rEpqqg0D5S0XIfIHrj6KB6LUmFHc="
|
10
21
|
env:
|
11
22
|
- DB=postgresql
|
12
23
|
- DB=mysql
|
24
|
+
matrix:
|
25
|
+
allow_failures:
|
26
|
+
- rvm: rbx-18mode
|
27
|
+
- rvm: rbx-19mode
|
28
|
+
- rvm: jruby-19mode
|
29
|
+
- rvm: jruby-18mode
|
13
30
|
rvm:
|
14
|
-
- 1.8.7
|
15
|
-
- 1.9.2
|
16
31
|
- 1.9.3
|
17
|
-
-
|
18
|
-
-
|
32
|
+
- 1.8.7
|
33
|
+
- rbx-19mode
|
34
|
+
- jruby-19mode
|
35
|
+
- rbx-18mode
|
36
|
+
- jruby-18mode
|
data/Gemfile
CHANGED
@@ -2,63 +2,36 @@ source "http://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem 'refinerycms', '~> 2.0.
|
5
|
+
gem 'refinerycms', '~> 2.0.10'
|
6
6
|
|
7
|
-
|
8
|
-
require 'rbconfig'
|
7
|
+
gem 'quiet_assets', :group => :development
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter'
|
16
|
-
gem 'jruby-openssl'
|
17
|
-
end
|
18
|
-
|
19
|
-
unless defined?(JRUBY_VERSION)
|
20
|
-
gem 'sqlite3'
|
21
|
-
gem 'mysql2'
|
22
|
-
gem 'pg'
|
23
|
-
end
|
9
|
+
# Database Configuration
|
10
|
+
unless ENV['TRAVIS']
|
11
|
+
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
12
|
+
gem 'sqlite3', :platform => :ruby
|
13
|
+
end
|
24
14
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
if !ENV['TRAVIS'] || ENV['DB'] == 'mysql'
|
16
|
+
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
17
|
+
gem 'jdbc-mysql', '= 5.1.13', :platform => :jruby
|
18
|
+
gem 'mysql2', :platform => :ruby
|
19
|
+
end
|
30
20
|
|
31
|
-
|
32
|
-
|
33
|
-
|
21
|
+
if !ENV['TRAVIS'] || ENV['DB'] == 'postgresql'
|
22
|
+
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
23
|
+
gem 'pg', :platform => :ruby
|
24
|
+
end
|
34
25
|
|
35
|
-
|
36
|
-
if RbConfig::CONFIG['target_os'] =~ /darwin/i
|
37
|
-
gem 'rb-fsevent', '>= 0.3.9'
|
38
|
-
gem 'growl', '~> 1.0.3'
|
39
|
-
end
|
40
|
-
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
41
|
-
gem 'rb-inotify', '>= 0.5.1'
|
42
|
-
gem 'libnotify', '~> 0.1.3'
|
43
|
-
gem 'therubyracer', '~> 0.9.9'
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
26
|
+
gem 'jruby-openssl', :platform => :jruby
|
47
27
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
gem 'growl', '~> 1.0.3'
|
52
|
-
end
|
53
|
-
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
54
|
-
gem 'rb-inotify', '>= 0.5.1'
|
55
|
-
gem 'libnotify', '~> 0.1.3'
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
28
|
+
group :test do
|
29
|
+
gem 'refinerycms-testing', '~> 2.0.3'
|
30
|
+
gem 'generator_spec', '~> 0.8.7'
|
59
31
|
end
|
60
32
|
|
61
|
-
#
|
33
|
+
# Gems used only for assets and not required
|
34
|
+
# in production environments by default.
|
62
35
|
group :assets do
|
63
36
|
gem 'sass-rails'
|
64
37
|
gem 'coffee-rails'
|
data/Rakefile
CHANGED
@@ -53,7 +53,7 @@ $(document).ready(function(){
|
|
53
53
|
$('#page-tabs').tabs();
|
54
54
|
$('#copy_body_link').click(function(event) {
|
55
55
|
// Find the WYMEditor that maps to the custom_teaser field
|
56
|
-
var teaserTextArea = $('#
|
56
|
+
var teaserTextArea = $('#post_custom_teaser')[0];
|
57
57
|
var teaserEditor = null;
|
58
58
|
$.each(WYMeditor.INSTANCES, function(index, editor) {
|
59
59
|
if (editor._element[0] == teaserTextArea) {
|
@@ -62,7 +62,7 @@ $(document).ready(function(){
|
|
62
62
|
});
|
63
63
|
|
64
64
|
if (teaserEditor) {
|
65
|
-
teaserEditor.html($('#
|
65
|
+
teaserEditor.html($('#post_body').attr('value'));
|
66
66
|
}
|
67
67
|
|
68
68
|
event.preventDefault();
|
@@ -64,7 +64,7 @@ ul.blog_categories, ul.blog_categories li {
|
|
64
64
|
margin:5px 0;
|
65
65
|
}
|
66
66
|
a#copy_body_link {
|
67
|
-
background: image_url('refinery/
|
67
|
+
background: image_url('refinery/icons/add.png') no-repeat scroll 0 6px transparent;
|
68
68
|
border-bottom: 0 none;
|
69
69
|
display: inline;
|
70
70
|
line-height: 29px;
|
@@ -2,8 +2,6 @@ module Refinery
|
|
2
2
|
module Blog
|
3
3
|
class PostsController < BlogController
|
4
4
|
|
5
|
-
caches_page :index, :unless => proc {|c| c.refinery_user_signed_in? || c.flash.any? || params[:page].present? }
|
6
|
-
|
7
5
|
before_filter :find_all_blog_posts, :except => [:archive]
|
8
6
|
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
|
9
7
|
before_filter :find_tags
|
@@ -11,8 +9,11 @@ module Refinery
|
|
11
9
|
respond_to :html, :js, :rss
|
12
10
|
|
13
11
|
def index
|
14
|
-
|
15
|
-
|
12
|
+
if request.format.rss?
|
13
|
+
@posts = Post.live.includes(:comments, :categories)
|
14
|
+
# limit rss feed for services (like feedburner) who have max size
|
15
|
+
@posts = Post.recent(params["max_results"]) if params["max_results"].present?
|
16
|
+
end
|
16
17
|
respond_with (@posts) do |format|
|
17
18
|
format.html
|
18
19
|
format.rss
|
@@ -23,7 +24,7 @@ module Refinery
|
|
23
24
|
@comment = Comment.new
|
24
25
|
|
25
26
|
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
|
26
|
-
|
27
|
+
|
27
28
|
@post.increment!(:access_count, 1)
|
28
29
|
|
29
30
|
respond_with (@post) do |format|
|
@@ -41,11 +41,11 @@ module Refinery
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def approve!
|
44
|
-
self.
|
44
|
+
self.update_column(:state, 'approved')
|
45
45
|
end
|
46
46
|
|
47
47
|
def reject!
|
48
|
-
self.
|
48
|
+
self.update_column(:state, 'rejected')
|
49
49
|
end
|
50
50
|
|
51
51
|
def rejected?
|
@@ -78,7 +78,7 @@ module Refinery
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def uncategorized
|
81
|
-
live.includes(:categories).where(
|
81
|
+
live.includes(:categories).where(Refinery::Categorization.table_name => { :blog_category_id => nil })
|
82
82
|
end
|
83
83
|
|
84
84
|
def next(current_record)
|
@@ -11,6 +11,8 @@
|
|
11
11
|
:class => "cancel confirm-delete",
|
12
12
|
:title => t('.delete'),
|
13
13
|
:method => :delete,
|
14
|
-
:
|
14
|
+
:data => {
|
15
|
+
:confirm => t('message', :scope => 'refinery.admin.delete', :title => category.title)
|
16
|
+
} %>
|
15
17
|
</span>
|
16
18
|
</li>
|
File without changes
|
@@ -16,6 +16,8 @@
|
|
16
16
|
:class => "cancel confirm-delete",
|
17
17
|
:title => t('.delete'),
|
18
18
|
:method => :delete,
|
19
|
-
:
|
19
|
+
:data => {
|
20
|
+
:confirm => t('message', :scope => 'refinery.admin.delete', :title => post.title)
|
21
|
+
} %>
|
20
22
|
</span>
|
21
23
|
</li>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% content_for :body_content_title, @category.title %>
|
2
2
|
|
3
|
-
<% content_for :
|
3
|
+
<% content_for :body do %>
|
4
4
|
<% if @posts.any? %>
|
5
5
|
<section id="blog_posts">
|
6
6
|
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<% end %>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<% content_for :
|
16
|
+
<% content_for :side_body do %>
|
17
17
|
<%= render :partial => "/refinery/blog/shared/categories" %>
|
18
18
|
<% end %>
|
19
19
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<nav id="next_prev_article">
|
2
2
|
<% if @post.next.present? -%>
|
3
|
-
<%= link_to (truncate(@post.next.title) + " »"
|
4
|
-
refinery.blog_post_path(@post.next),
|
3
|
+
<%= link_to h(truncate(@post.next.title)) + " »".html_safe,
|
4
|
+
refinery.blog_post_path(@post.next),
|
5
5
|
:class => 'next' %>
|
6
6
|
<% end -%>
|
7
7
|
|
8
|
-
<%= link_to t('blog_home', :scope => 'refinery.blog.posts.show'),
|
9
|
-
refinery.blog_root_path,
|
8
|
+
<%= link_to t('blog_home', :scope => 'refinery.blog.posts.show'),
|
9
|
+
refinery.blog_root_path,
|
10
10
|
:class => 'home' %>
|
11
11
|
|
12
12
|
<% if @post.prev.present? -%>
|
13
|
-
<%= link_to
|
14
|
-
refinery.blog_post_path(@post.prev),
|
13
|
+
<%= link_to "« ".html_safe + h(truncate(@post.prev.title)),
|
14
|
+
refinery.blog_post_path(@post.prev),
|
15
15
|
:class => 'prev' %>
|
16
16
|
<% end -%>
|
17
17
|
</nav><!-- /next_prev_article -->
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% content_for :title, "#{t('.blog_archive_for', :date => @archive_date.strftime('%B %Y'))}" %>
|
2
2
|
|
3
|
-
<% content_for :
|
3
|
+
<% content_for :body do %>
|
4
4
|
<h1><%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1>
|
5
5
|
<% if @posts.any? %>
|
6
6
|
<section id="blog_posts">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<% content_for :body_content_title, "#{t('.posts_tagged')} “#{@tag_name.titleize}”".html_safe -%>
|
4
4
|
|
5
|
-
<% content_for :
|
5
|
+
<% content_for :body do %>
|
6
6
|
<% if @posts.any? %>
|
7
7
|
<section id="blog_posts">
|
8
8
|
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
|
data/config/locales/bg.yml
CHANGED
@@ -142,17 +142,17 @@ bg:
|
|
142
142
|
no_blog_articles_posted: 'Все още няма публикувани статии за %{date}. Очаквайте скоро.'
|
143
143
|
activerecord:
|
144
144
|
models:
|
145
|
-
refinery/
|
146
|
-
refinery/
|
147
|
-
refinery/
|
145
|
+
refinery/blog/category: Категория
|
146
|
+
refinery/blog/comment: Коментар
|
147
|
+
refinery/blog/post: Публикация
|
148
148
|
attributes:
|
149
|
-
refinery/
|
149
|
+
refinery/blog/category:
|
150
150
|
title: Заглавие
|
151
|
-
refinery/
|
151
|
+
refinery/blog/comment:
|
152
152
|
name: Име
|
153
153
|
email: Е-поща
|
154
154
|
message: Съобщение
|
155
|
-
refinery/
|
155
|
+
refinery/blog/post:
|
156
156
|
title: Заглавие
|
157
157
|
body: Съдържание
|
158
158
|
teaser: Извадка
|
data/config/locales/en.yml
CHANGED
@@ -150,17 +150,17 @@ en:
|
|
150
150
|
no_blog_articles_posted: 'There are no blog articles posted for %{date}. Stay tuned.'
|
151
151
|
activerecord:
|
152
152
|
models:
|
153
|
-
refinery/
|
154
|
-
refinery/
|
155
|
-
refinery/
|
153
|
+
refinery/blog/category: Category
|
154
|
+
refinery/blog/comment: Comment
|
155
|
+
refinery/blog/post: Blog post
|
156
156
|
attributes:
|
157
|
-
refinery/
|
157
|
+
refinery/blog/category:
|
158
158
|
title: Title
|
159
|
-
refinery/
|
159
|
+
refinery/blog/comment:
|
160
160
|
name: Name
|
161
161
|
email: Email
|
162
162
|
message: Message
|
163
|
-
refinery/
|
163
|
+
refinery/blog/post:
|
164
164
|
title: Title
|
165
165
|
body: Body
|
166
166
|
teaser: Teaser
|
data/config/locales/fr.yml
CHANGED
@@ -139,16 +139,16 @@ fr:
|
|
139
139
|
no_blog_articles_posted: "Il n'y a aucun article pour la date du %{date}. Restez en alerte."
|
140
140
|
activerecord:
|
141
141
|
models:
|
142
|
-
refinery/
|
143
|
-
refinery/
|
144
|
-
refinery/
|
142
|
+
refinery/blog/category: Categorie
|
143
|
+
refinery/blog/comment: Commentaire
|
144
|
+
refinery/blog/post: Article
|
145
145
|
attributes:
|
146
|
-
refinery/
|
146
|
+
refinery/blog/category:
|
147
147
|
title: Titre
|
148
|
-
refinery/
|
148
|
+
refinery/blog/comment:
|
149
149
|
name: Nom
|
150
150
|
email: Email
|
151
151
|
message: Message
|
152
|
-
refinery/
|
152
|
+
refinery/blog/post:
|
153
153
|
title: Titre
|
154
154
|
body: Corps
|
data/config/locales/it.yml
CHANGED
@@ -141,16 +141,16 @@ it:
|
|
141
141
|
no_blog_articles_posted: Non sono stati pubblicati articoli nel blog il %{date}. Continuate a seguirci.
|
142
142
|
activerecord:
|
143
143
|
models:
|
144
|
-
refinery/
|
145
|
-
refinery/
|
146
|
-
refinery/
|
144
|
+
refinery/blog/category: Categoria
|
145
|
+
refinery/blog/comment: Commento
|
146
|
+
refinery/blog/post: Articolo
|
147
147
|
attributes:
|
148
|
-
refinery/
|
148
|
+
refinery/blog/category:
|
149
149
|
title: Titolo
|
150
|
-
refinery/
|
150
|
+
refinery/blog/comment:
|
151
151
|
name: Nome
|
152
152
|
email: Email
|
153
153
|
message: Testo
|
154
|
-
refinery/
|
154
|
+
refinery/blog/post:
|
155
155
|
title: Titolo
|
156
156
|
body: Testo
|
data/config/locales/ja.yml
CHANGED
@@ -142,17 +142,17 @@ ja:
|
|
142
142
|
no_blog_articles_posted: '%{date}付のブログ記事が投稿されてません。'
|
143
143
|
activerecord:
|
144
144
|
models:
|
145
|
-
refinery/
|
146
|
-
refinery/
|
147
|
-
refinery/
|
145
|
+
refinery/blog/category: カテゴリ
|
146
|
+
refinery/blog/comment: コメント
|
147
|
+
refinery/blog/post: 投稿
|
148
148
|
attributes:
|
149
|
-
refinery/
|
149
|
+
refinery/blog/category:
|
150
150
|
title: 題名
|
151
|
-
refinery/
|
151
|
+
refinery/blog/comment:
|
152
152
|
name: 名前
|
153
153
|
email: メール
|
154
154
|
message: メッセージ
|
155
|
-
refinery/
|
155
|
+
refinery/blog/post:
|
156
156
|
title: 題名
|
157
157
|
body: 本文
|
158
158
|
teaser: 短紹介文
|
data/config/locales/pl.yml
CHANGED
data/config/locales/pt-BR.yml
CHANGED
data/config/locales/sk.yml
CHANGED
@@ -10,7 +10,7 @@ sk:
|
|
10
10
|
edit: Upraviť kategóriu
|
11
11
|
delete: Zmazať kategóriu
|
12
12
|
index:
|
13
|
-
no_items_yet: '
|
13
|
+
no_items_yet: 'Nie sú vytvorené žiadne kategórie. Klikni "%{create}" pre pridanie prvej.'
|
14
14
|
comments:
|
15
15
|
approved: 'Komentár od "%{author}" bol schválený.'
|
16
16
|
comment:
|
@@ -20,7 +20,7 @@ sk:
|
|
20
20
|
approve: Schváliť
|
21
21
|
rejected: 'Komentár od "%{author}" bol zamietnutý.'
|
22
22
|
index:
|
23
|
-
no_items_yet: '
|
23
|
+
no_items_yet: 'Nie sú žiadne %{type} komentáre.'
|
24
24
|
show:
|
25
25
|
comment: Komentár
|
26
26
|
blog_post: Blog článok
|
@@ -39,21 +39,31 @@ sk:
|
|
39
39
|
toggle_advanced_options: Klikni pre prístup k nastaveniam meta tagov a menu
|
40
40
|
save_as_draft: Uložiť ako koncept
|
41
41
|
published_at: Dátum publikovania
|
42
|
+
custom_url: Vlastná url
|
43
|
+
custom_url_help: Generovať url pre blog článok z tohto textu namiesto názvu blog článku.
|
44
|
+
source_url: Url adresa zdroja informácií
|
45
|
+
source_url_help: Url adresa zdroja informácií pre článok.
|
46
|
+
source_url_title: Názov zdroja informácii
|
47
|
+
source_url_title_help: Názov zdroja informácií pre zadanú url adresu zdroja informácií.
|
48
|
+
author: Autor
|
49
|
+
author_help: Vyber, ktorý používateľ bude zobrazený ako autor tohto článku.
|
50
|
+
copy_body: Skopírovať text článku do teaser.
|
51
|
+
copy_body_help: Skopíruje text článku do teaser. Nechaj teaser nevyplnený, ak chceš aby ho Refinery automaticky vygenerovalo.
|
42
52
|
index:
|
43
|
-
no_items_yet: '
|
53
|
+
no_items_yet: 'Nie sú žiadne blog články. Klikni na "%{create}" pre pridanie prvého.'
|
44
54
|
uncategorized:
|
45
|
-
no_items_yet: '
|
55
|
+
no_items_yet: 'Nie sú žiadne nezradené články.'
|
46
56
|
post:
|
47
|
-
view_live_html: 'Zobraziť
|
57
|
+
view_live_html: 'Zobraziť živý náhľad článku<br/><em>(otvorí sa v novom okne)</em>'
|
48
58
|
edit: Upraviť článok
|
49
59
|
delete: Zmazať článok
|
50
60
|
settings:
|
51
61
|
notification_recipients:
|
52
62
|
value: Poslať notifikáciu pre
|
53
|
-
explanation: 'Vždy keď niekto pridá komentár, Refinery pošle notifikáciu.'
|
54
|
-
hint: 'Vždy keď niekto pridá komentár, Refinery ti pošle notifikáciu.'
|
63
|
+
explanation: 'Vždy keď niekto pridá komentár, Refinery pošle e-mail notifikáciu.'
|
64
|
+
hint: 'Vždy keď niekto pridá komentár, Refinery ti pošle e-mail notifikáciu.'
|
55
65
|
example: "Zadaj tvoju emailovú adresu(y) ako napríklad: jack@work.com, jill@office.com"
|
56
|
-
updated: 'Zoznam príjemcov
|
66
|
+
updated: 'Zoznam príjemcov notifikácií: "%{recipients}"'
|
57
67
|
submenu:
|
58
68
|
categories:
|
59
69
|
title: Kategórie
|
@@ -61,7 +71,7 @@ sk:
|
|
61
71
|
new: Nová kategória
|
62
72
|
comments:
|
63
73
|
title: Komentáre
|
64
|
-
title_with_count: 'Komentáre (%{new_count} nových
|
74
|
+
title_with_count: 'Komentáre (%{new_count})' #TODO 0 nových, 1 nový, 2-4 nové, >= 5 nových
|
65
75
|
new: Nový
|
66
76
|
unmoderated: Nový
|
67
77
|
approved: Schválený
|
@@ -70,12 +80,13 @@ sk:
|
|
70
80
|
title: Články
|
71
81
|
manage: Spravovať články
|
72
82
|
new: Vytvoriť nový článok
|
73
|
-
uncategorized:
|
83
|
+
uncategorized: Nezaradené články
|
74
84
|
settings:
|
75
85
|
title: Nastavenia
|
76
86
|
moderation: Moderovanie
|
77
87
|
update_notified: Upraviť zoznam notifikovaných
|
78
88
|
comments: Komentáre
|
89
|
+
teasers: Teasers
|
79
90
|
comment_mailer:
|
80
91
|
notification:
|
81
92
|
greeting: Ahoj
|
@@ -99,30 +110,60 @@ sk:
|
|
99
110
|
read_more: Celý článok
|
100
111
|
comments:
|
101
112
|
singular: komentár
|
102
|
-
|
113
|
+
one: '%{count} komentár'
|
114
|
+
few: '%{count} komentáre'
|
115
|
+
other: '%{count} komentárov'
|
116
|
+
none: Nie sú tu žiadne komentáre
|
103
117
|
archives: Archív
|
118
|
+
tags:
|
119
|
+
title: Tagy
|
104
120
|
categories:
|
105
121
|
show:
|
106
|
-
no_posts:
|
122
|
+
no_posts: Momentálne tu nie sú žiadne články.
|
107
123
|
posts:
|
108
124
|
post:
|
109
|
-
filed_in:
|
125
|
+
filed_in: Zaradené do
|
110
126
|
comment: komentár
|
111
127
|
comments:
|
112
128
|
by: 'Odoslal %{who}'
|
113
|
-
time_ago: '%{time}
|
129
|
+
time_ago: '%{time} spáť'
|
114
130
|
thank_you: 'Vďaka za komentár.'
|
115
|
-
thank_you_moderated: 'Ďakujeme za Váš komentár. Vaša správa čaká na schválenie a
|
131
|
+
thank_you_moderated: 'Ďakujeme za Váš komentár. Vaša správa čaká na schválenie a čoskoro sa objaví.'
|
116
132
|
index:
|
117
|
-
no_blog_articles_yet:
|
133
|
+
no_blog_articles_yet: Zatiaľ nie sú v blogu žiadne články. Zostaňte naladení.
|
118
134
|
show:
|
119
135
|
blog_home: Hlavná stránka blogu
|
120
136
|
comments:
|
121
137
|
title: Komentáre
|
122
138
|
add: Pridať komentár
|
123
139
|
other: Ďalšie články
|
124
|
-
filed_in:
|
140
|
+
filed_in: Zaradené do
|
125
141
|
submit: Odoslať komentár
|
142
|
+
name: Meno
|
143
|
+
email: E-mail
|
144
|
+
message: Správa
|
145
|
+
by: Od
|
146
|
+
source: Zdroj
|
147
|
+
tagged:
|
148
|
+
no_blog_articles_yet: 'Zatiaľ nie sú v blogu žiadne články. Zostaňte naladení.'
|
149
|
+
posts_tagged: Príspevky pre tag
|
126
150
|
archive:
|
127
151
|
blog_archive_for: 'Blog archív pre %{date}'
|
128
|
-
no_blog_articles_posted: '
|
152
|
+
no_blog_articles_posted: 'Nie sú žiadne články publikované %{date}. Zostaňte naladení.'
|
153
|
+
activerecord:
|
154
|
+
models:
|
155
|
+
refinery/blog/category: Kategória
|
156
|
+
refinery/blog/comment: Komentár
|
157
|
+
refinery/blog/post: Blog článok
|
158
|
+
attributes:
|
159
|
+
refinery/blog/category:
|
160
|
+
title: Názov
|
161
|
+
refinery/blog/comment:
|
162
|
+
name: Meno
|
163
|
+
email: E-mail
|
164
|
+
message: Správa
|
165
|
+
refinery/blog/post:
|
166
|
+
title: Názov
|
167
|
+
body: Text
|
168
|
+
teaser: Teaser
|
169
|
+
|
@@ -0,0 +1,167 @@
|
|
1
|
+
sv:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinerycms_blog:
|
5
|
+
title: Blogg
|
6
|
+
blog:
|
7
|
+
admin:
|
8
|
+
categories:
|
9
|
+
category:
|
10
|
+
edit: Editera kategori
|
11
|
+
delete: Radera kategori
|
12
|
+
index:
|
13
|
+
no_items_yet: 'Det finns inga kategorier än. Klicka på "%{create}" för att lägga till den första kategorin.'
|
14
|
+
comments:
|
15
|
+
approved: 'Kommentaren från "%{author}" Har godkänts.'
|
16
|
+
comment:
|
17
|
+
view_live_html: 'Visa kommentaren på webbplatsen. <br/><em>(öppnas i ett nytt fönster)</em>'
|
18
|
+
read: Läs denna kommentar
|
19
|
+
reject: Avslå kommentar
|
20
|
+
approve: Godkänn kommentar
|
21
|
+
rejected: 'Kommentaren från "%{author}" har avslagits.'
|
22
|
+
index:
|
23
|
+
no_items_yet: 'Det finns inga %{type} kommentarer.'
|
24
|
+
show:
|
25
|
+
comment: Kommentar
|
26
|
+
blog_post: Blogg post
|
27
|
+
from: Postat av
|
28
|
+
date: Postat
|
29
|
+
message: Kommentar
|
30
|
+
details: Detaljer
|
31
|
+
age: Ålder
|
32
|
+
actions: Actions
|
33
|
+
back: Tillbaka till alla kommentarer
|
34
|
+
reject: Avslå denna kommentar
|
35
|
+
approve: Godkänn denna kommentar
|
36
|
+
posts:
|
37
|
+
form:
|
38
|
+
advanced_options: Avancerat
|
39
|
+
toggle_advanced_options: Klicka för att ställa in metataggar och menyinställningar
|
40
|
+
save_as_draft: Spara som utkast
|
41
|
+
published_at: Publiceringsdatum
|
42
|
+
custom_url: Anpassad URL
|
43
|
+
custom_url_help: Skapa URL för bloggposten med denna text istället för ttieln
|
44
|
+
source_url: Källans URL
|
45
|
+
source_url_help: Sparar URL för postens källa
|
46
|
+
source_url_title: Källhänvisning (titel)
|
47
|
+
source_url_title_help: Källhänvisning för posten (URL).
|
48
|
+
author: Författare
|
49
|
+
author_help: Ställ in författare för denna post.
|
50
|
+
copy_body: Kopiera innehåll i posten till en teaser.
|
51
|
+
copy_body_help: Kopierar inneållet i posten till en teaser, lämna tom om du vill att det ska ske automatiskt.
|
52
|
+
index:
|
53
|
+
no_items_yet: 'Det finns inga poster än. Klicka "%{create}" för att lägga till din första post.'
|
54
|
+
uncategorized:
|
55
|
+
no_items_yet: 'Det finns inga okategoriserade poster.'
|
56
|
+
post:
|
57
|
+
view_live_html: 'Visa denna post i en webbläsare <br/><em>(öppnas i ett nytt fönster)</em>'
|
58
|
+
edit: Redigera denna bloggpost
|
59
|
+
delete: Ta bort denna bloggpost
|
60
|
+
draft: Utkast
|
61
|
+
settings:
|
62
|
+
notification_recipients:
|
63
|
+
value: Skicka notis till
|
64
|
+
explanation: 'Varje gång någon kommenterar på en post, skickas ett mail om kommentaren.'
|
65
|
+
hint: 'När en kommentar läggs till, så skickar vi en notis till dig.'
|
66
|
+
example: "Lägg till epostadress(er) i detta format: kalle@home.se, pelle@work.com"
|
67
|
+
updated: 'Notiser har blivit skickade till: "%{recipients}"'
|
68
|
+
submenu:
|
69
|
+
categories:
|
70
|
+
title: Kategorier
|
71
|
+
manage: Hantera
|
72
|
+
new: Skapa ny kategori
|
73
|
+
comments:
|
74
|
+
title: Kommentarer
|
75
|
+
title_with_count: 'Det finns (%{new_count} nya kommentarer)'
|
76
|
+
new: Ny
|
77
|
+
unmoderated: Ny
|
78
|
+
approved: Godkänd
|
79
|
+
rejected: Avslagen
|
80
|
+
posts:
|
81
|
+
title: Poster
|
82
|
+
manage: Hantera poster
|
83
|
+
new: Skapa ny post
|
84
|
+
uncategorized: Okategoriserade poster
|
85
|
+
settings:
|
86
|
+
title: Inställningar
|
87
|
+
moderation: Moderering
|
88
|
+
update_notified: Uppdarea vilka som får notiser
|
89
|
+
comments: Kommentarer
|
90
|
+
teasers: Teasers
|
91
|
+
comment_mailer:
|
92
|
+
notification:
|
93
|
+
greeting: Hej!
|
94
|
+
you_recieved_new_comment: Du har fått en ny kommentar på bloggenYou just received a new comment on your website.
|
95
|
+
comment_starts: --- kommentar ---
|
96
|
+
comment_ends: --- // kommentar ---
|
97
|
+
from: Från
|
98
|
+
email: E-post
|
99
|
+
message: Meddelande
|
100
|
+
closing_line: Vänliga hälsningar
|
101
|
+
ps: 'P.S. Alla dina kommentarer finns lagrade i bloggsektionen av ditt CMS i undermenyn kommentarer, om du vill se dem senare.'
|
102
|
+
shared:
|
103
|
+
categories:
|
104
|
+
title: Kategorier
|
105
|
+
rss_feed:
|
106
|
+
title: RSS
|
107
|
+
subscribe: Prenumerera
|
108
|
+
posts:
|
109
|
+
other: Övriga poster
|
110
|
+
created_at: 'Postat den %{when}'
|
111
|
+
read_more: Läs mer
|
112
|
+
comments:
|
113
|
+
singular: Kommentar
|
114
|
+
none: Inga kommentarer
|
115
|
+
archives: Arkiv
|
116
|
+
tags:
|
117
|
+
title: "Taggar"
|
118
|
+
categories:
|
119
|
+
show:
|
120
|
+
no_posts: Det finns inga poster än.
|
121
|
+
posts:
|
122
|
+
post:
|
123
|
+
filed_in: Kategoriserat som
|
124
|
+
comment: kommentar
|
125
|
+
comments:
|
126
|
+
by: 'Postad av %{who}'
|
127
|
+
time_ago: 'för %{time} sedan'
|
128
|
+
thank_you: 'Tack för din kommentar.'
|
129
|
+
thank_you_moderated: 'Tack för din kommentar. Ditt meddelande har placerats i modereringskön och kommer snart att bli publicerat.'
|
130
|
+
index:
|
131
|
+
no_blog_articles_yet: Det finns inga bloggposter än.
|
132
|
+
show:
|
133
|
+
blog_home: Blogg hem
|
134
|
+
comments:
|
135
|
+
title: Kommentarer
|
136
|
+
add: Kommentera
|
137
|
+
other: Andra bloggposter
|
138
|
+
filed_in: Kategoriserat i
|
139
|
+
tagged: Taggar
|
140
|
+
submit: Skicka kommentar
|
141
|
+
name: Namn
|
142
|
+
email: E-post
|
143
|
+
message: Meddelande
|
144
|
+
by: av
|
145
|
+
source: Källa
|
146
|
+
tagged:
|
147
|
+
no_blog_articles_yet: Det finns inga bloggposter än.
|
148
|
+
posts_tagged: Poster taggade med
|
149
|
+
archive:
|
150
|
+
blog_archive_for: 'Arkiv för %{date}'
|
151
|
+
no_blog_articles_posted: 'Det finns inga artiklar för %{date}.'
|
152
|
+
activerecord:
|
153
|
+
models:
|
154
|
+
refinery/blog/category: Kategori
|
155
|
+
refinery/blog/comment: Kommentarer
|
156
|
+
refinery/blog/post: Bloggposter
|
157
|
+
attributes:
|
158
|
+
refinery/blog/category:
|
159
|
+
title: Titel
|
160
|
+
refinery/blog/comment:
|
161
|
+
name: Namn
|
162
|
+
email: E-post
|
163
|
+
message: Meddelande
|
164
|
+
refinery/blog/post:
|
165
|
+
title: Titel
|
166
|
+
body: Innehåll
|
167
|
+
teaser: Teaser
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Refinery::Core::Engine.routes.draw do
|
2
|
-
namespace :blog do
|
2
|
+
namespace :blog, :path => Refinery::Blog.page_url do
|
3
3
|
root :to => "posts#index"
|
4
4
|
resources :posts, :only => [:show]
|
5
5
|
|
@@ -12,7 +12,7 @@ Refinery::Core::Engine.routes.draw do
|
|
12
12
|
|
13
13
|
namespace :blog, :path => '' do
|
14
14
|
namespace :admin, :path => 'refinery' do
|
15
|
-
scope :path =>
|
15
|
+
scope :path => Refinery::Blog.page_url do
|
16
16
|
root :to => "posts#index"
|
17
17
|
|
18
18
|
resources :posts do
|
@@ -45,7 +45,7 @@ class CreateBlogStructure < ActiveRecord::Migration
|
|
45
45
|
|
46
46
|
drop_table Refinery::Blog::Post.table_name
|
47
47
|
drop_table Refinery::Blog::Comment.table_name
|
48
|
-
drop_table Refinery::Category.table_name
|
48
|
+
drop_table Refinery::Blog::Category.table_name
|
49
49
|
drop_table Refinery::Categorization.table_name
|
50
50
|
end
|
51
51
|
|
@@ -3,12 +3,13 @@ module Refinery
|
|
3
3
|
include ActiveSupport::Configurable
|
4
4
|
|
5
5
|
config_accessor :validate_source_url, :comments_per_page, :posts_per_page,
|
6
|
-
:post_teaser_length, :share_this_key
|
6
|
+
:post_teaser_length, :share_this_key, :page_url
|
7
7
|
|
8
8
|
self.validate_source_url = false
|
9
9
|
self.comments_per_page = 10
|
10
10
|
self.posts_per_page = 10
|
11
11
|
self.post_teaser_length = 250
|
12
12
|
self.share_this_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
13
|
+
self.page_url = "/blog"
|
13
14
|
end
|
14
15
|
end
|
data/readme.md
CHANGED
@@ -52,3 +52,14 @@ Run the test suite with [Guard](https://github.com/guard/guard)
|
|
52
52
|
Or just with rake spec
|
53
53
|
|
54
54
|
$ bundle exec rake spec
|
55
|
+
|
56
|
+
## Additional Features
|
57
|
+
* To limit rss feed length, use the 'max_results' parameter
|
58
|
+
|
59
|
+
http://test.host/blog/feed.rss?max_results=10
|
60
|
+
|
61
|
+
## More Information
|
62
|
+
* Check out our [Website](http://refinerycms.com/)
|
63
|
+
* Documentation is available in the [guides](http://refinerycms.com/guides)
|
64
|
+
* Questions can be asked on our [Google Group](http://group.refinerycms.org)
|
65
|
+
* Questions can also be asked in our IRC room, [#refinerycms on freenode](irc://irc.freenode.net/refinerycms)
|
data/refinerycms-blog.gemspec
CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.homepage = %q{http://refinerycms.com/blog}
|
14
14
|
s.authors = ['Resolve Digital', 'Neoteric Design']
|
15
15
|
s.require_paths = %w(lib)
|
16
|
+
s.licenses = %q{MIT}
|
16
17
|
|
17
18
|
s.files = `git ls-files`.split("\n")
|
18
19
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
@@ -27,4 +28,4 @@ Gem::Specification.new do |s|
|
|
27
28
|
|
28
29
|
# Development dependencies
|
29
30
|
s.add_development_dependency 'refinerycms-testing', '~> 2.0.0'
|
30
|
-
end
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
module Blog
|
5
|
+
describe PostsController do
|
6
|
+
login_refinery_user
|
7
|
+
|
8
|
+
before do
|
9
|
+
FactoryGirl.create(:blog_post, :title => "blogpost_one")
|
10
|
+
FactoryGirl.create(:blog_post, :title => "blogpost_two")
|
11
|
+
FactoryGirl.create(:blog_post, :title => "blogpost_three")
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should not limit rss feed" do
|
15
|
+
get :index, :format => :rss
|
16
|
+
assigns[:posts].size.should == 3
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should limit rss feed" do
|
20
|
+
get :index, :format => :rss, :max_results => 2
|
21
|
+
assigns[:posts].count.should == 2
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Resolve Digital
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2013-07-26 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: refinerycms-core
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: refinerycms-settings
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,7 +42,6 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: filters_spam
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
46
|
- - ~>
|
53
47
|
- !ruby/object:Gem::Version
|
@@ -55,7 +49,6 @@ dependencies:
|
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
@@ -63,23 +56,20 @@ dependencies:
|
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: acts-as-taggable-on
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - '>='
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '0'
|
71
63
|
type: :runtime
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - '>='
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '0'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: seo_meta
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
74
|
- - ~>
|
85
75
|
- !ruby/object:Gem::Version
|
@@ -87,7 +77,6 @@ dependencies:
|
|
87
77
|
type: :runtime
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
81
|
- - ~>
|
93
82
|
- !ruby/object:Gem::Version
|
@@ -95,23 +84,20 @@ dependencies:
|
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: rails_autolink
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- -
|
88
|
+
- - '>='
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: '0'
|
103
91
|
type: :runtime
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - '>='
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: '0'
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: refinerycms-testing
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
102
|
- - ~>
|
117
103
|
- !ruby/object:Gem::Version
|
@@ -119,7 +105,6 @@ dependencies:
|
|
119
105
|
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
109
|
- - ~>
|
125
110
|
- !ruby/object:Gem::Version
|
@@ -188,10 +173,8 @@ files:
|
|
188
173
|
- app/models/.gitkeep
|
189
174
|
- app/models/refinery/blog/category.rb
|
190
175
|
- app/models/refinery/blog/comment.rb
|
191
|
-
- app/models/refinery/blog/comment_mailer.rb
|
192
176
|
- app/models/refinery/blog/post.rb
|
193
177
|
- app/models/refinery/categorization.rb
|
194
|
-
- app/sweepers/refinery/blog_sweeper.rb
|
195
178
|
- app/views/.gitkeep
|
196
179
|
- app/views/refinery/blog/admin/_submenu.html.erb
|
197
180
|
- app/views/refinery/blog/admin/categories/_category.html.erb
|
@@ -202,6 +185,7 @@ files:
|
|
202
185
|
- app/views/refinery/blog/admin/categories/new.html.erb
|
203
186
|
- app/views/refinery/blog/admin/comments/_comment.html.erb
|
204
187
|
- app/views/refinery/blog/admin/comments/_sortable_list.html.erb
|
188
|
+
- app/views/refinery/blog/admin/comments/approve.html.erb
|
205
189
|
- app/views/refinery/blog/admin/comments/index.html.erb
|
206
190
|
- app/views/refinery/blog/admin/comments/show.html.erb
|
207
191
|
- app/views/refinery/blog/admin/posts/_form.html.erb
|
@@ -249,6 +233,7 @@ files:
|
|
249
233
|
- config/locales/pt-BR.yml
|
250
234
|
- config/locales/ru.yml
|
251
235
|
- config/locales/sk.yml
|
236
|
+
- config/locales/sv.yml
|
252
237
|
- config/locales/zh-CN.yml
|
253
238
|
- config/routes.rb
|
254
239
|
- db/migrate/20110803223522_create_blog_structure.rb
|
@@ -273,6 +258,7 @@ files:
|
|
273
258
|
- readme.md
|
274
259
|
- refinerycms-blog.gemspec
|
275
260
|
- script/rails
|
261
|
+
- spec/controllers/refinery/blog/posts_controller_spec.rb
|
276
262
|
- spec/factories/blog_categories.rb
|
277
263
|
- spec/factories/blog_comments.rb
|
278
264
|
- spec/factories/blog_posts.rb
|
@@ -291,30 +277,31 @@ files:
|
|
291
277
|
- tasks/rspec.rake
|
292
278
|
- todo.md
|
293
279
|
homepage: http://refinerycms.com/blog
|
294
|
-
licenses:
|
280
|
+
licenses:
|
281
|
+
- MIT
|
282
|
+
metadata: {}
|
295
283
|
post_install_message:
|
296
284
|
rdoc_options: []
|
297
285
|
require_paths:
|
298
286
|
- lib
|
299
287
|
required_ruby_version: !ruby/object:Gem::Requirement
|
300
|
-
none: false
|
301
288
|
requirements:
|
302
|
-
- -
|
289
|
+
- - '>='
|
303
290
|
- !ruby/object:Gem::Version
|
304
291
|
version: '0'
|
305
292
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
306
|
-
none: false
|
307
293
|
requirements:
|
308
|
-
- -
|
294
|
+
- - '>='
|
309
295
|
- !ruby/object:Gem::Version
|
310
296
|
version: '0'
|
311
297
|
requirements: []
|
312
298
|
rubyforge_project:
|
313
|
-
rubygems_version:
|
299
|
+
rubygems_version: 2.0.3
|
314
300
|
signing_key:
|
315
|
-
specification_version:
|
301
|
+
specification_version: 4
|
316
302
|
summary: Ruby on Rails blogging engine for Refinery CMS.
|
317
303
|
test_files:
|
304
|
+
- spec/controllers/refinery/blog/posts_controller_spec.rb
|
318
305
|
- spec/factories/blog_categories.rb
|
319
306
|
- spec/factories/blog_comments.rb
|
320
307
|
- spec/factories/blog_posts.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
require File.expand_path('../../../../mailers/refinery/blog/comment_mailer', __FILE__)
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Refinery
|
2
|
-
class BlogSweeper < ActionController::Caching::Sweeper
|
3
|
-
observe Blog::Post, Blog::Comment
|
4
|
-
|
5
|
-
def after_create(record)
|
6
|
-
expire_cache_for(record)
|
7
|
-
end
|
8
|
-
|
9
|
-
def after_update(record)
|
10
|
-
expire_cache_for(record)
|
11
|
-
end
|
12
|
-
|
13
|
-
def after_destroy(record)
|
14
|
-
expire_cache_for(record)
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def expire_cache_for(record)
|
20
|
-
# TODO: Convert these to url helpers
|
21
|
-
expire_page '/blog'
|
22
|
-
expire_page '/blog/feed.rss'
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|