brief 1.9.6 → 1.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/brief/cli/export.rb +3 -2
- data/lib/brief/document/attachments.rb +1 -1
- data/lib/brief/model/serializers.rb +5 -1
- data/lib/brief/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 983069845db550df399f38eaba6b784c2dcb05ac
|
4
|
+
data.tar.gz: 9d42901a7a21ba82dcf6e54d24cc7c2d03ed4e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 881959cd3db5dfcd955669a1a70bbb16bdfcd9f8ef1dc2db58ec0e621af7f337be8d8eaf2374d125383c97c62912030df5c1e56625ac88e24c431912aada1125
|
7
|
+
data.tar.gz: 0b4fec2df6686cdd302f9e5460996c54f3b2d3a8e67da30603c4eb93bd4f389651165cf9358b8211dca377c00fcc8a10682d67fc2eb64945fee6749115054506
|
data/lib/brief/cli/export.rb
CHANGED
@@ -12,9 +12,10 @@ command 'export' do |c|
|
|
12
12
|
c.option '--include-urls', 'Gets passed to the model renderers if present'
|
13
13
|
|
14
14
|
c.action do |args, options|
|
15
|
-
options.default(presenter_format: "full_export")
|
15
|
+
options.default(presenter_format: "full_export", root: Pathname(args.first || Brief.pwd))
|
16
|
+
|
17
|
+
briefcase = Brief.case = Brief::Briefcase.new(root: Pathname(args.first || options.root))
|
16
18
|
|
17
|
-
briefcase = Brief.case(true)
|
18
19
|
briefcase.present(options.presenter_format, rendered: options.include_rendered,
|
19
20
|
content: options.include_content,
|
20
21
|
urls: options.include_urls,
|
@@ -30,7 +30,11 @@ module Brief::Model::Serializers
|
|
30
30
|
}.tap do |h|
|
31
31
|
h[:content] = document.combined_data_and_content if options[:content] || options[:include_content]
|
32
32
|
h[:rendered] = document.to_html if options[:rendered] || options[:include_rendered]
|
33
|
-
|
33
|
+
|
34
|
+
if options[:attachments] || options[:include_attachments]
|
35
|
+
h[:attachments] = document.render_attachments
|
36
|
+
end
|
37
|
+
|
34
38
|
h[:urls] = {
|
35
39
|
view_content_url: "/view/content/#{ doc_path }",
|
36
40
|
view_rendered_url: "/view/rendered/#{ doc_path }",
|
data/lib/brief/version.rb
CHANGED