rollin 0.1.20 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2a09300f1daf1b22b63a0d96cadc642587c1d30
4
- data.tar.gz: a91e9578976b0e5b38e0618771c68ed35d7f22bd
3
+ metadata.gz: 06284c77a556bfd485e753e71f80e8d4ba886f40
4
+ data.tar.gz: 5fd8faed995ec19ea9d1cfac49210a7c2b2a5b8b
5
5
  SHA512:
6
- metadata.gz: 56b51c1e5c9a7ec27b8c566fba6ae4193c93eacc5bde409cbde2d58373ef87614438cafbc86ade952096cefda397a3271dbc21d4155e7ab2d31a2795a0b97c43
7
- data.tar.gz: 97b6e62690de79f95a84050afe7bc627c2724c668bd0baec8ff1952b96c3923f52bd59f65f708c8c449b592836e05a239ce76d268a8e225aca108c492177f705
6
+ metadata.gz: 237bd8ed3e13da7f1ad79253a8818703c292db094d4bcf1c01c2faf70879f55c07d430b0d732b8cbfc321aaa53c0c0745a261ed33c6fb4bd64858e4b77ff01fe
7
+ data.tar.gz: 1987eb6a6e076c5da9b892c36a4f6bc42ea5f1da8acceb0258b7d03dfddeb1cd25a30bcd751196266973de1490547a06232a0394ccbaeb41c9d8044f5f59cf21
@@ -0,0 +1 @@
1
+ 2.1.0
data/README.md CHANGED
@@ -117,7 +117,7 @@ Since it is meant to be used in a blogging domain it is not optimized with cachi
117
117
 
118
118
  ## Build status
119
119
 
