tamplier 0.2.0 → 0.2.1

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: 24b78c6a2194776dd7cfb02f932ef78617018e3f
4
- data.tar.gz: 91e4bc57b66764c942ac804a720688591f0bfe1c
3
+ metadata.gz: af6fec80c5ac246a13218b9073558380c3e63a0f
4
+ data.tar.gz: b68e417ea47add5aeccd182dad289a285bfd169d
5
5
  SHA512:
6
- metadata.gz: 0d3e54c8e2018b63ec4eabef1396e70e0888cc572695e7be6259f6da151ef199c9467e1d6cc7c80f5aa5138dd13add814cccffa164b408f403b958a03ee9fd64
7
- data.tar.gz: a5454493e51fe97fad5d8c7c9b2537f47bd41d04df5cb01322122177157e78749cd4cf38547bb305a34b44c49178586018f8324ba15448f6a268b14f74a65aaa
6
+ metadata.gz: 105c5b4d0bfb1cabac5d7d2096226c35b2dabf7fc2411a0915161b3f12fa1df14eda42b2bb915ed6ea33f24d7d2a205f12bf3d443cc9b781e3cc84dc1f73109a
7
+ data.tar.gz: 9daa5cafb620612ef369d1f8d031e301afd5080d3f1603a1ea3cb5096963070f9345cf8807eba71d748bd98853abd742451bda7e57463e41e213e194149b4aaa
data/lib/tamplier.rb CHANGED
@@ -2,8 +2,8 @@ require 'pathname'
2
2
  require 'yaml'
3
3
  require 'active_support/all'
4
4
 
5
- require 'tamplier/version'
6
- require 'tamplier/exceptions/configuration_exception'
7
- require 'tamplier/validator'
5
+ require_relative 'tamplier/version'
6
+ require_relative 'tamplier/exceptions/configuration_exception'
7
+ require_relative 'tamplier/validator'
8
8
 
9
9
  require 'tamplier/railtie' if defined?(Rails)
@@ -23,10 +23,10 @@ module Tamplier
23
23
  (YAML.load(file.read).keys & %w[development test]).present?
24
24
  end
25
25
 
26
- def flat_keys(hash, path = nil)
27
- return path unless hash.is_a?(Hash)
26
+ def flat_keys(hash, path = '')
27
+ return [path] unless hash.is_a?(Hash)
28
28
  hash.map do |key, value|
29
- flat_keys(value, [path, key].compact.join('/'))
29
+ flat_keys(value, path.blank? ? key : [path, key].join('/'))
30
30
  end.flatten
31
31
  end
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module Tamplier
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tamplier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Shestakov