musako 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/musako/renderers/post.rb +8 -4
- data/lib/musako/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ec8a375b4e6516a076749d69645bbefd4fce8fd
|
4
|
+
data.tar.gz: 9077d56583da25999560410123c6cb649fd9e85a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad48076369d02726375c0c4ce8e137ad65b03e547d633311b13f93824844e6e2c9105ece12472c6632065759a12e69d004c20e0c323876f53fbc578e45bd70b6
|
7
|
+
data.tar.gz: 8efe509c0742abfbd8ecb6e0689417e05cac7d8ba956a4bf5e8408ade9b75a723ea62f8bcd763b29b86f0ac1bd7de5760de658cb440aa2f02d1b6afe0397362d
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'date'
|
1
2
|
require 'slim'
|
2
3
|
require 'redcarpet'
|
3
4
|
|
@@ -51,12 +52,15 @@ module Musako
|
|
51
52
|
end
|
52
53
|
|
53
54
|
def set_meta_data(title)
|
54
|
-
|
55
|
+
buf = self.file_name.split("-")
|
56
|
+
|
57
|
+
name = (buf.size > 1) ? buf[1] : buf[0]
|
58
|
+
date = DateTime.parse(buf[0]) rescue self.file_updated_at
|
55
59
|
|
56
60
|
@title = title
|
57
|
-
@date =
|
58
|
-
@iso_date =
|
59
|
-
@url = File.join("#{
|
61
|
+
@date = date
|
62
|
+
@iso_date = date.strftime("%FT%T%z")
|
63
|
+
@url = File.join("#{date.year}/#{date.month}/#{date.day}", name)
|
60
64
|
@path = self.file_path
|
61
65
|
end
|
62
66
|
end
|
data/lib/musako/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: musako
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yo_waka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|