nanoc-tidy.rb 0.6.0 → 0.6.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
  SHA256:
3
- metadata.gz: f2a117a2fa83b551326ed6ba05761c1744f182144b2980cd8246757853c67ecc
4
- data.tar.gz: 362656c6f68fe0791665ecffaa9606cebeb2950eabe08db6f98f3fe8c1f32d84
3
+ metadata.gz: ee29f7af6d3dbaf443aa2e35e52e696f184481641a493a29292d110760776c07
4
+ data.tar.gz: c42f3696900ea751574072d35a0005ed4dd2442cde77640e7a56a23f9794a500
5
5
  SHA512:
6
- metadata.gz: 8c19227fa2c5b0386bfeb148b6ecbc664d42847dc1267370228e68139318749ad53c3ec0b6429f175eb77c04540caa388510ecb4920c50e6846c82c40921389d
7
- data.tar.gz: aa0327d39187dee54a4cc3dd356345b2ebaafd4167e46a83698b275c2e0eaffb4cb6d406dba49ec07490a89f6bc7c6b7c76a63a3609b7762a5f351f76f8bcdb3
6
+ metadata.gz: bb1ad99a6c41a010f04d96483aac6cec646b153aeaaa0f827e2c2f176e5d0890435021a301e434600ab37623e5b824db75ce41826bde6b864a2da76a8e5be4ee
7
+ data.tar.gz: 648fa0abae522cf95225adc508991a7f5698cc4573e3d1cafd56a211fec6376a460c800142521bfe1ca4d400657b2b48fd96cf0074fdcaf2999a35d88259479f
@@ -39,8 +39,6 @@ module Nanoc::Tidy
39
39
  msgs = [err, out].map do
40
40
  FileUtils.touch(_1)
41
41
  [_1.gsub(Dir.getwd, ''), ":", File.binread(_1)].join
42
- ensure
43
- FileUtils.rm(_1)
44
42
  end.join("\n")
45
43
  raise Error,
46
44
  "#{File.basename(exe)} exited unsuccessfully " \
@@ -50,6 +48,10 @@ module Nanoc::Tidy
50
48
  ")" \
51
49
  "\n#{msgs}",
52
50
  []
51
+ ensure
52
+ [err, out]
53
+ .select { File.exist?(_1) }
54
+ .each { FileUtils.rm(_1) }
53
55
  end
54
56
  end
55
57
  end
@@ -1,5 +1,5 @@
1
1
  module Nanoc
2
2
  module Tidy
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-tidy.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'