pagoda-jekyll 0.0.6 → 0.0.7
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 +8 -8
- data/bin/pagoda +40 -6
- data/pagoda.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWYwMTVlOGMwNjRjNTdlN2Q4MGI1ZmJkMDE2YmUxNTdlNDYwYjliNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGU0YTY4NTllYzE0MjNhYzQ5NGFhZDAyYjhmMDZkZDk4MzUyNTY2Nw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODYxZDU2NjUwZGQwN2M3MWIwOGY3YjJiNzE1NTUyYzUzYzcwYmRlMjBlYWZl
|
10
|
+
OTdiMTU4MWI1ZWI4NTlhZWJkMWU4NTg3YmQ1ODIyZTAyNTQ1NGNjMjIyMjUw
|
11
|
+
Y2M1Yzk1ZGVkY2NkMTcxM2Q1MDY1MzZlZmNkZGIxYjdlYWZmZDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODIyZDkzY2Y4MjVkMGE1OWZmZDkxMzdkZjY5MjYwMjE0Y2U2NTQ0N2E2ZmRh
|
14
|
+
MTlkODkxZGE2MjlkOTE5N2Y2YzYwYTY4MDU3MDA3OTk5ODY4Mjk1MzJmMmU5
|
15
|
+
N2FkNWMwYTQwMTAzN2E4MzYzMGRiYjg4NzI3YWUzNjViNjQ1ZmM=
|
data/bin/pagoda
CHANGED
@@ -2,14 +2,48 @@
|
|
2
2
|
|
3
3
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
4
4
|
|
5
|
+
|
6
|
+
|
7
|
+
help = <<HELP
|
8
|
+
Pagoda is a Jekyll editor
|
9
|
+
|
10
|
+
Basic Command Line Usage:
|
11
|
+
pagoda [OPTIONS] [PATH]
|
12
|
+
|
13
|
+
PATH The path to the Jekyll repository (default .).
|
14
|
+
|
15
|
+
Options:
|
16
|
+
HELP
|
17
|
+
|
18
|
+
require 'optparse'
|
5
19
|
require 'rubygems'
|
6
20
|
require 'pagoda/app'
|
7
21
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
22
|
+
options = { 'port' => 4567, 'bind' => '0.0.0.0' }
|
23
|
+
|
24
|
+
opts = OptionParser.new do |opts|
|
25
|
+
opts.banner = help
|
26
|
+
|
27
|
+
opts.on("--port [PORT]", "Bind port (default 4567).") do |port|
|
28
|
+
options['port'] = port.to_i
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Read command line options into `options` hash
|
33
|
+
begin
|
34
|
+
opts.parse!
|
35
|
+
jekyll_path = ARGV[0] || Dir.pwd
|
36
|
+
|
37
|
+
if not File.directory? jekyll_path
|
38
|
+
raise OptionParser::InvalidOption.new "Directory '#{jekyll_path}' not found"
|
39
|
+
end
|
40
|
+
|
41
|
+
rescue OptionParser::InvalidOption
|
42
|
+
puts "pagoda: #{$!.message}"
|
43
|
+
puts "pagoda: try 'pagoda --help' for more information"
|
44
|
+
exit
|
13
45
|
end
|
14
46
|
|
15
|
-
Shwedagon::App.
|
47
|
+
Shwedagon::App.set :blog, ARGV.first
|
48
|
+
|
49
|
+
Shwedagon::App.run!(options)
|
data/pagoda.gemspec
CHANGED