brief 1.9.1 → 1.9.2
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/Gemfile.lock +1 -1
- data/lib/brief/cli/parse.rb +33 -12
- data/lib/brief/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: 3986559b2d00c997b91f9fef8d1adda8830b5907
|
4
|
+
data.tar.gz: b959ef3fe431b2da4e4a3acf857dc174e82b9337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7bb4ff6a9bc110c6e2c69277d748ecc955fb47586c0556ff3f812236de266ee3077d4f2efc33b675427711e93dd8ef677432e5b1145bf8f7764f62b4d3a05c1
|
7
|
+
data.tar.gz: 66121eaf98cfe7bf55123c294477ba39e8c705edd14b25dea821d6e378dc11f58cfcbb7276f91c17e08a579ff41c7c6bf971233f75a97ecbffdc27c21bd4a90b
|
data/Gemfile.lock
CHANGED
data/lib/brief/cli/parse.rb
CHANGED
@@ -2,8 +2,14 @@ command 'parse' do |c|
|
|
2
2
|
c.syntax = 'brief parse PATH [OPTIONS]'
|
3
3
|
c.description = 'parse the briefcase path'
|
4
4
|
|
5
|
-
c.option '--
|
6
|
-
c.option '--
|
5
|
+
c.option '--presenter-format FORMAT', String, 'Which presenter to use?'
|
6
|
+
c.option '--include-schema', 'Include schema information'
|
7
|
+
c.option '--include-models', 'Include individual models as well'
|
8
|
+
c.option '--include-content', 'Gets passed to the model renderers if present'
|
9
|
+
c.option '--include-rendered', 'Gets passed to the model renderers if present'
|
10
|
+
c.option '--include-urls', 'Gets passed to the model renderers if present'
|
11
|
+
|
12
|
+
c.example "Parsing an arbitrary selection of documents", "brief parse ./blueprint/docs/epics ./blueprint/docs/user_stories --root=./blueprint --format json --include-rendered --include-content"
|
7
13
|
|
8
14
|
c.action do |args, options|
|
9
15
|
options.default(root: Pathname(Brief.pwd), output_type: "array")
|
@@ -16,17 +22,32 @@ command 'parse' do |c|
|
|
16
22
|
|
17
23
|
briefcase = Brief::Briefcase.new(o)
|
18
24
|
|
19
|
-
|
20
|
-
|
21
|
-
|
25
|
+
args.map! do |arg|
|
26
|
+
arg = Pathname(arg)
|
27
|
+
|
28
|
+
if arg.directory?
|
29
|
+
Dir[arg.join('**/*')].map {|f| Pathname(f) }
|
30
|
+
else
|
31
|
+
arg
|
22
32
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
33
|
+
end
|
34
|
+
|
35
|
+
args.flatten!
|
36
|
+
|
37
|
+
args.select! {|arg| Brief::Util.ensure_child_path(briefcase.docs_path, arg) }
|
38
|
+
#args.map! {|arg| Brief::Document.new(arg.realpath).in_briefcase(briefcase) }
|
39
|
+
|
40
|
+
model_params = {
|
41
|
+
rendered: !!options.include_rendered,
|
42
|
+
content: !!options.include_content,
|
43
|
+
urls: !!options.include_urls
|
44
|
+
}
|
45
|
+
|
46
|
+
parsed = args.map do |path|
|
47
|
+
Brief::Document.new(path)
|
48
|
+
.in_briefcase(briefcase)
|
49
|
+
.to_model
|
50
|
+
.as_json(model_params)
|
30
51
|
end
|
31
52
|
|
32
53
|
if options.output_type == "hash"
|
data/lib/brief/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brief
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Soeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|