refinerycms-blog 1.3.1 → 1.3.2

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.
@@ -3,10 +3,12 @@
3
3
  <% if searching? %>
4
4
  <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
5
5
  <% if @blog_posts.any? %>
6
- <%= render :partial => "blog_posts",
6
+ <ul>
7
+ <%= render :partial => "post",
7
8
  :collection => @blog_posts %>
9
+ </ul>
8
10
  <% else %>
9
- <p><%= t('admin.search_no_results') %></p>
11
+ <p><%= t('shared.admin.search.no_results') %></p>
10
12
  <% end %>
11
13
  <% else %>
12
14
  <% if @blog_posts.any? %>
@@ -24,17 +24,16 @@
24
24
  <footer>
25
25
  <p>
26
26
  <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
27
-
28
- <aside class='comment_count'>
29
- <% if BlogPost.comments_allowed? %>
30
- <% if post.comments.any? %>
31
- (<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
32
- <% else %>
33
- (<%= t('blog.shared.comments.none') %>)
34
- <% end %>
35
- <% end %>
36
- </aside>
37
27
  </p>
28
+ <aside class='comment_count'>
29
+ <% if BlogPost.comments_allowed? %>
30
+ <% if post.comments.any? %>
31
+ (<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
32
+ <% else %>
33
+ (<%= t('blog.shared.comments.none') %>)
34
+ <% end %>
35
+ <% end %>
36
+ </aside>
38
37
  </footer>
39
38
  </article>
40
39
  <% end %>
data/changelog.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 1.4 [UNRELEASED]
2
+
3
+ * Spanish language fixes [scambra](https://github.com/scambra)
4
+ * Bug fixes [scambra](https://github.com/scambra)
5
+ * [See full list](https://github.com/resolve/refinerycms-blog/compare/1.3...1.4)
6
+
7
+ ## 1.3 [03 March 2011]
8
+
9
+ * Moved to EngineInstaller [parndt](https://github.com/parndt)
10
+ * Off Rails 2 support [parndt](https://github.com/parndt)
11
+ * [See full list](https://github.com/resolve/refinerycms-blog/compare/1.2...1.3)
12
+
1
13
  ## 1.2 [01 March 2011]
2
14
 
3
15
  * Posts can be authored [joemsak](https://github.com/joemsak)
@@ -40,6 +40,8 @@ es:
40
40
  published_at: Fecha de publicación
41
41
  index:
42
42
  no_items_yet: 'Aún no hay entradas en el Blog. Haz click en "%{create}" para añadir el primero'
43
+ uncategorized:
44
+ no_items_yet: 'No hay entradas en el Blog sin categoría.'
43
45
  post:
44
46
  view_live_html: 'Ver entrada <br/><em>(se abrirá en una ventana nueva)</em>'
45
47
  edit: Editar esta entrada
@@ -67,6 +69,7 @@ es:
67
69
  title: Entradas
68
70
  manage: Gestionar entradas
69
71
  new: Crear nueva entrada
72
+ uncategorized: Entradas sin categoría
70
73
  settings:
71
74
  title: Configuración
72
75
  moderation: Moderación
@@ -97,10 +100,13 @@ es:
97
100
  comments:
98
101
  singular: comentario
99
102
  none: no hay comentarios
103
+ archives: Archivos
100
104
  categories:
101
105
  show:
102
106
  no_posts: Todavía no hay entradas.
103
107
  posts:
108
+ post:
109
+ filed_in: Archivado en
104
110
  comment: comentario
105
111
  comments:
106
112
  by: 'Enviado por %{who}'
@@ -115,7 +121,7 @@ es:
115
121
  title: Comentarios
116
122
  add: 'Envía tu comentario'
117
123
  other: Otros posts
118
- filed_in: 'Envía en'
124
+ filed_in: Archivado en
119
125
  submit: Enviar comentario
120
126
  archive:
121
127
  blog_archive_for: 'Archivo del blog en %{date}'
@@ -38,7 +38,7 @@ module Refinery
38
38
 
39
39
  class << self
40
40
  def version
41
- %q{1.3.1}
41
+ %q{1.3.2}
42
42
  end
43
43
  end
44
44
  end
@@ -17,7 +17,7 @@ describe BlogPost do
17
17
  end
18
18
 
19
19
  it "requires body" do
20
- BlogPost.new(@attr.merge(:body => "")).should_not be_valid
20
+ BlogPost.new(@attr.merge(:body => nil)).should_not be_valid
21
21
  end
22
22
  end
23
23
 
@@ -55,8 +55,8 @@ describe BlogPost do
55
55
 
56
56
  describe "by_archive scope" do
57
57
  it "returns all posts from specified month" do
58
- blog_post1 = Factory(:post, :published_at => Time.now - 2.minutes)
59
- blog_post2 = Factory(:post, :published_at => Time.now - 1.minute)
58
+ blog_post1 = Factory(:post, :published_at => Time.now.advance(:minutes => -2))
59
+ blog_post2 = Factory(:post, :published_at => Time.now.advance(:minutes => -1))
60
60
  Factory(:post, :published_at => Time.now - 2.months)
61
61
  date = "#{Time.now.month}/#{Time.now.year}"
62
62
  BlogPost.by_archive(Time.parse(date)).count.should == 2
@@ -66,8 +66,8 @@ describe BlogPost do
66
66
 
67
67
  describe "all_previous scope" do
68
68
  it "returns all posts from previous months" do
69
- blog_post1 = Factory(:post, :published_at => Time.now - 1.month)
70
- blog_post2 = Factory(:post, :published_at => Time.now - 1.month)
69
+ blog_post1 = Factory(:post, :published_at => Time.now.advance(:months => -2))
70
+ blog_post2 = Factory(:post, :published_at => Time.now.advance(:months => -1))
71
71
  Factory(:post, :published_at => Time.now)
72
72
  BlogPost.all_previous.count.should == 2
73
73
  BlogPost.all_previous.should == [blog_post2, blog_post1]
@@ -76,8 +76,8 @@ describe BlogPost do
76
76
 
77
77
  describe "live scope" do
78
78
  it "returns all posts which aren't in draft and pub date isn't in future" do
79
- blog_post1 = Factory(:post, :published_at => Time.now - 2.minutes)
80
- blog_post2 = Factory(:post, :published_at => Time.now - 1.minute)
79
+ blog_post1 = Factory(:post, :published_at => Time.now.advance(:minutes => -2))
80
+ blog_post2 = Factory(:post, :published_at => Time.now.advance(:minutes => -1))
81
81
  Factory(:post, :draft => true)
82
82
  Factory(:post, :published_at => Time.now + 1.minute)
83
83
  BlogPost.live.count.should == 2
@@ -87,16 +87,16 @@ describe BlogPost do
87
87
 
88
88
  describe "next scope" do
89
89
  it "returns next article based on given article" do
90
- blog_post1 = Factory(:post)
91
- blog_post2 = Factory(:post, :published_at => Time.now + 1.minute)
90
+ blog_post1 = Factory(:post, :published_at => Time.now.advance(:minutes => -1))
91
+ blog_post2 = Factory(:post)
92
92
  BlogPost.next(blog_post1).should == [blog_post2]
93
93
  end
94
94
  end
95
95
 
96
96
  describe "previous scope" do
97
97
  it "returns previous article based on given article" do
98
- blog_post1 = Factory(:post)
99
- blog_post2 = Factory(:post, :published_at => Time.now + 1.minute)
98
+ blog_post1 = Factory(:post, :published_at => Time.now.advance(:minutes => -1))
99
+ blog_post2 = Factory(:post)
100
100
  BlogPost.previous(blog_post2).should == [blog_post1]
101
101
  end
102
102
  end
@@ -123,14 +123,14 @@ describe BlogPost do
123
123
  end
124
124
 
125
125
  it "returns false if post pub date is in future" do
126
- Factory(:post, :published_at => Time.now + 1.minute).live?.should be_false
126
+ Factory(:post, :published_at => Time.now.advance(:minutes => 1)).live?.should be_false
127
127
  end
128
128
  end
129
129
 
130
130
  describe "#next" do
131
131
  it "returns next article when called on current article" do
132
- Factory(:post)
133
- blog_post = Factory(:post, :published_at => Time.now + 1.minute)
132
+ Factory(:post, :published_at => Time.now.advance(:minutes => -1))
133
+ blog_post = Factory(:post)
134
134
  blog_posts = BlogPost.all
135
135
  blog_posts.last.next.should == blog_post
136
136
  end
@@ -139,7 +139,7 @@ describe BlogPost do
139
139
  describe "#prev" do
140
140
  it "returns previous article when called on current article" do
141
141
  Factory(:post)
142
- blog_post = Factory(:post, :published_at => Time.now - 1.minute)
142
+ blog_post = Factory(:post, :published_at => Time.now.advance(:minutes => -1))
143
143
  blog_posts = BlogPost.all
144
144
  blog_posts.first.prev.should == blog_post
145
145
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: refinerycms-blog
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.1
5
+ version: 1.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Resolve Digital
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-03-04 00:00:00 +13:00
14
+ date: 2011-03-09 00:00:00 +13:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements: []
164
164
 
165
165
  rubyforge_project:
166
- rubygems_version: 1.6.0
166
+ rubygems_version: 1.6.1
167
167
  signing_key:
168
168
  specification_version: 3
169
169
  summary: Ruby on Rails blogging engine for RefineryCMS.