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: b27a8531602c04573b2508782ebd73da5527b0f42a8ede22198fb43eaf311c45
4
- data.tar.gz: 67bdf754ffac3008a4c9ca22ec5f9f0ccd96a6db7400d1ee6fbad1f4458d09f4
3
+ metadata.gz: a5c687dc7cca174381ce1eec36f7c1b4598ac627276b760fbfe2621bd0b908c6
4
+ data.tar.gz: 89fd2699ac7f18642c01b6b5c5f83436dc45bed6e6083cebe14e2b66a3796e97
5
5
  SHA512:
6
- metadata.gz: 35578fc5dd5b7725a6d2bf97df85ee3c731c1af8011d1b7637dd2ad7c9540480f782a48d00a7736999e5ba5f73b29b0ff05a9f31bd9338c7e43c50c6bc659132
7
- data.tar.gz: 1e57e21768030f7731c9d61aa67b23ef30e5d26b34e6fa427169438b346daade5968b56546fd5d14228aae08c4c81c8da3e26d0e597789c6a8750454f71cbb25
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ossy
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
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.0
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-23 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-core