config_templates 0.0.2 → 0.0.3

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: 7c1b9ff19c62bfefb3c61fd89ef48b2ff3a5feb6
4
- data.tar.gz: 7725b602720e3a34611bdc7b586c65951a6afa04
3
+ metadata.gz: fc8b11d7ca7acb11e83e9287eec0bc0cf8cf8b16
4
+ data.tar.gz: d37ad35203202dfcb1661fdc2335662dece16d0d
5
5
  SHA512:
6
- metadata.gz: 94394e6eacd587051745ebd22e0c565f0239e00c2061b419e686c9723ae63f1e39db6f858476b01bed3ac7adaad3337827b97b7757917d14549ab0c7c80604e4
7
- data.tar.gz: a93028e855f6bb058aec60e4b23da977ad106926eda030b531d35dbef45a76d31a423d069b74cb5f92a5285d7fa0f305e7d56a185d73e161f1d7ba062936c207
6
+ metadata.gz: ad630cea888a5a254ed4d77344617c985b5f2664e68e610c4cf52b2ff6647db5860469ab9c7c053241b6cf2147fd217c785fb80f92925419ae40fb3eb8a01f33
7
+ data.tar.gz: b1023f9a1b8c27706138eff79eafe328b8e2012e98f4bf51c0dc3c430374074b6f458cbd8e8679f35705425e9e5d4394ed269333dd377aa2a2def3ed849c1a55
@@ -3,5 +3,9 @@ module ConfigTemplates::Engines
3
3
  def evaluate(template, context)
4
4
  ::ERB.new(template).result(context.instance_eval { binding })
5
5
  end
6
+
7
+ def prepare_file_name(file_name)
8
+ file_name.sub '.erb', ''
9
+ end
6
10
  end
7
11
  end
@@ -3,5 +3,9 @@ module ConfigTemplates::Engines
3
3
  def evaluate(template, _)
4
4
  template
5
5
  end
6
+
7
+ def prepare_file_name(file_name)
8
+ file_name
9
+ end
6
10
  end
7
11
  end
@@ -14,10 +14,10 @@ module ConfigTemplates::Models
14
14
  end
15
15
 
16
16
  def destination
17
- ::File.join(
17
+ engine.prepare_file_name ::File.join(
18
18
  @config.destination_path,
19
19
  @config.stage.to_s,
20
- @path.sub(@config.templates_path, '').sub(extension, '')
20
+ @path.sub(@config.templates_path, '')
21
21
  )
22
22
  end
23
23
 
@@ -1,3 +1,3 @@
1
1
  module ConfigTemplates
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - g.ivanov
@@ -96,6 +96,7 @@ files:
96
96
  - lib/config_templates/repositories/validators.rb
97
97
  - lib/config_templates/validators/composite.rb
98
98
  - lib/config_templates/version.rb
99
+ - spec/fixtures/dest/production/kapacitor/config
99
100
  - spec/fixtures/settings/settings.production.yml
100
101
  - spec/fixtures/settings/settings.yml
101
102
  - spec/fixtures/src/kapacitor/config.erb
@@ -126,6 +127,7 @@ signing_key:
126
127
  specification_version: 4
127
128
  summary: config_templates
128
129
  test_files:
130
+ - spec/fixtures/dest/production/kapacitor/config
129
131
  - spec/fixtures/src/kapacitor/config.erb
130
132
  - spec/fixtures/settings/settings.yml
131
133
  - spec/fixtures/settings/settings.production.yml