showdown 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/showdown +14 -4
- data/lib/showdown/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: 17c0bd53511c5e975d0aa24b08d175f4a9ad0f53
|
4
|
+
data.tar.gz: 88a173b57cf008e8aa8c5fd34d89187dabd22833
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0b71e6a68a756e23fadeceb99b94c76341fb1d0f3a31d6b0fb3e2b8c06dfaf9e9354a3122ce83b6dbc670ba76c1bb1bf019ace7ff5a8951ad7036a3cd7d7b7
|
7
|
+
data.tar.gz: ed62cdb226874e6196edb1570846c114d2b11f92dcd8c9c1f572b09a3df64ebb068669b10eacebc3b9ae535a5c5abc4f9b0ff568d02dc89b8436bf5f7d1a7ff7
|
data/README.md
CHANGED
data/bin/showdown
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
2
|
+
require 'optparse'
|
3
|
+
|
4
|
+
@port = 3000
|
3
5
|
RACKUP_FILE_PATH = "#{File.expand_path('../../lib', __FILE__)}/config.ru"
|
4
6
|
|
5
7
|
Signal.trap(:INT) do
|
@@ -7,8 +9,15 @@ Signal.trap(:INT) do
|
|
7
9
|
exit(0)
|
8
10
|
end
|
9
11
|
|
12
|
+
def parse_options
|
13
|
+
OptionParser.new do |o|
|
14
|
+
o.on('-p', '--port=PORT') { |v| @port = v }
|
15
|
+
o.parse!(ARGV)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
10
19
|
def help
|
11
|
-
$stdout.puts 'usage: showdown
|
20
|
+
$stdout.puts 'usage: showdown [-p 4567] /path/to/your/markdown/file'
|
12
21
|
end
|
13
22
|
|
14
23
|
unless ARGV[0]
|
@@ -16,6 +25,7 @@ unless ARGV[0]
|
|
16
25
|
exit 1
|
17
26
|
end
|
18
27
|
|
19
|
-
|
28
|
+
parse_options
|
29
|
+
TARGET_PATH = File.expand_path(ARGV.shift)
|
20
30
|
|
21
|
-
system "TARGET_PATH=#{TARGET_PATH} thin -R #{RACKUP_FILE_PATH} -p #{
|
31
|
+
system "TARGET_PATH=#{TARGET_PATH} thin -R #{RACKUP_FILE_PATH} -p #{@port} start"
|
data/lib/showdown/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: showdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumitaka Tokumitsu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-rack
|