rollin 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rollin/blog.rb +1 -1
- data/spec/blog_spec.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ade074bbfd7d18abfa9bca1ef589d5f3b56a099
|
4
|
+
data.tar.gz: c336bc00ea0c729578e6a448a2074b3843f88a57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd4e082b2aa1628ae152ca37e0f31eca19f0dd3aef2dceac5e7e7918e180097bd4e2e47732b9958484a8c1576e05438a90999e1f69dcc183d99f89d33adb400
|
7
|
+
data.tar.gz: 68b8e9837ae7cb3fbd36d32cd4498c8529019069ca2a4bb2fd274be552114d8688c4250cc75f4f0002787c2e4034f0b505a1eab804374e610676a1f66506adc2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.16
|
data/lib/rollin/blog.rb
CHANGED
@@ -23,7 +23,7 @@ class Rollin::Blog
|
|
23
23
|
articles.map { |article| [article.year, article.month] }.uniq.map do |year_and_month|
|
24
24
|
year = year_and_month[0]
|
25
25
|
month = year_and_month[1]
|
26
|
-
articles_for_month = articles.
|
26
|
+
articles_for_month = articles.select { |anArticle| anArticle.year == year && anArticle.month == month }
|
27
27
|
Rollin::MonthArchive.new(year, month, articles_for_month)
|
28
28
|
end
|
29
29
|
end
|
data/spec/blog_spec.rb
CHANGED
@@ -18,6 +18,8 @@ describe Rollin::Blog do
|
|
18
18
|
blog.annual_archive.first.class.should == Rollin::YearArchive
|
19
19
|
blog.annual_archive.first.monthly_archive.size.should == 2
|
20
20
|
blog.annual_archive.first.monthly_archive.first.class.should == Rollin::MonthArchive
|
21
|
+
blog.annual_archive.first.monthly_archive.first.articles.size.should == 2
|
22
|
+
blog.annual_archive.first.monthly_archive.first.articles.first.class.should == Rollin::Article
|
21
23
|
end
|
22
24
|
|
23
25
|
it 'finds article by its id' do
|