archive-ar 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/archive-ar.gemspec +1 -1
- data/bin/ar.rb +16 -14
- data/ext/integration.rb +0 -1
- data/lib/archive/ar/version.rb +1 -1
- data/spec/lib/archive/ar/format_spec.rb +3 -3
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWY1YWRjODBiOTQ0NTY0MGJiZTRlYWEyNDk4MTVhOWE0ZDIzODRiMw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzJkMGUzMGM5MzljNjAwMWEyMjYxM2QyNjIyOGEyOWQ4MzZhMzc0Mg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MDllMDhkOGRlNjNmOTc2YmU3ZWE3MmNkMjRhZjNkNjkzYTgwZTk1MTZlOWFl
|
10
|
+
ZTZkNTYxZjc0NTc1ZTQ1YmE3ODliZDY5NDVkNDVlN2EzMGExNjNmMDUzMGQ0
|
11
|
+
ZWYyODZhNDI0NDAzYWFkNWVmYTEwMGZkNjQxYWQ5OWE3Mzc5ZjQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjM4MThiMjFiYzgzMTQ5ZjJjODk4MGRkYmEyOWViOTcyNzc2NWUxY2JiYzZl
|
14
|
+
OTQ1MzczMGYxMTlmZTQ1NDNlZWFiMzY0ZjJkYWFhNGVmYzA3MjRiOTYyMWI5
|
15
|
+
ZTZmMjJkZDM5ZGMyNTYxNDAxMzdmNWQ5ZmI3NTU1YjM1NzA1Y2Q=
|
data/archive-ar.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Joshua B. Bussdieker"]
|
10
10
|
spec.email = ["jbussdieker@gmail.com"]
|
11
11
|
spec.summary = %q{Simple AR file functions}
|
12
|
-
spec.homepage = ""
|
12
|
+
spec.homepage = "https://github.com/jbussdieker/ruby-archive-ar"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
data/bin/ar.rb
CHANGED
@@ -28,33 +28,35 @@ options = {}
|
|
28
28
|
OptionParser.new do |opts|
|
29
29
|
opts.banner = "Usage: archive-ar [options]"
|
30
30
|
|
31
|
-
opts.on("-t", "
|
31
|
+
opts.on("-t", "List the specified files in the order in which they appear in the archive, each on a
|
32
|
+
separate line. If no files are specified, all files in the archive are listed.") do |v|
|
32
33
|
options[:t] = v
|
33
34
|
end
|
34
35
|
|
35
|
-
opts.on("-x", "
|
36
|
+
opts.on("-x", "Extract the specified archive members into the files named by the command line argu-
|
37
|
+
ments. If no members are specified, all the members of the archive are extracted into
|
38
|
+
the current directory.
|
39
|
+
|
40
|
+
If the file does not exist, it is created; if it does exist, the owner and group will
|
41
|
+
be unchanged. The file access and modification times are the time of the extraction
|
42
|
+
(but see the -o option). The file permissions will be set to those of the file when
|
43
|
+
it was entered into the archive; this will fail if the user is not the owner of the
|
44
|
+
extracted file or the super-user.") do |v|
|
36
45
|
options[:x] = v
|
37
46
|
end
|
38
47
|
|
39
|
-
opts.on("-p", "
|
48
|
+
opts.on("-p", "Write the contents of the specified archive files to the standard output. If no files
|
49
|
+
are specified, the contents of all the files in the archive are written in the order
|
50
|
+
they appear in the archive.") do |v|
|
40
51
|
options[:p] = v
|
41
52
|
end
|
42
53
|
|
43
|
-
opts.on("-v", "
|
54
|
+
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
|
44
55
|
options[:verbose] = v
|
45
56
|
end
|
46
|
-
|
47
|
-
opts.on("-r", "replace existing or insert new file(s) into the archive") do |v|
|
48
|
-
options[:r] = v
|
49
|
-
end
|
50
57
|
end.parse!
|
51
58
|
|
52
|
-
if options[:
|
53
|
-
raise "two different operation options specified" if options[:t]
|
54
|
-
raise "two different operation options specified" if options[:x]
|
55
|
-
raise "two different operation options specified" if options[:p]
|
56
|
-
|
57
|
-
elsif options[:p]
|
59
|
+
if options[:p]
|
58
60
|
raise "illegal option combination for -p" if options[:t]
|
59
61
|
raise "illegal option combination for -p" if options[:x]
|
60
62
|
|
data/ext/integration.rb
CHANGED
data/lib/archive/ar/version.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
1
|
+
require 'spec_helper'
|
3
2
|
describe Archive::Ar::Format do
|
4
3
|
describe "read_global_header" do
|
5
4
|
let(:read_global_header) { Archive::Ar::Format.read_global_header(io) }
|
@@ -25,9 +24,10 @@ describe Archive::Ar::Format do
|
|
25
24
|
let(:timestamp) { "%-12s" % File.mtime(file).to_i }
|
26
25
|
let(:owner) { "%-6s" % File.stat(file).uid }
|
27
26
|
let(:group) { "%-6s" % File.stat(file).gid }
|
27
|
+
let(:mode) { "%-8s" % File.stat(file).mode.to_s(8) }
|
28
28
|
let(:subject) { Archive::Ar::Format.build_header(file) }
|
29
29
|
|
30
|
-
it { should == "file #{timestamp}#{owner}#{group}
|
30
|
+
it { should == "file #{timestamp}#{owner}#{group}#{mode}5 `\n" }
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "read_header" do
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archive-ar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua B. Bussdieker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description:
|
@@ -60,9 +60,9 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
63
|
+
- .gitignore
|
64
|
+
- .rspec
|
65
|
+
- .travis.yml
|
66
66
|
- Gemfile
|
67
67
|
- Guardfile
|
68
68
|
- LICENSE.txt
|
@@ -87,7 +87,7 @@ files:
|
|
87
87
|
- spec/lib/archive/ar_spec.rb
|
88
88
|
- spec/spec_helper.rb
|
89
89
|
- tmp/.gitkeep
|
90
|
-
homepage:
|
90
|
+
homepage: https://github.com/jbussdieker/ruby-archive-ar
|
91
91
|
licenses:
|
92
92
|
- MIT
|
93
93
|
metadata: {}
|
@@ -97,12 +97,12 @@ require_paths:
|
|
97
97
|
- lib
|
98
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- -
|
100
|
+
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - ! '>='
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
@@ -120,4 +120,3 @@ test_files:
|
|
120
120
|
- spec/lib/archive/ar/writer_spec.rb
|
121
121
|
- spec/lib/archive/ar_spec.rb
|
122
122
|
- spec/spec_helper.rb
|
123
|
-
has_rdoc:
|