inplace 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/lib/inplace.rb +1 -1
  3. data/man/inplace.1 +15 -2
  4. data/test/test.sh +4 -4
  5. metadata +27 -45
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 786327740fb107fabbe2d23e24bf0e4e4187171f
4
+ data.tar.gz: 06cad1d955f5f303a67b3b5158135d1bc92d5e7f
5
+ SHA512:
6
+ metadata.gz: 8298fc6a241869726d1db407e3a2549b84a67eb5c4ba4d9081139f2a4006c2381aeb6ef8781d63a9bf79636bec49718f01a4a26a6a60e836a507e75210c5701d
7
+ data.tar.gz: 99a528503c435b21f64640e4bc18946628edbab79a685e5ad58a351246ca3bb2916485b0d97ddaa2b624ef5dd90dca0d61d3c665900c30ea8bc8927f825ea683
@@ -35,7 +35,7 @@ if RUBY_VERSION < "1.8.2"
35
35
  end
36
36
 
37
37
  module Inplace
38
- VERSION = "1.2.2"
38
+ VERSION = "1.2.3"
39
39
  end
40
40
 
41
41
  MYNAME = File.basename($0)
@@ -1,7 +1,7 @@
1
1
  .\" $Idaemons: /home/cvs/inplace/inplace.1,v 1.8 2004/04/21 13:25:51 knu Exp $
2
2
  .\" $Id$
3
3
  .\"
4
- .Dd April 7, 2004
4
+ .Dd November 22, 2012
5
5
  .Dt INPLACE 1
6
6
  .Os FreeBSD
7
7
  .Sh NAME
@@ -251,4 +251,17 @@ is specified, they will not be used.
251
251
  .Sh AUTHORS
252
252
  .An Akinori MUSHA Aq knu@iDaemons.org
253
253
  .Sh BUGS
254
- There may always be some bugs. Use at your own risk.
254
+ .Nm
255
+ cannot always preserve timestamps in full precision depending on the
256
+ ruby interpreter and the platform that
257
+ .Nm
258
+ runs on, that is, ruby 1.9 and later supports timestamps in
259
+ nanoseconds but setting file timestamps in nanosecond precision is
260
+ only possible if the platform supports
261
+ .Xr utimensat 2 .
262
+ .Pp
263
+ So, a problem can arise if the file system supports nanoseconds, like
264
+ ext4 and ZFS, but the platform does not have the system call to set
265
+ timestamps in nanoseconds, like Linux < 2.6.22, glibc < 2.6 and
266
+ .Fx ,
267
+ that the sub-microsecond part of a timestamp cannot be preserved.
@@ -97,12 +97,12 @@ cmp_file () {
97
97
  }
98
98
 
99
99
  cmp_time () {
100
- # Since Ruby's File.stat() does not obtain nanosec for the moment,
101
- # inplace(1) cannot preserve nanosec values and test(1)'s strict
102
- # nanosec-wise check does not pass..
100
+ # Use ruby to compare timestamps ignoring a sub-microsecond
101
+ # difference.
102
+
103
103
  #test ! "$1" -nt "$2" -a ! "$2" -nt "$1"
104
104
 
105
- if $ruby -e 'File.mtime(ARGV[0]) == File.mtime(ARGV[1]) or exit 1' "$1" "$2"; then
105
+ if $ruby -e 'exit !!ARGV.map{|f|m=File.mtime(f);m.to_a<<m.usec}.uniq!' "$1" "$2"; then
106
106
  debug "mtime($1) == mtime($2)"
107
107
  return 0
108
108
  else
metadata CHANGED
@@ -1,33 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: inplace
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 2
10
- version: 1.2.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.3
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Akinori MUSHA
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-03-05 00:00:00 Z
11
+ date: 2013-07-18 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
- description: A command line utility that edits files in-place through given filter commands
22
- email:
13
+ description: A command line utility that edits files in-place through given filter
14
+ commands
15
+ email:
23
16
  - knu@idaemons.org
24
- executables:
17
+ executables:
25
18
  - inplace
26
19
  extensions: []
27
-
28
20
  extra_rdoc_files: []
29
-
30
- files:
21
+ files:
31
22
  - .gitignore
32
23
  - BSDmakefile
33
24
  - Gemfile
@@ -42,36 +33,27 @@ files:
42
33
  - test/test.sh
43
34
  homepage: https://github.com/knu/inplace
44
35
  licenses: []
45
-
36
+ metadata: {}
46
37
  post_install_message:
47
38
  rdoc_options: []
48
-
49
- require_paths:
39
+ require_paths:
50
40
  - lib
51
- required_ruby_version: !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
60
- required_rubygems_version: !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- hash: 3
66
- segments:
67
- - 0
68
- version: "0"
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
69
51
  requirements: []
70
-
71
52
  rubyforge_project:
72
- rubygems_version: 1.8.15
53
+ rubygems_version: 2.0.3
73
54
  signing_key:
74
- specification_version: 3
75
- summary: Inplace(1) is a command line utility that edits files in-place through given filter commands. e.g. inplace 'sort' file1 file2 file3
76
- test_files:
55
+ specification_version: 4
56
+ summary: Inplace(1) is a command line utility that edits files in-place through given
57
+ filter commands. e.g. inplace 'sort' file1 file2 file3
58
+ test_files:
77
59
  - test/test.sh