120
- [![Build Status](https://travis-ci.org/marano/rollin.png)](https://travis-ci.org/marano/rollin)
120
+ [![Build Status](https://snap-ci.com/marano/rollin/branch/master/build_image)](https://snap-ci.com/marano/rollin/branch/master)
121
121
 
122
122
  ## Contributing
123
123
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.20
1
+ 0.2.1
@@ -1,9 +1,9 @@
1
1
  class Rollin::Article
2
- attr_reader :id, :year, :month, :day
2
+ attr_reader :id, :year, :month, :day, :filename
3
3
 
4
4
  def initialize(source_file)
5
5
  @source_file = source_file
6
- filename = File.basename(@source_file)
6
+ @filename = File.basename(@source_file)
7
7
  @id = filename[0, filename.length - 3]
8
8
  @title_from_filename = filename[11, filename.length - 11 - 3].gsub('_', ' ')
9
9
  @year = filename[0, 4].to_i
@@ -48,7 +48,8 @@ class Rollin::Blog
48
48
  private
49
49
 
50
50
  def read_articles
51
- Dir["#{@articles_folder}/**/*.mk"].sort.map do |article_source|
51
+ extensions = %w{markdown mdown mkdn md mkd mdwn mdtxt mdtext text}
52
+ Dir[*extensions.map { |ext| "#{@articles_folder}/**/*.#{ext}" }].sort.map do |article_source|
52
53
  Rollin::Article.new(article_source)
53
54
  end
54
55
  end
@@ -32,9 +32,10 @@ describe 'how rollin works' do
32
32
  article.month.should == 5
33
33
  article.day.should == 1
34
34
  article.date.should == Date.new(2013, 5, 1)
35
- article.published?.should be_true
35
+ article.published?.should == true
36
36
  article.body.should == "<h2>This is my first post</h2>\n\n<p>And here we go!</p>\n"
37
37
  article.metatags.should == { 'tags' => [ 'manero' ] }
38
+ article.filename.should == '2013_05_01_My_first_post.md'
38
39
  end
39
40
 
40
41
  it 'allows article title definition with metatag' do
@@ -81,15 +82,15 @@ describe 'how rollin works' do
81
82
 
82
83
  context 'inquiring metatags' do
83
84
  it 'shows a list of existent metatags' do
84
- blog.should have(3).metatags
85
+ blog.metatags.size.should be 3
85
86
 
86
87
  blog.metatags[0].label.should == 'published'
87
- blog.metatags[0].should have(1).values
88
+ blog.metatags[0].values.size.should be 1
88
89
  blog.metatags[0].values[0].content.should == false
89
90
  blog.metatags[0].values[0].articles.should == [ unpublished_article ]
90
91
 
91
92
  blog.metatags[1].label.should == 'tags'
92
- blog.metatags[1].should have(3).values
93
+ blog.metatags[1].values.size.should be 3
93
94
  blog.metatags[1].values[2].content.should == 'bacana'
94
95
  blog.metatags[1].values[2].articles.should == [ article_with_multiple_tag_metatag ]
95
96
  blog.metatags[1].values[1].content.should == 'massa'
@@ -98,7 +99,7 @@ describe 'how rollin works' do
98
99
  blog.metatags[1].values[0].articles.should == [ article_with_multiple_tag_metatag, article_with_single_tag_metatag ]
99
100
 
100
101
  blog.metatags[2].label.should == 'title'
101
- blog.metatags[2].should have(1).values
102
+ blog.metatags[2].values.size.should be 1
102
103
  blog.metatags[2].values[0].content.should == 'This is a super post!'
103
104
  blog.metatags[2].values[0].articles.should == [ article_with_title_metatag ]
104
105
  end
@@ -111,7 +112,7 @@ describe 'how rollin works' do
111
112
  let (:fifth_article) { TestArticle.new(id: '2014_01_01_My_fifth_post', title: 'My fifth post', date: Date.new(2014, 1, 1)) }
112
113
 
113
114
  it 'lists all articles' do
114
- blog.should have(4).articles
115
+ blog.articles.size.should == 4
115
116
 
116
117
  blog.articles[0].should == fifth_article
117
118
  blog.articles[1].should == third_article
@@ -122,7 +123,7 @@ describe 'how rollin works' do
122
123
 
123
124
  context 'archive' do
124
125
  it 'provides monthly archive' do
125
- blog.monthly_archive.should have(3).articles
126
+ blog.monthly_archive.size.should be 3
126
127
 
127
128
  blog.monthly_archive[0].year.should == 2014
128
129
  blog.monthly_archive[0].month.should == 1
@@ -138,18 +139,18 @@ describe 'how rollin works' do
138
139
  end
139
140
 
140
141
  it 'provides annual archive' do
141
- blog.should have(2).annual_archive
142
+ blog.annual_archive.size.should be 2
142
143
 
143
144
  blog.annual_archive[0].year.should == 2014
144
145
  blog.annual_archive[0].articles.should == [ fifth_article ]
145
- blog.annual_archive[0].should have(1).monthly_archive
146
+ blog.annual_archive[0].monthly_archive.size.should be 1
146
147
  blog.annual_archive[0].monthly_archive[0].year.should == 2014
147
148
  blog.annual_archive[0].monthly_archive[0].month.should == 1
148
149
  blog.annual_archive[0].monthly_archive[0].articles.should == [ fifth_article ]
149
150
 
150
151
  blog.annual_archive[1].year.should == 2013
151
152
  blog.annual_archive[1].articles.should == [ third_article, second_article, first_article ]
152
- blog.annual_archive[1].should have(2).monthly_archive
153
+ blog.annual_archive[1].monthly_archive.size.should be 2
153
154
  blog.annual_archive[1].monthly_archive[0].year.should == 2013
154
155
  blog.annual_archive[1].monthly_archive[0].month.should == 6
155
156
  blog.annual_archive[1].monthly_archive[0].articles.should == [ third_article ]
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - marano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-01 00:00:00.000000000 Z
11
+ date: 2014-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: version
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: redcarpet
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: safe_yaml
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: ''
@@ -115,9 +115,10 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .gitignore
119
- - .rvmrc
120
- - .travis.yml
118
+ - ".gitignore"
119
+ - ".ruby-version"
120
+ - ".rvmrc"
121
+ - ".travis.yml"
121
122
  - Gemfile
122
123
  - LICENSE.txt
123
124
  - README.md
@@ -132,11 +133,11 @@ files:
132
133
  - lib/rollin/version.rb
133
134
  - lib/rollin/year_archive.rb
134
135
  - rollin.gemspec
135
- - spec/fixtures/2013_05_01_My_first_post.mk
136
- - spec/fixtures/2013_05_02_My_second_post.mk
137
- - spec/fixtures/2013_06_01_My_third_post.mk
138
- - spec/fixtures/2013_07_01_My_fourth_post.mk
139
- - spec/fixtures/2014_01_01_My_fifth_post.mk
136
+ - spec/fixtures/2013_05_01_My_first_post.md
137
+ - spec/fixtures/2013_05_02_My_second_post.md
138
+ - spec/fixtures/2013_06_01_My_third_post.md
139
+ - spec/fixtures/2013_07_01_My_fourth_post.md
140
+ - spec/fixtures/2014_01_01_My_fifth_post.md
140
141
  - spec/rollin_spec.rb
141
142
  - spec/spec_helper.rb
142
143
  homepage: http://github.com/marano/rollin
@@ -149,25 +150,25 @@ require_paths:
149
150
  - lib
150
151
  required_ruby_version: !ruby/object:Gem::Requirement
151
152
  requirements:
152
- - - '>='
153
+ - - ">="
153
154
  - !ruby/object:Gem::Version
154
155
  version: '0'
155
156
  required_rubygems_version: !ruby/object:Gem::Requirement
156
157
  requirements:
157
- - - '>='
158
+ - - ">="
158
159
  - !ruby/object:Gem::Version
159
160
  version: '0'
160
161
  requirements: []
161
162
  rubyforge_project:
162
- rubygems_version: 2.0.14
163
+ rubygems_version: 2.2.0
163
164
  signing_key:
164
165
  specification_version: 4
165
166
  summary: A Ruby minimalistic blog engine ... WATTT!!?!??
166
167
  test_files:
167
- - spec/fixtures/2013_05_01_My_first_post.mk
168
- - spec/fixtures/2013_05_02_My_second_post.mk
169
- - spec/fixtures/2013_06_01_My_third_post.mk
170
- - spec/fixtures/2013_07_01_My_fourth_post.mk
171
- - spec/fixtures/2014_01_01_My_fifth_post.mk
168
+ - spec/fixtures/2013_05_01_My_first_post.md
169
+ - spec/fixtures/2013_05_02_My_second_post.md
170
+ - spec/fixtures/2013_06_01_My_third_post.md
171
+ - spec/fixtures/2013_07_01_My_fourth_post.md
172
+ - spec/fixtures/2014_01_01_My_fifth_post.md
172
173
  - spec/rollin_spec.rb
173
174
  - spec/spec_helper.rb