rollin 0.0.14 → 0.0.15
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rollin/blog.rb +1 -1
- data/spec/{year_archive_spec.rb → annual_archive_spec.rb} +3 -0
- data/spec/blog_spec.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 915028b417ac0cde877d13e9dc3616e610c75cc3
|
4
|
+
data.tar.gz: 1cad07b4059627ac55afbbcb37c6c0816c27142c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbf794ea96230944084ce42c80ab310f079c0b4cab09aa067534483c5a0e734fade188cd7c8ffd463ab5b487ba7917f6571e9fe3c786887c230d9b7eb1db8201
|
7
|
+
data.tar.gz: 9bab956bfb6bd9e0f9a35ed8c709352754f002322ebcd807db6af974558e5a178e744590316d8fc0da26962f9d5c9a8ead5e36329279f04f847a611d3ff9e218
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.15
|
data/lib/rollin/blog.rb
CHANGED
@@ -15,7 +15,7 @@ class Rollin::Blog
|
|
15
15
|
|
16
16
|
def annual_archive
|
17
17
|
monthly_archive.map { |month_archive| month_archive.year }.uniq.map do |year|
|
18
|
-
Rollin::YearArchive.new(year, monthly_archive.
|
18
|
+
Rollin::YearArchive.new(year, monthly_archive.select { |aMonth| aMonth.year == year })
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
1
3
|
describe Rollin::YearArchive do
|
2
4
|
let (:article) { Rollin::Article.new('spec/fixtures/2013_05_01_My_first_post.mk') }
|
3
5
|
subject (:month_archive) { Rollin::MonthArchive.new(2013, 05, [ article ]) }
|
@@ -9,6 +11,7 @@ describe Rollin::YearArchive do
|
|
9
11
|
|
10
12
|
it 'has monthly archives' do
|
11
13
|
year_archive.monthly_archive.size.should == 1
|
14
|
+
year_archive.monthly_archive.first.should == month_archive
|
12
15
|
end
|
13
16
|
|
14
17
|
it 'has a list of articles' do
|
data/spec/blog_spec.rb
CHANGED
@@ -8,12 +8,16 @@ describe Rollin::Blog do
|
|
8
8
|
blog.articles.size.should == 4
|
9
9
|
end
|
10
10
|
|
11
|
-
it 'has
|
11
|
+
it 'has monthly archives' do
|
12
12
|
blog.monthly_archive.size.should == 3
|
13
|
+
blog.monthly_archive.first.class.should == Rollin::MonthArchive
|
13
14
|
end
|
14
15
|
|
15
|
-
it 'has
|
16
|
+
it 'has annual archives' do
|
16
17
|
blog.annual_archive.size.should == 2
|
18
|
+
blog.annual_archive.first.class.should == Rollin::YearArchive
|
19
|
+
blog.annual_archive.first.monthly_archive.size.should == 2
|
20
|
+
blog.annual_archive.first.monthly_archive.first.class.should == Rollin::MonthArchive
|
17
21
|
end
|
18
22
|
|
19
23
|
it 'finds article by its id' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- marano
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- lib/rollin/version.rb
|
103
103
|
- lib/rollin/year_archive.rb
|
104
104
|
- rollin.gemspec
|
105
|
+
- spec/annual_archive_spec.rb
|
105
106
|
- spec/article_spec.rb
|
106
107
|
- spec/blog_spec.rb
|
107
108
|
- spec/fixtures/articles/2013_05_01_My_first_post.mk
|
@@ -110,7 +111,6 @@ files:
|
|
110
111
|
- spec/fixtures/articles/2014_01_01_My_fourth_post.mk
|
111
112
|
- spec/month_archive_spec.rb
|
112
113
|
- spec/spec_helper.rb
|
113
|
-
- spec/year_archive_spec.rb
|
114
114
|
homepage: http://github.com/marano/rollin
|
115
115
|
licenses:
|
116
116
|
- MIT
|
@@ -136,6 +136,7 @@ signing_key:
|
|
136
136
|
specification_version: 4
|
137
137
|
summary: A Ruby minimalistic blog engine ... WATTT!!?!??
|
138
138
|
test_files:
|
139
|
+
- spec/annual_archive_spec.rb
|
139
140
|
- spec/article_spec.rb
|
140
141
|
- spec/blog_spec.rb
|
141
142
|
- spec/fixtures/articles/2013_05_01_My_first_post.mk
|
@@ -144,4 +145,3 @@ test_files:
|
|
144
145
|
- spec/fixtures/articles/2014_01_01_My_fourth_post.mk
|
145
146
|
- spec/month_archive_spec.rb
|
146
147
|
- spec/spec_helper.rb
|
147
|
-
- spec/year_archive_spec.rb
|