dumb_generator 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78deea2ed941c4ac7cb3451f993e907044b371163846298d75a408af3266db03
4
- data.tar.gz: a7502655cf833f0597051eaa3c255ebe9a07e25301bca89b2492a67422c8997f
3
+ metadata.gz: 816d384dc3e79d199bfcdc02f0addd935dc63849746c081b5c91fe523c6e60b8
4
+ data.tar.gz: 2b95bf95fdbbf7206189e0d821d4d278779ea03a78a65e8518df1d2fd313f19a
5
5
  SHA512:
6
- metadata.gz: 81d02d4df7662ca774f2af480a2811465f7667297ba35cc462dc5065662ce3086ceb10f3273d276ce23faabfe91789410645047f2e6279af8bafd66b1207cb7e
7
- data.tar.gz: e2af15f4e0934c31719d3704d655f4f9098ece606669a7896e318a7aab2ed45452197636f04313f12eabf6d5ba8e8162e311bf5016bdb351fbc138ad86a813be
6
+ metadata.gz: 265767f2f313393b0f7d7bfdd7eef4a614fbf989e08b3a38debbb98cdeb591c895395ffe47fc780047abd90f7b25876c5e9b8483e6aafd31cc0e7b5e7a5615c4
7
+ data.tar.gz: 752d3c5ff451fc7076e9b2147ee4417478438829a7ae523e05fdf9d61ebb790a0f7fd15f11e5093b03289f56e6a10bd9c0e6dfae5a4d70ab7895041062208dc5
@@ -20,15 +20,20 @@ module Dumb
20
20
  dgen_source_directory = root['dgen_source_directory']
21
21
  link_destination_directory = root['link_destination_directory']
22
22
  links = root['links']
23
- template_path = config[:template_path]
23
+ template_full_path = config[:template_path]
24
24
 
25
+
26
+
25
27
  links.each do |link|
26
28
  link.transform_keys!(&:to_sym)
27
-
28
- file_path = template_path + '/' + link_destination_directory + '/' + link[:to_destination_file]
29
- template_content = File.read(dgen_source_directory + '/' + link[:dgen_template])
30
-
29
+
30
+ file_path = template_full_path + '/' + link_destination_directory + '/' + link[:to_destination_file]
31
+ template_path = template_full_path + '/' + dgen_source_directory + '/' + link[:dgen_template]
32
+
31
33
  parsed_path = PathParser.new(file_path, variables).parse
34
+ parsed_templete_path = PathParser.new(template_path, variables).parse
35
+
36
+ template_content = File.read(parsed_templete_path)
32
37
  parsed_content = ContentParser.new(template_content, variables).parse
33
38
 
34
39
  FileCreator.new(parsed_path, parsed_content).execute
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumb_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristian Cosneanu