frenchpress 0.2 → 0.2.1
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/FRENCHPRESS_VERSION +1 -1
- data/install/_layouts/index.html +2 -2
- data/lib/frenchpress/blog.rb +11 -6
- data/lib/frenchpress/cmd.rb +6 -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: 85ee50fd5483a6776b5f16198f97bdbffb3b5db5
|
|
4
|
+
data.tar.gz: dc2d9f1b7b17076fea9129f26a2988551a7bcffa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 874bf7ebe42052710272efa76c8f63cc51a5fdfb9caef5031cced27d7ffe314b08bc8695fc396a059730850ea92bee4ec34e27e5f3d72cd3a8611c8496a32189
|
|
7
|
+
data.tar.gz: f24a2725b656a81854148114afd098ea1c450ed2c7850f3c48d2a05dfde7ac2be4f58d840348f5fa12507d0625f5fde13b4afd7afd6688571a09c6a2d3f32896
|
data/FRENCHPRESS_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2
|
|
1
|
+
0.2.1
|
data/install/_layouts/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<link href='https://fonts.googleapis.com/css?family=Poiret+One|Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
|
7
7
|
</head>
|
|
8
8
|
<body>
|
|
9
|
-
<h1><a href="/">{{ site.title }}
|
|
9
|
+
<h1><a href="/">{{ site.title }}</a></h1>
|
|
10
10
|
<div id="posts">
|
|
11
11
|
{% for post in site.posts %}
|
|
12
12
|
<div class="post">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{% endif %}
|
|
16
16
|
<p class="post-date"><a href="{{ post.url }}">{{ post.date | date: "%b %d %y" }}</a></p>
|
|
17
17
|
<div class="post-content">{{ post.content }}</div>
|
|
18
|
-
<p class="post-reply">To reply: "frenchpress reply {{ site.url }}
|
|
18
|
+
<p class="post-reply">To reply: "frenchpress reply {{ site.url }}{{ post.url }}"</p>
|
|
19
19
|
</div>
|
|
20
20
|
{% endfor %}
|
|
21
21
|
</div>
|
data/lib/frenchpress/blog.rb
CHANGED
|
@@ -16,9 +16,10 @@ class FrenchPress
|
|
|
16
16
|
@dir = dir
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def new_blog
|
|
19
|
+
def new_blog(args)
|
|
20
20
|
dir = File.expand_path File.join(File.dirname(__FILE__), '..', '..')
|
|
21
21
|
copy_install_files dir
|
|
22
|
+
write_config(args) if args
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
def copy_install_files(dir, update = false)
|
|
@@ -68,13 +69,17 @@ class FrenchPress
|
|
|
68
69
|
end
|
|
69
70
|
|
|
70
71
|
def update
|
|
71
|
-
Dir.chdir(@dir)
|
|
72
|
-
FileUtils.rm_rf '_layouts'
|
|
73
|
-
FileUtils.rm_rf 'css'
|
|
74
|
-
FileUtils.rm_rf 'index.html'
|
|
75
|
-
end
|
|
72
|
+
Dir.chdir(@dir) { FileUtils.rm_r ['_layouts', 'css', 'index.html'] }
|
|
76
73
|
dir = File.expand_path File.join(File.dirname(__FILE__), '..', '..')
|
|
77
74
|
copy_install_files dir, true
|
|
78
75
|
end
|
|
76
|
+
|
|
77
|
+
def write_config(args)
|
|
78
|
+
Dir.chdir(@dir) do
|
|
79
|
+
File.open('_config.yml', 'a+') do |f|
|
|
80
|
+
f.write args.to_yaml
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
79
84
|
end
|
|
80
85
|
end
|
data/lib/frenchpress/cmd.rb
CHANGED
|
@@ -6,8 +6,13 @@ class FrenchPress
|
|
|
6
6
|
class_option :dir
|
|
7
7
|
|
|
8
8
|
desc 'init', 'Initialize a new frenchpress blog.'
|
|
9
|
+
option :url
|
|
10
|
+
option :title
|
|
9
11
|
def init
|
|
10
|
-
FrenchPress.open(options[:dir]).new_blog
|
|
12
|
+
FrenchPress.open(options[:dir]).new_blog(
|
|
13
|
+
url: options[:url],
|
|
14
|
+
title: options[:title]
|
|
15
|
+
)
|
|
11
16
|
end
|
|
12
17
|
|
|
13
18
|
desc 'post', 'Create a new post from given file or URL.'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: frenchpress
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kyle Fahringer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|