mincer 0.2.12 → 0.2.13
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/lib/mincer/processors/pg_json_dumper/processor.rb +3 -1
- data/lib/mincer/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: f8429e501c5e08d22afbc1b91d22e7679b36d8c8
|
|
4
|
+
data.tar.gz: 7ecdf9d3adbf364693382952c075477b59468795
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c680f281b5e09e3269c8cdc1ff2bfadd2a55d559a4346c3fc4981c0cc6cada1956c54554bbf5c1c6e9e860b2a72be091b37a65e4f0a0eaa21d97ddd0520b2c9b
|
|
7
|
+
data.tar.gz: bd0d3055705492811c242aaa3b7fcfc67f441eee140d80b70989ec11d66dd54bc709f91340bd75f7cf5db53fadaeca0314cb01766338086c85936a5b2c2fcdd9
|
|
@@ -14,7 +14,9 @@ module Mincer
|
|
|
14
14
|
def to_json
|
|
15
15
|
if dump_supported?
|
|
16
16
|
result = Mincer.connection.execute(json_query).first['json']
|
|
17
|
-
@options[:singularize]
|
|
17
|
+
return result unless @options[:singularize]
|
|
18
|
+
return (result[1..-2].presence || '{}') unless @options[:root]
|
|
19
|
+
(result.sub('[', '').sub(/(])}$/, '}').presence || '{}')
|
|
18
20
|
else
|
|
19
21
|
warn 'To dump data to json with postgres you need to use postgres server version >= 9.2'
|
|
20
22
|
end
|
data/lib/mincer/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mincer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Krasinsky
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-05-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|