touch_erb 0.4.1 → 0.4.2

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: 43b83ecfab130e38db23c0fe1c3caa436f02980b154cd4d44bb468ef2c37a490
4
- data.tar.gz: 982c4e2f08371f2542759c93920f86557badd1bb02c8641547a838b70791e9f0
3
+ metadata.gz: dd126b3c5f6e0917ce7359274f1324b009c1bbac1604d3dadc8bdce3101510fd
4
+ data.tar.gz: 93faf419c964000ecc76ead5373583ca1a738a34a2ef8320520e3ba410de5d62
5
5
  SHA512:
6
- metadata.gz: 9073d819b42635dd2f87e477c113192dc69e78d885d5559475d3e8feeca6c2ae1a943d725a6cf4ff4699628fb5362a17f19e1d32fbb918a3ed1f52eff9057986
7
- data.tar.gz: 66f4f87bd136f97a5a9420b2724360db8a55416ce03d1b529a57b0c1f9d840f00156f1ed2bcafae6a745b6fce6c4a785b26a545cae7756f4bf875ff8b472c1f7
6
+ metadata.gz: 7ea0a0cba27b545d49bae11be006db7d41dd146171e56eeea65d76928484f92e82f95990018100a106da9151f1284da215542ce5fa7c46e60d92b445c7d6e099
7
+ data.tar.gz: b128ffa96ba4306b7ebc5c1e427157b8cdaf7cd80fccdfef28113ef9c04b868b8efeb74ff6bcdb87948c9d2ae2130bc9be674a27a18c360bf66df10130db9271
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- touch_erb (0.4.1)
4
+ touch_erb (0.4.2)
5
5
  activesupport
6
6
  thor (~> 0.20)
7
7
 
data/lib/touch_erb/cli.rb CHANGED
@@ -37,11 +37,12 @@ module TouchErb
37
37
  invoke :help
38
38
  return
39
39
  end
40
- file_name = output_name || template_name
40
+ write_file_name = output_name || template_name
41
+ file_name = File.basename(write_file_name, '.*')
41
42
  if FileTest.exists?(file_name)
42
43
  FileUtils.touch(file_name)
43
44
  else
44
- File.open(file_name, 'w') do |f|
45
+ File.open(write_file_name, 'w') do |f|
45
46
  f.write(ERB.new(@local_template_dir.find(template_name) || @template_dir.find(template_name) || '', nil, '%<>').result(binding))
46
47
  end
47
48
  end
@@ -1,3 +1,3 @@
1
1
  module TouchErb
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: touch_erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - himanoa