infopark-user_io 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: 9d45c587bf6ab15eef4fab0924276304b61a98bc
4
- data.tar.gz: 5b4aabdf14f9c312287b03db75edf79d65dbaf11
3
+ metadata.gz: 0c0b27e597598c57deeba02fef2b045104d92dd9
4
+ data.tar.gz: 57ef6bcf6cbe17dc10bd6a9bdac75e12d0be4d9d
5
5
  SHA512:
6
- metadata.gz: e708ecc58334220947fde93eb3a3b714c367fa28a1c517f28db3b08846ca92fa2b083f917c11f464cf6a481ffa28418a6344dd27a49431688763d816c3c3cb93
7
- data.tar.gz: a9c0d8132c59c3b6656fdb7540b170b97e885d4d886c896061b203f604202a353bf905ae317bcbe85612e571c3cb85453ee29bb03e132870879176f8e43fb5da
6
+ metadata.gz: bda30a830120f01ebd1d6ae6845c44bbfe1f765d15e8b9d6c68581554a87403f1f38965c4e785f82113a7c09a167f9aaac1b3249b8b296c522ce1db313b9aea4
7
+ data.tar.gz: 0e38fbc1d34b2adf5617160ad233ecef85193c42f4a5a51b2a2eeb6c0635c227f71bfe1fa51cd0257d8a783b8c1ebb1f4cd3020c27879bcace48ee3b0f581733
@@ -183,7 +183,7 @@ class UserIO
183
183
  editor = ENV['EDITOR'] or raise MissingEnv, "No EDITOR specified."
184
184
 
185
185
  filename ||= Tempfile.new("").path
186
- if template && File.empty?(filename)
186
+ if template && (!File.exists?(filename) || File.empty?(filename))
187
187
  File.write(filename, template)
188
188
  end
189
189
 
@@ -1,5 +1,5 @@
1
1
  module Infopark
2
2
  class UserIO
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark-user_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilo Prütz