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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f81d108f81fddfa51bcd51ec01cbb6c379143440
4
- data.tar.gz: 04ff088aa48004a123a8161eb3cb4b2bbad08b02
3
+ metadata.gz: 983069845db550df399f38eaba6b784c2dcb05ac
4
+ data.tar.gz: 9d42901a7a21ba82dcf6e54d24cc7c2d03ed4e19
5
5
  SHA512:
6
- metadata.gz: 93d1540607251068d91199c241f67244350c8f32de4c36335f58b3289b05fa7225adafab71a27640c54a3af0d3f5bac965297845aacc16b427688ed1bf3136f4
7
- data.tar.gz: 6ba07cdc4680bca886d9db532b3acc7b1638705c03202777b1a6e13a7ffca4b3dd66eb549782e9c951b1ea8e236e181a4eeda6ebb888028b0c18f62c55b51bdd
6
+ metadata.gz: 881959cd3db5dfcd955669a1a70bbb16bdfcd9f8ef1dc2db58ec0e621af7f337be8d8eaf2374d125383c97c62912030df5c1e56625ac88e24c431912aada1125
7
+ data.tar.gz: 0b4fec2df6686cdd302f9e5460996c54f3b2d3a8e67da30603c4eb93bd4f389651165cf9358b8211dca377c00fcc8a10682d67fc2eb64945fee6749115054506
@@ -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,
@@ -12,7 +12,7 @@ module Brief
12
12
  def render_attachments
13
13
  attachments.reduce({}.to_mash) do |memo, name|
14
14
  if asset = briefcase.find_asset(name)
15
- memo[asset.basename] = asset.read
15
+ memo[name] = IO.read(asset)
16
16
  memo
17
17
  end
18
18
  end
@@ -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
- h[:attachments] = document.render_attachments if options[:attachments] || options[:include_attachments]
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
@@ -1,3 +1,3 @@
1
1
  module Brief
2
- VERSION = '1.9.6'
2
+ VERSION = '1.9.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brief
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.6
4
+ version: 1.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Soeder