ossy 0.4.0 → 0.4.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5c687dc7cca174381ce1eec36f7c1b4598ac627276b760fbfe2621bd0b908c6
|
4
|
+
data.tar.gz: 89fd2699ac7f18642c01b6b5c5f83436dc45bed6e6083cebe14e2b66a3796e97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e06886aeac5e3a56bc637f3da848196957da4f10622370480fca01945da993d4295377c8a5c580c0269427feb0def4bf533e26bfdf5f0bd5ac55f6e03be8bf40
|
7
|
+
data.tar.gz: 837c6010f2b011d7adcedb1c22c6cf56fb5231054eee11e612df772fd4c0ac77a4ab82ebeb03891f25e0a54596142d116182704b803d04d908c300fa3e1597f1
|
@@ -34,14 +34,14 @@ module Ossy
|
|
34
34
|
def call(config_path:, output_path:, template_path:, data_path: nil)
|
35
35
|
puts "Generating #{output_path} from #{config_path} using #{template_path}"
|
36
36
|
|
37
|
-
ctx_data = YAML.load_file(config_path)
|
37
|
+
ctx_data = YAML.load_file(config_path, permitted_classes: [Date])
|
38
38
|
template = Tilt.new(template_path)
|
39
39
|
|
40
40
|
context = Context.new(ctx_data)
|
41
41
|
|
42
42
|
if data_path
|
43
43
|
key = File.basename(data_path).gsub(".yml", "")
|
44
|
-
data = YAML.load_file(data_path)
|
44
|
+
data = YAML.load_file(data_path, permitted_classes: [Date])
|
45
45
|
|
46
46
|
context.update(key => OpenStruct.new(data))
|
47
47
|
end
|
@@ -20,7 +20,7 @@ module Ossy
|
|
20
20
|
|
21
21
|
def call(config_path:, message:)
|
22
22
|
attrs = YAML.safe_load(message)
|
23
|
-
target = YAML.load_file(config_path)
|
23
|
+
target = YAML.load_file(config_path, permitted_classes: [Date])
|
24
24
|
|
25
25
|
version = attrs["version"] || target[0]["version"]
|
26
26
|
entry = target.detect { |e| e["version"].eql?(version) } || {}
|
@@ -23,8 +23,8 @@ module Ossy
|
|
23
23
|
|
24
24
|
identifiers = opts[:identifiers].split(",").map { |s| s.split(":") }.to_h
|
25
25
|
|
26
|
-
source = YAML.load_file(source_path)
|
27
|
-
target = YAML.load_file(target_path)
|
26
|
+
source = YAML.load_file(source_path, permitted_classes: [Date])
|
27
|
+
target = YAML.load_file(target_path, permitted_classes: [Date])
|
28
28
|
|
29
29
|
output = deep_merge(source, target, identifiers)
|
30
30
|
|
@@ -42,14 +42,14 @@ module Ossy
|
|
42
42
|
def call(config_path:, output_path:, template_path:, data_path: nil)
|
43
43
|
puts "Generating #{output_path} from #{config_path} using #{template_path}"
|
44
44
|
|
45
|
-
ctx_data = YAML.load_file(config_path)
|
45
|
+
ctx_data = YAML.load_file(config_path, permitted_classes: [Date])
|
46
46
|
template = Tilt.new(template_path)
|
47
47
|
|
48
48
|
context = Context.new(ctx_data)
|
49
49
|
|
50
50
|
if data_path
|
51
51
|
key = File.basename(data_path).gsub(".yml", "")
|
52
|
-
data = YAML.load_file(data_path)
|
52
|
+
data = YAML.load_file(data_path, permitted_classes: [Date])
|
53
53
|
|
54
54
|
context.update(key => OpenStruct.new(data))
|
55
55
|
end
|
@@ -34,7 +34,7 @@ module Ossy
|
|
34
34
|
def call(source_path:, target_path:, data_file:)
|
35
35
|
puts "Compiling #{source_path} => #{target_path}"
|
36
36
|
|
37
|
-
data = YAML.load_file(data_file)
|
37
|
+
data = YAML.load_file(data_file, permitted_classes: [Date])
|
38
38
|
template = Tilt.new(source_path)
|
39
39
|
output = template.render(Context.new(data))
|
40
40
|
|
data/lib/ossy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ossy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-core
|