rollin 0.0.13 → 0.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 049730c65afc7a862413afa2d4cb68e79ce28adb
4
- data.tar.gz: 3dd7bd4326661904a43a8ad20c544fa4c738ffb3
3
+ metadata.gz: 64fa7df26bceb4a3fe35782699c1afab30b60804
4
+ data.tar.gz: b5ba1a16871dd231f33c45e030f2195aae0ddb9e
5
5
  SHA512:
6
- metadata.gz: d7d53f585e4e0493a00f526def30670eb2b95fff27d5c21479e5986965510009dd52341eb4c1d5f4ff249cbf648d433a25bb4ba0ddc5b042a26dbcf1fe567bce
7
- data.tar.gz: 88612276e7ffe27f8e84f546bd99aa7e6e3eed8cc8b5dd90fc53fd9f5ce3a7411bb6886aa21c0a4e9e8c361de201cad0e1243656408106e73d80360ebde7a18f
6
+ metadata.gz: 632a32e255b9a6e23d850cd4f082673a8eb2d911eb853c2ce4d6da68965022077cbdf2ccc4feb4fe592bc459e5a80103ff0d23a2fdb079cdf9c5bd71e8416737
7
+ data.tar.gz: 418c44e0f0a10f6b228a597c89eaf6da9b61f8312548a627be5f82f2d8e33594839906a53d8d6cd5da18e235693ad8c07f38f2e0686d4a3ac944464e2dc0f6cd
data/README.md CHANGED
@@ -21,7 +21,7 @@ First you will need to have the following structure in your filesystem.
21
21
  ├── my_posts
22
22
  └── 2013_05_01_My_first_post.mk
23
23
 
24
- ### Getting the articles
24
+ ### Articles
25
25
 
26
26
  In your code.
27
27
 
@@ -38,7 +38,7 @@ In your code.
38
38
  anArticle.month # => 05
39
39
  anArticle.day # => 01
40
40
 
41
- ### Getting the archive
41
+ ### Monthly archive
42
42
 
43
43
  a_monthly_archive = blog.monthly_archive.first
44
44
 
@@ -46,6 +46,14 @@ In your code.
46
46
  a_monthly_archive.month # => 5
47
47
  a_monthly_archive.articles # => [ Rollin::Article(:title => "My first post" ...) ]
48
48
 
49
+ ### Annual archive
50
+
51
+ an_annual_archive = blog.annual_archive.first
52
+
53
+ an_annual_archive.year # => 2013
54
+ an_annual_archive.articles # => [ Rollin::Article(:title => "My first post" ...) ]
55
+ an_annual_archive.monthly_archive # => [ Rollin::MonthArchive(:year => 2013, :month => 5 ...) ]
56
+
49
57
  ### Finding an article
50
58
 
51
59
  blog.find_article_by_id('2013_05_01_My_first_post') # => #Rollin::Article(:title => "My first post" ...)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.13
1
+ 0.0.14
data/lib/rollin/blog.rb CHANGED
@@ -13,7 +13,7 @@ class Rollin::Blog
13
13
  end
14
14
  end
15
15
 
16
- def annually_archive
16
+ def annual_archive
17
17
  monthly_archive.map { |month_archive| month_archive.year }.uniq.map do |year|
18
18
  Rollin::YearArchive.new(year, monthly_archive.map { |aMonth| aMonth.year == year })
19
19
  end
data/spec/blog_spec.rb CHANGED
@@ -12,8 +12,8 @@ describe Rollin::Blog do
12
12
  blog.monthly_archive.size.should == 3
13
13
  end
14
14
 
15
- it 'has the right amount of yearly archives' do
16
- blog.annually_archive.size.should == 2
15
+ it 'has the right amount of annual archives' do
16
+ blog.annual_archive.size.should == 2
17
17
  end
18
18
 
19
19
  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.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - marano