anatomy 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9311046d401a0d15a452eec56f8f868007228622
4
- data.tar.gz: cf129729337533d951cbb7645a5443e43e9cb903
3
+ metadata.gz: 46244578012ad24e411102f3c6afe2bf65f526ca
4
+ data.tar.gz: 142f838c62599ecb5d03cf34c46b0de9e696dd46
5
5
  SHA512:
6
- metadata.gz: 9df53430925e40d018243f582067035b83ec028a88aa13aa237ecc572d8c85af2d1e11359bfa83bda98f8b5fd425eee17aa2dbca8072f633611b888889185500
7
- data.tar.gz: 0036bb071e4d09f701d1c7f76598e4f2861c14926a48939da62b534ff78d2445e7fde57073ad82c4756f233125c23c32b4ba6062a9d32c81475214f1bda7227f
6
+ metadata.gz: a636e3010db7ca6369b9c4588df7bf5f727acc9af81b826a7b1fb1167c6e2e51254ac009f4610ae084f87b9db4c6fa3c6904de20ceca36ef048b2eeb25b7783d
7
+ data.tar.gz: 124afe48b3c6a25c677575f02773ebb6fae05dfe1aa0a0aae7a8e8276de992a2bf232ed04d26a9a2565efac3ca5b3aeed95d08e591472674b79382d04c9ba8c5
data/lib/anatomy/cmd.ay CHANGED
@@ -1,22 +1,22 @@
1
1
  use(require("atomy"))
2
2
 
3
+ require("anatomy/version")
3
4
  require("optparse")
4
5
 
5
6
  $LOAD_PATH unshift(File expand-path("../../lib", __FILE__))
6
7
 
7
8
  processor = require("anatomy/processor")
8
9
 
9
- ARGV shift
10
-
11
10
  options = #{
12
- .input -> ARGV[0]
11
+ .input -> nil
13
12
  .output -> "."
14
13
  .renderer -> "html"
15
14
  .serve -> nil
15
+ .version -> false
16
16
  }
17
17
 
18
18
  op = OptionParser new [o]:
19
- o banner = "usage: anatomy [file] [options]"
19
+ o banner = "usage: anatomy [options]"
20
20
 
21
21
  o on("-s", "--serve PORT", "serve the rendered documents on the given port") [v]:
22
22
  options[.serve] = v to-i
@@ -32,8 +32,15 @@ op = OptionParser new [o]:
32
32
  "which renderer to use (e.g. html)") [v]:
33
33
  options[.renderer] = v
34
34
 
35
+ o on-tail("--version", "print the version of anatomy and exit"):
36
+ options[.version] = true
37
+
35
38
  op parse!
36
39
 
40
+ when(options[.version]):
41
+ puts(Anatomy VERSION)
42
+ exit(0)
43
+
37
44
  input = options[.input]
38
45
  output = options[.output]
39
46
  renderer = options[.renderer]
@@ -0,0 +1,3 @@
1
+ module Anatomy
2
+ VERSION = "0.1.5"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anatomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Suraci
@@ -78,6 +78,7 @@ files:
78
78
  - lib/anatomy/stages/meta.ay
79
79
  - lib/anatomy/stages/resolve.ay
80
80
  - lib/anatomy/stages/traverse.ay
81
+ - lib/anatomy/version.rb
81
82
  - public/anatomy.css
82
83
  - public/highlight.css
83
84
  - public/jquery.hotkeys.js