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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b4ab04343b793ea9fa4b2854f52c36fe85cd16ca
4
- data.tar.gz: bd6fbfb6bfc8b808c996cde44f082fbe51863bcb
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWY1YWRjODBiOTQ0NTY0MGJiZTRlYWEyNDk4MTVhOWE0ZDIzODRiMw==
5
+ data.tar.gz: !binary |-
6
+ YzJkMGUzMGM5MzljNjAwMWEyMjYxM2QyNjIyOGEyOWQ4MzZhMzc0Mg==
5
7
  SHA512:
6
- metadata.gz: b811768447f57e58020a1cb8b26193d04c6324351295210d81fb7e89ca6db0deb3e34c2e03bcedbcac54ebe9c160bf2435b96dc4a29e555b8be2fb169e1f3648
7
- data.tar.gz: 8a82fffa32cce8e4386d7d33888731309642cbe4b453b1e8f6d20ad18eb0feb65425769b8da6925447ecb82ec68390e92b91c092e3d02d5928b0f45596554b9a
8
+ metadata.gz: !binary |-
9
+ MDllMDhkOGRlNjNmOTc2YmU3ZWE3MmNkMjRhZjNkNjkzYTgwZTk1MTZlOWFl
10
+ ZTZkNTYxZjc0NTc1ZTQ1YmE3ODliZDY5NDVkNDVlN2EzMGExNjNmMDUzMGQ0
11
+ ZWYyODZhNDI0NDAzYWFkNWVmYTEwMGZkNjQxYWQ5OWE3Mzc5ZjQ=
12
+ data.tar.gz: !binary |-
13
+ YjM4MThiMjFiYzgzMTQ5ZjJjODk4MGRkYmEyOWViOTcyNzc2NWUxY2JiYzZl
14
+ OTQ1MzczMGYxMTlmZTQ1NDNlZWFiMzY0ZjJkYWFhNGVmYzA3MjRiOTYyMWI5
15
+ ZTZmMjJkZDM5ZGMyNTYxNDAxMzdmNWQ5ZmI3NTU1YjM1NzA1Y2Q=
@@ -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", "display contents of archive") do |v|
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", "extract file(s) from the archive") do |v|
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", "print file(s) found in the archive") do |v|
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", "be verbose") do |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[:r]
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
 
@@ -26,4 +26,3 @@ run_test("-p test.ar")
26
26
  run_test("-pv test.ar")
27
27
  run_test("-x test.ar")
28
28
  run_test("-xv test.ar")
29
- run_test("-r test.ar myfile")
@@ -1,5 +1,5 @@
1
1
  module Archive
2
2
  module Ar
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -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}100664 5 `\n" }
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.5
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-08 00:00:00.000000000 Z
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
- - ".gitignore"
64
- - ".rspec"
65
- - ".travis.yml"
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: