From f0ad81b6e3c05f89466f3cfbee32653156873fe4 Mon Sep 17 00:00:00 2001 From: Kyungmin Lee Date: Tue, 9 May 2017 03:22:55 -0400 Subject: [PATCH] tmpwatch: update URL, fix test (#13386) --- Formula/tmpwatch.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Formula/tmpwatch.rb b/Formula/tmpwatch.rb index c8edc69574..63699eb5f5 100644 --- a/Formula/tmpwatch.rb +++ b/Formula/tmpwatch.rb @@ -1,7 +1,7 @@ class Tmpwatch < Formula desc "Find and remove files not accessed in a specified time" - homepage "https://fedorahosted.org/tmpwatch/" - url "https://fedorahosted.org/releases/t/m/tmpwatch/tmpwatch-2.11.tar.bz2" + homepage "https://pagure.io/tmpwatch" + url "https://releases.pagure.org/tmpwatch/tmpwatch-2.11.tar.bz2" sha256 "93168112b2515bc4c7117e8113b8d91e06b79550d2194d62a0c174fe6c2aa8d4" bottle do @@ -20,10 +20,12 @@ class Tmpwatch < Formula end test do - touch %w[a b c] - ten_minutes_ago = Time.new - 600 - File.utime(ten_minutes_ago, ten_minutes_ago, "a") - system "#{sbin}/tmpwatch", "2m", testpath - assert_equal %w[b c], Dir["*"] + mkdir "test" do + touch %w[a b c] + ten_minutes_ago = Time.new - 600 + File.utime(ten_minutes_ago, ten_minutes_ago, "a") + system "#{sbin}/tmpwatch", "2m", Pathname.pwd + assert_equal %w[b c], Dir["*"] + end end end