snippr 0.16.1 → 0.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/snippr/meta_data.rb +6 -5
- data/snippr.gemspec +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: ab3ac24a4943900527af0835dd4c75fcef4ff65e
|
4
|
+
data.tar.gz: c5e273b76fa6e7958816d4da9091d123f5439ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd91728a4b090798135643c02244943f41f60aba1449629eaf1c20b98dad385631dc1c4c62fa1de229774b63939f084e28a33da57698d9176f94a1333562a8d7
|
7
|
+
data.tar.gz: c0a5d41e4f58b5375054400807b2a61995e96726e2cc99f4c0519430c79cd3b5c13aa9517843631298a324d6bd84c54cb7bda162135586771e7b65379c83a49d
|
data/lib/snippr/meta_data.rb
CHANGED
@@ -16,17 +16,18 @@ module Snippr
|
|
16
16
|
content = Regexp.last_match.post_match.strip
|
17
17
|
meta = yaml_load(name, $1)
|
18
18
|
if meta && meta.keys.include?(INCLUDE)
|
19
|
-
Array(meta[INCLUDE]).each do |
|
20
|
-
if (snippet &&
|
21
|
-
|
19
|
+
Array(meta[INCLUDE]).each do |include_path|
|
20
|
+
if (snippet && include_path.start_with?("./"))
|
21
|
+
include_path = snippet.name.gsub(/\/.*?$/,"") + "/" + include_path.gsub(/^\.\//, "")
|
22
22
|
end
|
23
|
-
snippet = Snippr.load(
|
24
|
-
meta = snippet.meta.
|
23
|
+
snippet = Snippr.load(include_path)
|
24
|
+
meta = snippet.meta.deep_merge(meta)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
meta = meta ? meta : {}
|
30
|
+
|
30
31
|
[content, meta]
|
31
32
|
end
|
32
33
|
|
data/snippr.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snippr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n
|