autobuild 1.5.10 → 1.5.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.txt +4 -0
- data/lib/autobuild.rb +1 -1
- data/lib/autobuild/timestamps.rb +17 -4
- metadata +6 -6
data/Changes.txt
CHANGED
data/lib/autobuild.rb
CHANGED
data/lib/autobuild/timestamps.rb
CHANGED
@@ -58,6 +58,17 @@ module Autobuild
|
|
58
58
|
return File.mtime(stampfile)
|
59
59
|
end
|
60
60
|
|
61
|
+
def self.hires_modification_time?
|
62
|
+
if @hires_modification_time.nil?
|
63
|
+
Tempfile.open('test') do |io|
|
64
|
+
io.flush
|
65
|
+
p_time = File.mtime(io.path)
|
66
|
+
@hires_modification_time = (p_time.tv_usec != 0)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
@hires_modification_time
|
70
|
+
end
|
71
|
+
|
61
72
|
def self.touch_stamp(stampfile)
|
62
73
|
puts "Touching #{stampfile}" if Autobuild.debug
|
63
74
|
dir = File.dirname(stampfile)
|
@@ -68,10 +79,12 @@ module Autobuild
|
|
68
79
|
end
|
69
80
|
FileUtils.touch(stampfile)
|
70
81
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
82
|
+
if !hires_modification_time?
|
83
|
+
# File modification times on most Unix filesystems have a granularity of
|
84
|
+
# one second, so we (unfortunately) have to sleep 1s to make sure that
|
85
|
+
# time comparisons will work as expected.
|
86
|
+
sleep(1)
|
87
|
+
end
|
75
88
|
end
|
76
89
|
end
|
77
90
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 1.5.
|
8
|
+
- 11
|
9
|
+
version: 1.5.11
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sylvain Joyeux
|
@@ -81,8 +81,8 @@ dependencies:
|
|
81
81
|
segments:
|
82
82
|
- 2
|
83
83
|
- 0
|
84
|
-
-
|
85
|
-
version: 2.0.
|
84
|
+
- 4
|
85
|
+
version: 2.0.4
|
86
86
|
type: :development
|
87
87
|
version_requirements: *id005
|
88
88
|
- !ruby/object:Gem::Dependency
|
@@ -95,8 +95,8 @@ dependencies:
|
|
95
95
|
segments:
|
96
96
|
- 2
|
97
97
|
- 6
|
98
|
-
-
|
99
|
-
version: 2.6.
|
98
|
+
- 1
|
99
|
+
version: 2.6.1
|
100
100
|
type: :development
|
101
101
|
version_requirements: *id006
|
102
102
|
description: |-
|