dato 0.3.16 → 0.3.17

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: c14a63b1e904638d14897d5091af398fb1187f71
4
- data.tar.gz: 4de50e385d99f41cb99ac08ebba0547d209b3e0b
3
+ metadata.gz: 5312e73132db1c3e40025457a136c2a19277c678
4
+ data.tar.gz: 841bf4766c9ccdf46e579ae90404db20030638c4
5
5
  SHA512:
6
- metadata.gz: 7f09bb97476d5b9e598cb3a8ef71e00c5635583a73b77a6978059516ef389ac96d9d1a8db1718e7f23e8617d67884cde7bf23461b93832c8dc08789b3b024801
7
- data.tar.gz: ed9d5bddae54dadc1d07c482e20cb32aba7a2e8237ce9e6e151cfb02103b0f6d4e55832de80b99691216775fce7ab7181c4b0bbeb06106105c1d739a2ad23df0
6
+ metadata.gz: 5ce372671115413972baa6db2fef3eef123e18445604f13f2f376dade987c1dcf8c85486e203eda7edfa27f38718104b3259da6c7b9f0204673dd4a9316e8b5d
7
+ data.tar.gz: 7fceeea2f83645aecee686869e3531725ff1b8f7b97409274625b940df62f3d8b2bcfce70f7e65fe632445188c87d48afe2397ecbc50ce180f3bda9fc0aa2f16
@@ -19,6 +19,8 @@ module Dato
19
19
  Format::Toml
20
20
  when :yaml, :yml
21
21
  Format::Yaml
22
+ when :json
23
+ Format::Json
22
24
  end
23
25
  end
24
26
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ require 'json'
3
+
4
+ module Dato
5
+ module Dump
6
+ module Format
7
+ module Json
8
+ def self.dump(value)
9
+ JSON.dump(value)
10
+ end
11
+
12
+ def self.frontmatter_dump(value)
13
+ "#{dump(value)}\n"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Dato
3
- VERSION = '0.3.16'
3
+ VERSION = '0.3.17'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16
4
+ version: 0.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-16 00:00:00.000000000 Z
11
+ date: 2017-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -382,6 +382,7 @@ files:
382
382
  - lib/dato/dump/dsl/directory.rb
383
383
  - lib/dato/dump/dsl/root.rb
384
384
  - lib/dato/dump/format.rb
385
+ - lib/dato/dump/format/json.rb
385
386
  - lib/dato/dump/format/toml.rb
386
387
  - lib/dato/dump/format/yaml.rb
387
388
  - lib/dato/dump/operation/add_to_data_file.rb