tarchiver 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +35 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +42 -0
- data/LICENSE +22 -0
- data/README.md +41 -0
- data/Rakefile +10 -0
- data/lib/tarchiver/archiver.rb +89 -0
- data/lib/tarchiver/compressor.rb +13 -0
- data/lib/tarchiver/compressors/gzip.rb +27 -0
- data/lib/tarchiver/constants.rb +44 -0
- data/lib/tarchiver/helpers.rb +67 -0
- data/lib/tarchiver/tarballer.rb +41 -0
- data/lib/tarchiver/version.rb +3 -0
- data/lib/tarchiver.rb +7 -0
- data/spec/archiver_spec.rb +215 -0
- data/spec/fixtures/test_dir/.secret.yml +1 -0
- data/spec/fixtures/test_dir/chapters/prematerial.txt +39 -0
- data/spec/fixtures/test_dir/deconstructions.txt +83 -0
- data/spec/fixtures/test_dir/follow-rename.txt +1 -0
- data/spec/fixtures/test_dir/homer-excited.png +0 -0
- data/spec/fixtures/test_dir/materialist.txt +40 -0
- data/spec/fixtures/test_dir/postpatriarchialist.txt +79 -0
- data/spec/spec_helper.rb +9 -0
- data/tarchiver.gemspec +25 -0
- metadata +120 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6180fe43dfd6909c32975d09b89a9a33a18d45d7
|
4
|
+
data.tar.gz: f36f89ad4900c7632e497dd567b162e16413f2d8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 43ad4c3a938a306da6ac64f1bfdc7ac896dbb1be8a43745f14ee5387a259e7b5e9094903369e60fe9f0cd1cd4a2c6b3f56c23e6f7c81b3fa5136ce1119d9983a
|
7
|
+
data.tar.gz: 4da6a0c535365172ef2168676f8d648ed7467dc3301fc05c1a0b4a68a938b065a89e0c5e7efe005972c47721c5ed817aa4272b9901e0d333ab31290c3d8318a8
|
data/.gitignore
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/vendor/bundle
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
# Gemfile.lock
|
31
|
+
# .ruby-version
|
32
|
+
# .ruby-gemset
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
tarchiver (0.0.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.2.5)
|
10
|
+
docile (1.1.5)
|
11
|
+
json (1.8.3)
|
12
|
+
json (1.8.3-java)
|
13
|
+
rake (10.4.2)
|
14
|
+
rspec (3.3.0)
|
15
|
+
rspec-core (~> 3.3.0)
|
16
|
+
rspec-expectations (~> 3.3.0)
|
17
|
+
rspec-mocks (~> 3.3.0)
|
18
|
+
rspec-core (3.3.2)
|
19
|
+
rspec-support (~> 3.3.0)
|
20
|
+
rspec-expectations (3.3.1)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.3.0)
|
23
|
+
rspec-mocks (3.3.2)
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
+
rspec-support (~> 3.3.0)
|
26
|
+
rspec-support (3.3.0)
|
27
|
+
simplecov (0.10.0)
|
28
|
+
docile (~> 1.1.0)
|
29
|
+
json (~> 1.8)
|
30
|
+
simplecov-html (~> 0.10.0)
|
31
|
+
simplecov-html (0.10.0)
|
32
|
+
|
33
|
+
PLATFORMS
|
34
|
+
java
|
35
|
+
ruby
|
36
|
+
|
37
|
+
DEPENDENCIES
|
38
|
+
bundler (~> 1.7)
|
39
|
+
rake (~> 10.0)
|
40
|
+
rspec
|
41
|
+
simplecov
|
42
|
+
tarchiver!
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Bart Kamphorst
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/bartkamphorst/tarchiver.svg?branch=master)](https://travis-ci.org/bartkamphorst/tarchiver)
|
2
|
+
|
3
|
+
# Tarchiver
|
4
|
+
|
5
|
+
A high-level tar and tgz archiver.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'tarchiver'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install tarchiver
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
### Archiving
|
25
|
+
```ruby
|
26
|
+
Tarchiver::Archiver.archive(archive_dir) # outputs archive to working directory
|
27
|
+
Tarchiver::Archiver.archive(archive_dir, output_dir, options)
|
28
|
+
```
|
29
|
+
### Unarchiving
|
30
|
+
```ruby
|
31
|
+
Tarchiver::Archiver.unarchive(archive_path) #outputs output to working directory
|
32
|
+
Tarchiver::Archiver.unarchive(archive_path, unpack_path, options)
|
33
|
+
```
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
1. Fork it ( https://github.com/bartkamphorst/tarchiver/fork )
|
38
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
40
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
41
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'rubygems/package'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
module Tarchiver
|
5
|
+
class Archiver
|
6
|
+
|
7
|
+
def self.archive(archive_input, output_directory='.', opts={})
|
8
|
+
messages = Tarchiver::Constants::MESSAGES
|
9
|
+
# Sanitize input
|
10
|
+
options = Tarchiver::Helpers.sanitize_options(Tarchiver::Constants::DEFAULT_ARCHIVE_OPTIONS.merge(opts))
|
11
|
+
archive_name, relative_to, to_archive = Tarchiver::Helpers.sanitize_input(archive_input, options)
|
12
|
+
|
13
|
+
return Tarchiver::Helpers.terminate(nil, options) unless archive_name
|
14
|
+
archive_path = File.join(output_directory, archive_name)
|
15
|
+
|
16
|
+
# Prepare for tarballing
|
17
|
+
puts messages[:start_archiving] if options[:verbose]
|
18
|
+
puts messages[:start_tarballing] if options[:verbose]
|
19
|
+
Tarchiver::Helpers.prepare_for_tarchiving(archive_path)
|
20
|
+
tar_path = Tarchiver::Tarballer.tar(to_archive, archive_name, relative_to, output_directory, options)
|
21
|
+
|
22
|
+
# Return on failure
|
23
|
+
return Tarchiver::Helpers.terminate(nil, options) unless tar_path
|
24
|
+
|
25
|
+
puts messages[:done] if options[:verbose]
|
26
|
+
|
27
|
+
# Intermittent cleanup
|
28
|
+
Tarchiver::Helpers.cleanup(archive_input, nil, options)
|
29
|
+
|
30
|
+
# Return if no compression was requested
|
31
|
+
|
32
|
+
return tar_path if options[:archive_type] == :tar
|
33
|
+
|
34
|
+
# Compress
|
35
|
+
puts messages[:start_compressing] if options[:verbose]
|
36
|
+
compressed_archive_path = options[:compressor].compress(archive_path, tar_path, options)
|
37
|
+
puts messages[:done] if options[:verbose]
|
38
|
+
|
39
|
+
# Cleanup
|
40
|
+
puts messages[:start_cleaning] if options[:verbose]
|
41
|
+
Tarchiver::Helpers.cleanup(archive_input, tar_path, options)
|
42
|
+
puts messages[:done] if options[:verbose]
|
43
|
+
puts messages[:completed_archiving] if options[:verbose]
|
44
|
+
|
45
|
+
# Return
|
46
|
+
File.exists?(compressed_archive_path) ? compressed_archive_path : Tarchiver::Helpers.terminate(nil, options)
|
47
|
+
end # archive
|
48
|
+
|
49
|
+
def self.unarchive(archive, output_directory='.', opts={})
|
50
|
+
options = Tarchiver::Constants::DEFAULT_UNARCHIVE_OPTIONS.merge(opts)
|
51
|
+
archive_type = Tarchiver::Helpers.determine_archive_type(archive)
|
52
|
+
begin
|
53
|
+
io = case archive_type
|
54
|
+
when :tar
|
55
|
+
File.open(archive)
|
56
|
+
when :compressed
|
57
|
+
options[:compressor].open(archive)
|
58
|
+
end
|
59
|
+
|
60
|
+
Gem::Package::TarReader.new(io) do |tar|
|
61
|
+
tar.each do |entry|
|
62
|
+
dir = File.join(output_directory, File.dirname(entry.full_name))
|
63
|
+
path = File.join(output_directory, entry.full_name)
|
64
|
+
if entry.directory?
|
65
|
+
FileUtils.mkdir_p(dir, mode: entry.header.mode, verbose: false)
|
66
|
+
elsif entry.header.typeflag == '2' #Symlink!
|
67
|
+
File.symlink(entry.header.linkname, path)
|
68
|
+
elsif entry.file?
|
69
|
+
FileUtils.mkdir_p(dir, verbose: false) unless File.directory?(dir)
|
70
|
+
File.open(path, "wb") do |file|
|
71
|
+
while buffer = entry.read(options[:blocksize])
|
72
|
+
file.write(buffer)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
FileUtils.chmod(entry.header.mode, path, verbose: false)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
File.delete(archive) if File.exists?(archive) && options[:delete_input_on_success]
|
80
|
+
output_directory
|
81
|
+
rescue => error
|
82
|
+
puts "#{messages[:failed_archiving]}\n#{error.message}" if options[:verbose]
|
83
|
+
Tarchiver::Helpers.terminate(error, options)
|
84
|
+
end
|
85
|
+
end #unarchive
|
86
|
+
|
87
|
+
end # Archiver
|
88
|
+
|
89
|
+
end # Tarchiver
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Tarchiver
|
2
|
+
class Gzipper < Tarchiver::Compressor
|
3
|
+
|
4
|
+
def self.compress(archive_path, tar_path, options)
|
5
|
+
tgz_path = "#{archive_path}.tgz"
|
6
|
+
begin
|
7
|
+
Zlib::GzipWriter.open(tgz_path) do |gz|
|
8
|
+
File.open(tar_path, "rb") do |tar|
|
9
|
+
while buffer = tar.read(options[:blocksize])
|
10
|
+
gz.write(buffer)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
rescue => error
|
15
|
+
puts "GZip could not complete zipping for the following reason:\n#{error.message}" if options[:verbose]
|
16
|
+
return Tarchiver::Helpers.terminate(error, options)
|
17
|
+
end
|
18
|
+
tgz_path
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.open(path)
|
22
|
+
Zlib::GzipReader.open(path)
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Tarchiver
|
2
|
+
|
3
|
+
class Constants
|
4
|
+
|
5
|
+
BLOCKSIZE_TO_READ = 1024 * 1000
|
6
|
+
|
7
|
+
EXTENSIONS = [:tar, :tgz]
|
8
|
+
|
9
|
+
DEFAULT_ARCHIVE_NAME = 'archive'
|
10
|
+
|
11
|
+
MESSAGES = {
|
12
|
+
input_not_sane: 'Could not make sense of the input. Please check your settings carefully and try again.',
|
13
|
+
start_archiving: "Starting archiving...",
|
14
|
+
start_tarballing: "Creating tar...",
|
15
|
+
start_compressing: "Starting compression...",
|
16
|
+
done: "... done.",
|
17
|
+
start_cleaning: "Cleaning up...",
|
18
|
+
completed_archiving: "Archiving complete.",
|
19
|
+
failed_archiving: "Unarchiving failed for the following reason:",
|
20
|
+
}
|
21
|
+
|
22
|
+
DEFAULT_ARCHIVE_OPTIONS = {
|
23
|
+
delete_input_on_success: false,
|
24
|
+
blocksize: BLOCKSIZE_TO_READ,
|
25
|
+
verbose: false,
|
26
|
+
content_only: false,
|
27
|
+
relative_to_top_dir: true,
|
28
|
+
custom_archive_name: nil,
|
29
|
+
archive_type: :tgz,
|
30
|
+
compressor: Tarchiver::Gzipper,
|
31
|
+
add_timestamp: false,
|
32
|
+
raise_errors: false
|
33
|
+
}
|
34
|
+
|
35
|
+
DEFAULT_UNARCHIVE_OPTIONS = {
|
36
|
+
delete_input_on_success: false,
|
37
|
+
blocksize: BLOCKSIZE_TO_READ,
|
38
|
+
compressor: Tarchiver::Gzipper,
|
39
|
+
verbose: false,
|
40
|
+
raise_errors: false
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module Tarchiver
|
2
|
+
class Helpers
|
3
|
+
|
4
|
+
def self.sanitize_input(input, options)
|
5
|
+
if input.is_a? Enumerable
|
6
|
+
archive_name = self.determine_archive_name(input, :enumerable, options)
|
7
|
+
to_archive = input
|
8
|
+
relative_to = nil
|
9
|
+
elsif File.file?(input)
|
10
|
+
archive_name = self.determine_archive_name(input, :file, options)
|
11
|
+
to_archive = [input]
|
12
|
+
relative_to = File.basename(input)
|
13
|
+
elsif File.directory?(input)
|
14
|
+
archive_name = self.determine_archive_name(input, :directory, options)
|
15
|
+
to_archive = Dir.glob(File.join(input, '**', '*'), File::FNM_DOTMATCH)
|
16
|
+
relative_to = File.basename(input)
|
17
|
+
else
|
18
|
+
terminate(ArgumentError.new(Tarchiver::Constants::MESSAGES[:input_not_sane]), options)
|
19
|
+
end
|
20
|
+
return archive_name, relative_to, to_archive
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.sanitize_options(options)
|
24
|
+
# Ensure that blocksize is an integer
|
25
|
+
options[:blocksize] = Integer(options[:blocksize])
|
26
|
+
# Ensure valid archive extension
|
27
|
+
terminate(ArgumentError.new, options) unless Tarchiver::Constants::EXTENSIONS.include?(options[:archive_type])
|
28
|
+
options
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.prepare_for_tarchiving(archive_path)
|
32
|
+
FileUtils.mkdir_p(File.dirname(archive_path), verbose: false) unless File.directory?(File.dirname(archive_path))
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.determine_archive_name(input, input_type, options)
|
36
|
+
if options[:custom_archive_name]
|
37
|
+
return options[:add_timestamp] ? "#{options[:custom_archive_name]}-#{Time.now.to_i}" : options[:custom_archive_name]
|
38
|
+
end
|
39
|
+
if input_type == :enumerable
|
40
|
+
name = Tarchiver::Constants::DEFAULT_ARCHIVE_NAME
|
41
|
+
else
|
42
|
+
name = File.basename(input)
|
43
|
+
end
|
44
|
+
options[:add_timestamp] ? "#{name}-#{Time.now.to_i}" : name
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.determine_archive_type(archive)
|
48
|
+
if archive.match(/tar$/)
|
49
|
+
:tar
|
50
|
+
elsif archive.match(/gz$/)
|
51
|
+
:compressed
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.cleanup(archive_input, tar_path, options)
|
57
|
+
File.delete(tar_path) if tar_path && File.exists?(tar_path)
|
58
|
+
FileUtils.rm_rf(archive_input) if options[:delete_input_on_success]
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.terminate(error=nil, options)
|
62
|
+
raise error if error && options[:raise_errors]
|
63
|
+
nil
|
64
|
+
end
|
65
|
+
|
66
|
+
end # Helpers
|
67
|
+
end # Tarchiver
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Tarchiver
|
2
|
+
class Tarballer
|
3
|
+
|
4
|
+
def self.tar(to_archive, archive_name, relative_to, output_directory='.', options)
|
5
|
+
archive_path = File.join(output_directory, "#{archive_name}.tar")
|
6
|
+
begin
|
7
|
+
File.open(archive_path, "wb") do |file|
|
8
|
+
Gem::Package::TarWriter.new(file) do |tar|
|
9
|
+
to_archive.each do |entry|
|
10
|
+
next if entry.match(/\.+$/)
|
11
|
+
if archive_name == Tarchiver::Constants::DEFAULT_ARCHIVE_NAME || options[:relative_to_top_dir] == false
|
12
|
+
path = entry
|
13
|
+
else
|
14
|
+
path = entry.match(/#{relative_to}.*/).to_s
|
15
|
+
path = path.match(/#{relative_to}\/(.*)$/)[1] if options[:contents_only]
|
16
|
+
end
|
17
|
+
mode = File.stat(entry).mode
|
18
|
+
if File.directory?(entry)
|
19
|
+
tar.mkdir(path, mode)
|
20
|
+
else
|
21
|
+
tar.add_file(path, mode) do |io|
|
22
|
+
# Read file and write in chunks
|
23
|
+
File.open(entry, 'rb') do |file|
|
24
|
+
while buffer = file.read(options[:blocksize])
|
25
|
+
io.write(buffer)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
rescue => error
|
34
|
+
puts "Tar could not complete tarring for the following reason:\n#{error.message}" if options[:verbose]
|
35
|
+
Tarchiver::Helpers.terminate(error, options)
|
36
|
+
end
|
37
|
+
archive_path
|
38
|
+
end # tar
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
data/lib/tarchiver.rb
ADDED
@@ -0,0 +1,215 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Tarchiver::Archiver do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@tmp_dir = Dir.mktmpdir("tarchiver-rspec")
|
7
|
+
@unpack_path = File.join(@tmp_dir, 'unpacked')
|
8
|
+
FileUtils.mkdir_p(@unpack_path)
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:test_dir_src) {File.join(File.dirname(__FILE__), 'fixtures', 'test_dir')}
|
12
|
+
let(:archive_dir) {FileUtils.cp_r(test_dir_src, @tmp_dir); File.join(@tmp_dir, 'test_dir')}
|
13
|
+
let(:file_path) {File.join(archive_dir, 'deconstructions.txt') }
|
14
|
+
|
15
|
+
context "archiving" do
|
16
|
+
|
17
|
+
let(:default_options) { Tarchiver::Constants::DEFAULT_ARCHIVE_OPTIONS }
|
18
|
+
|
19
|
+
it 'accepts file path input' do
|
20
|
+
_, _, to_archive = Tarchiver::Helpers.send(:sanitize_input, file_path, default_options)
|
21
|
+
expect(to_archive).to eq([file_path])
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'accepts dir path input' do
|
25
|
+
_, _, to_archive = Tarchiver::Helpers.send(:sanitize_input, archive_dir, default_options)
|
26
|
+
expect(to_archive).not_to be_nil
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'accepts enumerator input' do
|
30
|
+
enum = Dir.glob(File.join(archive_dir, '*'))
|
31
|
+
_, _, to_archive = Tarchiver::Helpers.send(:sanitize_input, enum, default_options)
|
32
|
+
expect(to_archive).not_to be_nil
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'adds a timestamp to the archive name' do
|
36
|
+
opts = default_options.merge({add_timestamp: true})
|
37
|
+
archive_name, _, _ = Tarchiver::Helpers.send(:sanitize_input, archive_dir, opts)
|
38
|
+
expect(archive_name).to match(/test_dir-[0-9]+/)
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'checks valid blocksize input' do
|
42
|
+
[1024, '1024'].each do |bs|
|
43
|
+
opts = default_options.merge({blocksize: bs})
|
44
|
+
options = Tarchiver::Helpers.send(:sanitize_options, opts)
|
45
|
+
expect(options[:blocksize]).to be(1024)
|
46
|
+
end
|
47
|
+
opts = default_options.merge({blocksize: '1024T'})
|
48
|
+
expect{ Tarchiver::Helpers.send(:sanitize_options, opts) }.to raise_error(ArgumentError)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'checks validity of archive_type' do
|
52
|
+
[:tar, :tgz].each do |type|
|
53
|
+
opts = default_options.merge({archive_type: type})
|
54
|
+
options = Tarchiver::Helpers.send(:sanitize_options, opts)
|
55
|
+
expect(options[:archive_type]).to be(type)
|
56
|
+
end
|
57
|
+
opts = default_options.merge({archive_type: 'tar.gz', raise_errors: true})
|
58
|
+
expect{ Tarchiver::Helpers.send(:sanitize_options, opts) }.to raise_error(ArgumentError)
|
59
|
+
end
|
60
|
+
|
61
|
+
context "Creating tarball" do
|
62
|
+
let(:options) {default_options.merge({archive_type: :tar})}
|
63
|
+
|
64
|
+
it 'returns filepath on success' do
|
65
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, options)
|
66
|
+
expect(archive_path).to eq(File.join(@tmp_dir, 'test_dir.tar'))
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'only includes the top directory of absolute paths' do
|
70
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, options)
|
71
|
+
expect(inspect_archive(archive_path)).to include(/^test_dir.+homer-excited.png$/)
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'includes full paths' do
|
75
|
+
opts = options.merge({relative_to_top_dir: false})
|
76
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, opts)
|
77
|
+
expect(inspect_archive(archive_path)).to include(/^.*homer-excited.png$/)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'only includes the contents of a directory' do
|
81
|
+
opts = options.merge({contents_only: true, add_timestamp: true})
|
82
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, opts)
|
83
|
+
expect(inspect_archive(archive_path)).to include(/^homer-excited.png$/)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'includes symlinks' do
|
87
|
+
FileUtils.ln_s(File.join(archive_dir, 'materialist.txt'), File.join(archive_dir, 'symlink_to_materialist.txt'))
|
88
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, options)
|
89
|
+
expect(inspect_archive(archive_path)).to include(/symlink_to_materialist.txt$/)
|
90
|
+
File.unlink(File.join(archive_dir, 'symlink_to_materialist.txt'))
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'returns nil on failure' do
|
94
|
+
archive_path = Tarchiver::Archiver.archive(File.join(archive_dir, 'nonexistent'), @tmp_dir, options)
|
95
|
+
expect(archive_path).to be_nil
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'raises errors if raising is enabled' do
|
99
|
+
opts = options.merge({raise_errors: true})
|
100
|
+
expect{ Tarchiver::Archiver.archive(File.join(archive_dir, 'nonexistent'), @tmp_dir, opts) }.to raise_error(ArgumentError)
|
101
|
+
unwritable_dir = File.join(@tmp_dir, 'unwritable')
|
102
|
+
FileUtils.mkdir_p(unwritable_dir, mode: 0600)
|
103
|
+
expect{ Tarchiver::Archiver.archive(archive_dir, unwritable_dir, opts) }.to raise_error(Errno::EACCES)
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'has a custom archive name' do
|
107
|
+
opts = options.merge({custom_archive_name: 'rspec-archive'})
|
108
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, opts)
|
109
|
+
expect(archive_path).to eq(File.join(@tmp_dir, 'rspec-archive.tar'))
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'cleans up the input' do
|
113
|
+
opts = options.merge({delete_input_on_success: true})
|
114
|
+
dir = archive_dir
|
115
|
+
archive_path = Tarchiver::Archiver.archive(dir, @tmp_dir, opts)
|
116
|
+
expect(File.exists?(dir)).to be false
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
context "compressing" do
|
122
|
+
|
123
|
+
let(:default_options) { Tarchiver::Constants::DEFAULT_ARCHIVE_OPTIONS }
|
124
|
+
|
125
|
+
it 'creates a tgz file' do
|
126
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, default_options)
|
127
|
+
expect(archive_path).to eq(File.join(@tmp_dir, 'test_dir.tgz'))
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'terminates in a controlled way on errors' do
|
131
|
+
expect(default_options[:compressor].send(:compress, File.join(@tmp_dir, 'fake_path'), File.join(@tmp_dir, 'fake_path'), default_options)).to be_nil
|
132
|
+
opts = default_options.merge({raise_errors: true})
|
133
|
+
expect{ opts[:compressor].send(:compress, File.join(@tmp_dir, 'fake_path'), File.join(@tmp_dir, 'fake_path'), opts)}.to raise_error(Errno::ENOENT)
|
134
|
+
end
|
135
|
+
|
136
|
+
it 'must use a subclass of Compressor' do
|
137
|
+
opts = default_options.merge({compressor: Tarchiver::Compressor})
|
138
|
+
expect{ Tarchiver::Archiver.archive(archive_dir, @tmp_dir, opts) }.to raise_error(NotImplementedError)
|
139
|
+
expect{ Tarchiver::Archiver.unarchive('test_dir.tgz', nil, opts) }.to raise_error(NotImplementedError)
|
140
|
+
end
|
141
|
+
|
142
|
+
it 'cleans up the tarball' do
|
143
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, default_options)
|
144
|
+
tar_path = File.join(File.dirname(archive_path), 'test_dir.tar')
|
145
|
+
expect(File.exists?(tar_path)).to be false
|
146
|
+
end
|
147
|
+
|
148
|
+
it 'cleans up everything' do
|
149
|
+
opts = default_options.merge({delete_input_on_success: true})
|
150
|
+
dir = archive_dir
|
151
|
+
archive_path = Tarchiver::Archiver.archive(dir, @tmp_dir, opts)
|
152
|
+
tar_path = File.join(File.dirname(archive_path), 'test_dir.tar')
|
153
|
+
expect(File.exists?(dir)).to be false
|
154
|
+
expect(File.exists?(tar_path)).to be false
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|
160
|
+
|
161
|
+
context "unarchiving" do
|
162
|
+
|
163
|
+
let(:default_options) { Tarchiver::Constants::DEFAULT_UNARCHIVE_OPTIONS }
|
164
|
+
|
165
|
+
it 'reads a tgz' do
|
166
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, default_options)
|
167
|
+
# FileUtils.mkdir_p(unpack_path)
|
168
|
+
output = Tarchiver::Archiver.unarchive(archive_path, @unpack_path)
|
169
|
+
expect(Dir.glob(File.join(output, '**', '*')).size).to be(8)
|
170
|
+
end
|
171
|
+
|
172
|
+
it 'reads a tar.gz' do
|
173
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, default_options)
|
174
|
+
tar_gz_path = File.join(File.dirname(archive_path), 'test_dir.tar.gz')
|
175
|
+
FileUtils.mv(archive_path, tar_gz_path)
|
176
|
+
output = Tarchiver::Archiver.unarchive(tar_gz_path, @unpack_path)
|
177
|
+
expect(Dir.glob(File.join(output, '**', '*')).size).to be(8)
|
178
|
+
end
|
179
|
+
|
180
|
+
it 'reads a tar' do
|
181
|
+
opts = default_options.merge({archive_type: :tar})
|
182
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, opts)
|
183
|
+
output = Tarchiver::Archiver.unarchive(archive_path, @unpack_path)
|
184
|
+
expect(Dir.glob(File.join(output, '**', '*')).size).to be(8)
|
185
|
+
end
|
186
|
+
|
187
|
+
it 'writes symlinks' do
|
188
|
+
FileUtils.ln_s(File.join(archive_dir, 'materialist.txt'), File.join(archive_dir, 'symlink_to_materialist.txt'))
|
189
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, default_options)
|
190
|
+
output = Tarchiver::Archiver.unarchive(archive_path, @unpack_path)
|
191
|
+
skip "TarWriter does not support symlinks. They are included as regular files."
|
192
|
+
expect(File.symlink?(File.join(output, 'symlink_to_materialist.txt'))).to be true
|
193
|
+
end
|
194
|
+
|
195
|
+
it 'cleans up the input' do
|
196
|
+
opts = default_options.merge({delete_input_on_success: true})
|
197
|
+
archive_path = Tarchiver::Archiver.archive(archive_dir, @tmp_dir, default_options)
|
198
|
+
output = Tarchiver::Archiver.unarchive(archive_path, @unpack_path, opts)
|
199
|
+
expect(File.exist?(archive_path)).to be false
|
200
|
+
end
|
201
|
+
|
202
|
+
it 'terminates in a controlled way on errors' do
|
203
|
+
output = Tarchiver::Archiver.unarchive('fake_path', @unpack_path)
|
204
|
+
expect(output).to be_nil
|
205
|
+
opts = default_options.merge({raise_errors: true})
|
206
|
+
expect{ output = Tarchiver::Archiver.unarchive('fake_path', @unpack_path, opts)}.to raise_error(NoMethodError)
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
210
|
+
|
211
|
+
after(:each) do
|
212
|
+
FileUtils.remove_entry_secure(@tmp_dir)
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
dot file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Prematerial Marxism and social realism
|
2
|
+
O. Catherine Reicher
|
3
|
+
Department of Ontology, Carnegie-Mellon University
|
4
|
+
1. The semioticist paradigm of context and Marxist class
|
5
|
+
|
6
|
+
The main theme of Tilton’s[1] essay on social realism is a precapitalist reality. Thus, in Dubliners, Joyce examines Marxist class; in Ulysses, however, he analyses prematerial Marxism.
|
7
|
+
|
8
|
+
Foucault uses the term ‘Marxist class’ to denote the stasis of dialectic society. In a sense, Lacan suggests the use of the postdeconstructive paradigm of discourse to challenge the status quo.
|
9
|
+
|
10
|
+
But Foucault promotes the use of materialist narrative to deconstruct society. Lacan’s essay on cultural neodialectic theory holds that class, somewhat paradoxically, has intrinsic meaning.
|
11
|
+
|
12
|
+
Several discourses concerning a self-sufficient totality exist. Thus, Debord promotes the use of Marxist class to analyse sexual identity.
|
13
|
+
2. Joyce and social realism
|
14
|
+
|
15
|
+
“Class is dead,” says Derrida. Marx uses the term ‘prematerial Marxism’ to denote the role of the observer as reader. But the premise of social realism suggests that narrativity may be used to oppress the proletariat.
|
16
|
+
|
17
|
+
“Sexual identity is part of the rubicon of art,” says Lyotard; however, according to Hamburger[2] , it is not so much sexual identity that is part of the rubicon of art, but rather the futility, and subsequent genre, of sexual identity. Baudrillard suggests the use of prematerial Marxism to attack hierarchy. Therefore, Bataille uses the term ‘textual capitalism’ to denote a precultural reality.
|
18
|
+
|
19
|
+
“Sexuality is fundamentally elitist,” says Lacan. Any number of narratives concerning social realism may be discovered. However, Debord’s critique of Marxist class implies that the Constitution is unattainable.
|
20
|
+
|
21
|
+
Lacan uses the term ‘materialist nihilism’ to denote the collapse, and subsequent failure, of subdialectic consciousness. Thus, Lyotard promotes the use of Lyotardist narrative to attack sexism.
|
22
|
+
|
23
|
+
In the works of Joyce, a predominant concept is the concept of textual reality. The collapse, and eventually the rubicon, of neoconstructive theory intrinsic to Joyce’s Dubliners is also evident in Finnegan’s Wake, although in a more self-fulfilling sense. Thus, Derrida uses the term ‘social realism’ to denote not desublimation per se, but subdesublimation.
|
24
|
+
|
25
|
+
If dialectic nationalism holds, the works of Joyce are modernistic. However, the primary theme of the works of Joyce is the common ground between society and sexual identity.
|
26
|
+
|
27
|
+
The premise of Marxist class states that language is used to reinforce capitalism. But a number of theories concerning a mythopoetical totality exist.
|
28
|
+
|
29
|
+
The subject is interpolated into a social realism that includes narrativity as a paradox. In a sense, the example of Batailleist `powerful communication’ which is a central theme of Joyce’s Dubliners emerges again in Finnegan’s Wake.
|
30
|
+
|
31
|
+
An abundance of narratives concerning prematerial Marxism may be revealed. It could be said that Foucault promotes the use of Marxist class to modify and challenge art.
|
32
|
+
|
33
|
+
The main theme of d’Erlette’s[3] analysis of social realism is the role of the observer as artist. Therefore, Lyotard suggests the use of Marxist class to attack sexism.
|
34
|
+
|
35
|
+
1. Tilton, Z. P. I. ed. (1971) Subsemantic Demodernisms: Social realism and prematerial Marxism. O’Reilly & Associates
|
36
|
+
|
37
|
+
2. Hamburger, Z. V. (1983) Social realism in the works of Pynchon. Schlangekraft
|
38
|
+
|
39
|
+
3. d’Erlette, G. D. A. ed. (1979) Deconstructing Socialist realism: Prematerial Marxism and social realism. And/Or Press
|
@@ -0,0 +1,83 @@
|
|
1
|
+
Postcultural Deconstructions: Lyotardist narrative and modernism
|
2
|
+
Hans Reicher
|
3
|
+
Department of English, University of California
|
4
|
+
Jane A. Wilson
|
5
|
+
Department of Gender Politics, University of Illinois
|
6
|
+
1. Lyotardist narrative and patriarchialist appropriation
|
7
|
+
|
8
|
+
The primary theme of the works of Eco is a self-justifying totality. Any number of dematerialisms concerning the failure, and some would say the futility, of neodialectic sexual identity may be found. However, la Tournier[1] implies that we have to choose between patriarchialist appropriation and Batailleist `powerful communication’.
|
9
|
+
|
10
|
+
The premise of the dialectic paradigm of context holds that the State is part of the fatal flaw of narrativity, but only if truth is equal to consciousness. Therefore, the subject is contextualised into a postpatriarchialist theory that includes narrativity as a whole.
|
11
|
+
|
12
|
+
If one examines Lyotardist narrative, one is faced with a choice: either reject preconstructivist modernism or conclude that language is used to reinforce capitalism, but only if reality is equal to sexuality; if that is not the case, we can assume that art is a legal fiction. If patriarchialist appropriation holds, the works of Eco are postmodern. But several discourses concerning Sontagist camp exist.
|
13
|
+
|
14
|
+
The main theme of d’Erlette’s[2] critique of modernism is not, in fact, construction, but postconstruction. The subject is contextualised into a patriarchialist appropriation that includes truth as a paradox. It could be said that semiotic neocapitalist theory suggests that the law is capable of truth, given that the premise of patriarchialist appropriation is valid.
|
15
|
+
|
16
|
+
Lacan uses the term ‘materialist nihilism’ to denote the collapse, and subsequent failure, of subdialectic consciousness. Thus, Lyotard promotes the use of Lyotardist narrative to attack sexism.
|
17
|
+
|
18
|
+
Marx’s essay on Lyotardist narrative suggests that context is a product of communication. In a sense, the example of modernism which is a central theme of Eco’s The Aesthetics of Thomas Aquinas emerges again in The Island of the Day Before, although in a more mythopoetical sense.
|
19
|
+
|
20
|
+
The primary theme of the works of Eco is the role of the reader as participant. It could be said that Sontag suggests the use of Lyotardist narrative to modify and read class.
|
21
|
+
|
22
|
+
The main theme of de Selby’s[4] analysis of modernism is not dematerialism, as Lacan would have it, but subdematerialism. In a sense, the subject is contextualised into a patriarchialist appropriation that includes truth as a reality.
|
23
|
+
2. Consensuses of absurdity
|
24
|
+
|
25
|
+
“Sexual identity is part of the defining characteristic of culture,” says Marx; however, according to Pickett[5] , it is not so much sexual identity that is part of the defining characteristic of culture, but rather the absurdity, and therefore the economy, of sexual identity. The premise of modernism states that language is fundamentally impossible. But Derrida promotes the use of Lyotardist narrative to deconstruct the status quo.
|
26
|
+
|
27
|
+
The characteristic theme of the works of Eco is the difference between class and sexuality. Marx uses the term ‘modernism’ to denote a textual whole. It could be said that patriarchialist appropriation suggests that society, paradoxically, has intrinsic meaning.
|
28
|
+
|
29
|
+
“Class is part of the stasis of art,” says Sontag. Baudrillard uses the term ‘Lyotardist narrative’ to denote the fatal flaw, and eventually the economy, of subcultural society. In a sense, if modernism holds, the works of Eco are modernistic.
|
30
|
+
|
31
|
+
“Sexuality is intrinsically elitist,” says Sontag; however, according to McElwaine[6] , it is not so much sexuality that is intrinsically elitist, but rather the absurdity, and some would say the meaninglessness, of sexuality. An abundance of narratives concerning a mythopoetical reality may be discovered. However, Lyotard suggests the use of patriarchialist appropriation to challenge society.
|
32
|
+
|
33
|
+
Many constructions concerning Lyotardist narrative exist. Thus, the primary theme of Sargeant’s[7] critique of substructural constructivist theory is the role of the observer as participant.
|
34
|
+
|
35
|
+
Derrida uses the term ‘patriarchialist appropriation’ to denote not discourse, but postdiscourse. But Debord promotes the use of predialectic libertarianism to deconstruct capitalism.
|
36
|
+
|
37
|
+
Prinn[8] states that we have to choose between patriarchialist appropriation and neocultural objectivism. Thus, Sontag uses the term ‘Lyotardist narrative’ to denote the common ground between sexual identity and society.
|
38
|
+
|
39
|
+
The subject is interpolated into a textual paradigm of discourse that includes language as a paradox. But Lyotard’s analysis of Lyotardist narrative holds that the goal of the reader is deconstruction, given that truth is interchangeable with language.
|
40
|
+
|
41
|
+
The subject is contextualised into a postdialectic rationalism that includes sexuality as a totality. It could be said that if modernism holds, we have to choose between Lyotardist narrative and cultural presemanticist theory.
|
42
|
+
3. Eco and modernism
|
43
|
+
|
44
|
+
If one examines Derridaist reading, one is faced with a choice: either accept modernism or conclude that the media is capable of intentionality. The characteristic theme of the works of Eco is the collapse, and subsequent rubicon, of cultural class. Therefore, patriarchialist appropriation suggests that the raison d’etre of the writer is social comment.
|
45
|
+
|
46
|
+
In the works of Eco, a predominant concept is the concept of posttextual reality. The subject is interpolated into a modernism that includes narrativity as a whole. In a sense, a number of narratives concerning not dematerialism, but neodematerialism may be found.
|
47
|
+
|
48
|
+
The subject is contextualised into a material construction that includes language as a paradox. It could be said that any number of deappropriations concerning patriarchialist appropriation exist.
|
49
|
+
|
50
|
+
The subject is interpolated into a modernism that includes narrativity as a totality. Therefore, the premise of Lyotardist narrative states that narrative comes from the collective unconscious.
|
51
|
+
|
52
|
+
Many theories concerning a self-supporting reality may be discovered. Thus, Sartre uses the term ‘the subcultural paradigm of discourse’ to denote the role of the observer as artist.
|
53
|
+
4. Modernism and semiotic narrative
|
54
|
+
|
55
|
+
If one examines Lyotardist narrative, one is faced with a choice: either reject semiotic narrative or conclude that society has objective value, given that Foucault’s essay on Lyotardist narrative is invalid. Sontag suggests the use of semiotic narrative to analyse and read sexual identity. However, an abundance of discourses concerning modernism exist.
|
56
|
+
|
57
|
+
“Society is dead,” says Debord; however, according to Hubbard[9] , it is not so much society that is dead, but rather the fatal flaw, and eventually the dialectic, of society. The subject is contextualised into a Lyotardist narrative that includes culture as a whole. But in The Limits of Interpretation (Advances in Semiotics), Eco denies semiotic narrative; in The Name of the Rose he deconstructs modernism.
|
58
|
+
|
59
|
+
The subject is interpolated into a Lyotardist narrative that includes language as a totality. Thus, the economy, and subsequent fatal flaw, of modernism depicted in Eco’s The Aesthetics of Thomas Aquinas is also evident in The Name of the Rose.
|
60
|
+
|
61
|
+
Several deconstructions concerning not, in fact, situationism, but presituationism may be found. It could be said that the subject is contextualised into a Lyotardist narrative that includes sexuality as a reality.
|
62
|
+
|
63
|
+
Dahmus[10] suggests that we have to choose between modernism and constructivist narrative. But if Sartreist existentialism holds, the works of Eco are postmodern.
|
64
|
+
|
65
|
+
1. la Tournier, J. S. Y. ed. (1987) The textual paradigm of narrative, rationalism and modernism. And/Or Press
|
66
|
+
|
67
|
+
2. d’Erlette, Z. V. (1995) The Circular Door: Modernism in the works of Cage. University of Michigan Press
|
68
|
+
|
69
|
+
3. Dietrich, A. V. B. ed. (1973) Modernism and Lyotardist narrative. Cambridge University Press
|
70
|
+
|
71
|
+
4. de Selby, N. (1988) Deconstructing Expressionism: Lyotardist narrative and modernism. Oxford University Press
|
72
|
+
|
73
|
+
5. Pickett, J. Y. ed. (1976) Modernism and Lyotardist narrative. And/Or Press
|
74
|
+
|
75
|
+
6. McElwaine, K. (1980) The Fatal flaw of Narrative: Lyotardist narrative and modernism. Panic Button Books
|
76
|
+
|
77
|
+
7. Sargeant, Z. I. ed. (1978) Modernism and Lyotardist narrative. O’Reilly & Associates
|
78
|
+
|
79
|
+
8. Prinn, Z. K. M. (1984) The Defining characteristic of Consciousness: Modernism, semiotic depatriarchialism and rationalism. Panic Button Books
|
80
|
+
|
81
|
+
9. Hubbard, S. ed. (1990) Lyotardist narrative and modernism. O’Reilly & Associates
|
82
|
+
|
83
|
+
10. Dahmus, Z. J. (1982) The Forgotten Sky: Modernism and Lyotardist narrative. Loompanics
|
@@ -0,0 +1 @@
|
|
1
|
+
lorem ipsum
|
Binary file
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Communications From Elsewhere
|
2
|
+
Materialist narrative in the works of Gibson
|
3
|
+
David Q. T. Brophy
|
4
|
+
Department of Literature, Stanford University
|
5
|
+
1. Subcapitalist capitalism and Baudrillardist hyperreality
|
6
|
+
|
7
|
+
The main theme of d’Erlette’s[1] essay on cultural neodialectic theory is the bridge between society and class. Therefore, if materialist narrative holds, we have to choose between patriarchialist narrative and Lyotardist narrative. A number of discourses concerning the role of the writer as artist exist.
|
8
|
+
|
9
|
+
If one examines Baudrillardist hyperreality, one is faced with a choice: either reject materialist narrative or conclude that the Constitution is capable of intention. It could be said that Sartre’s critique of neodialectic materialism suggests that art is part of the rubicon of narrativity, given that Baudrillardist hyperreality is invalid. The example of the capitalist paradigm of reality prevalent in Gibson’s Virtual Light emerges again in Mona Lisa Overdrive, although in a more self-supporting sense.
|
10
|
+
|
11
|
+
But Foucault promotes the use of materialist narrative to deconstruct society. Lacan’s essay on cultural neodialectic theory holds that class, somewhat paradoxically, has intrinsic meaning.
|
12
|
+
|
13
|
+
Thus, many desituationisms concerning materialist narrative may be discovered. La Tournier[2] states that we have to choose between Batailleist `powerful communication’ and postcultural appropriation.
|
14
|
+
i
|
15
|
+
|
16
|
+
But Foucault promotes the use of materialist narrative to deconstruct society. Lacan’s essay on cultural neodialectic theory holds that class, somewhat paradoxically, has intrinsic meaning.
|
17
|
+
|
18
|
+
Lacan uses the term ‘materialist nihilism’ to denote the collapse, and subsequent failure, of subdialectic consciousness. Thus, Lyotard promotes the use of Lyotardist narrative to attack sexism.
|
19
|
+
|
20
|
+
However, the premise of materialist narrative holds that the task of the reader is deconstruction, but only if language is distinct from truth; otherwise, we can assume that art may be used to reinforce capitalism. If dialectic theory holds, the works of Gibson are not postmodern.
|
21
|
+
2. Gibson and cultural neodialectic theory
|
22
|
+
|
23
|
+
“Truth is fundamentally a legal fiction,” says Debord; however, according to Hubbard[3] , it is not so much truth that is fundamentally a legal fiction, but rather the dialectic, and some would say the paradigm, of truth. It could be said that the primary theme of the works of Rushdie is not, in fact, desituationism, but neodesituationism. The subject is contextualised into a subcapitalist paradigm of expression that includes sexuality as a whole.
|
24
|
+
|
25
|
+
In the works of Rushdie, a predominant concept is the distinction between closing and opening. Thus, Buxton[4] states that we have to choose between Baudrillardist hyperreality and capitalist narrative. Lacan suggests the use of materialist narrative to attack elitist perceptions of society.
|
26
|
+
|
27
|
+
It could be said that the subject is interpolated into a posttextual deconstruction that includes culture as a paradox. The main theme of Reicher’s[5] model of Baudrillardist hyperreality is the role of the artist as writer.
|
28
|
+
|
29
|
+
Therefore, Sartre’s critique of materialist narrative implies that the media is capable of significant form, given that the prematerialist paradigm of context is valid. The feminine/masculine distinction intrinsic to Rushdie’s The Ground Beneath Her Feet is also evident in Satanic Verses.
|
30
|
+
|
31
|
+
But the subject is contextualised into a cultural neodialectic theory that includes truth as a reality. The premise of materialist narrative holds that class has significance.
|
32
|
+
3. Textual libertarianism and neocultural materialism
|
33
|
+
|
34
|
+
“Society is part of the collapse of culture,” says Bataille; however, according to Hamburger[6] , it is not so much society that is part of the collapse of culture, but rather the genre of society. Thus, the characteristic theme of the works of Eco is the difference between class and sexual identity. Materialist narrative suggests that narrativity is used to disempower minorities.
|
35
|
+
|
36
|
+
In a sense, in The Aesthetics of Thomas Aquinas, Eco denies neocultural materialism; in Foucault’s Pendulum he examines conceptualist discourse. Sontag uses the term ‘cultural neodialectic theory’ to denote the absurdity, and subsequent dialectic, of subdialectic society.
|
37
|
+
|
38
|
+
Thus, any number of narratives concerning a mythopoetical totality exist. If semantic neodialectic theory holds, we have to choose between neocultural materialism and material capitalism.
|
39
|
+
|
40
|
+
Therefore, Baudrillard promotes the use of materialist narrative to modify and analyse class. Several discourses concerning cultural neodialectic theory may be revealed.
|
@@ -0,0 +1,79 @@
|
|
1
|
+
Postpatriarchialist theory and subcapitalist materialism
|
2
|
+
Catherine M. Tilton
|
3
|
+
Department of Future Studies, Massachusetts Institute of Technology
|
4
|
+
1. Postpatriarchialist theory and the dialectic paradigm of context
|
5
|
+
|
6
|
+
The characteristic theme of Porter’s[1] model of subcapitalist materialism is the common ground between reality and society. The subject is interpolated into a postpatriarchialist theory that includes narrativity as a paradox. It could be said that any number of deappropriations concerning a cultural reality exist.
|
7
|
+
|
8
|
+
But Foucault promotes the use of materialist narrative to deconstruct society. Lacan’s essay on cultural neodialectic theory holds that class, somewhat paradoxically, has intrinsic meaning.
|
9
|
+
|
10
|
+
“Culture is a legal fiction,” says Lyotard; however, according to d’Erlette[2] , it is not so much culture that is a legal fiction, but rather the failure of culture. Prinn[3] states that we have to choose between Foucaultist power relations and the structural paradigm of narrative. In a sense, the closing/opening distinction depicted in Eco’s The Aesthetics of Thomas Aquinas is also evident in The Name of the Rose.
|
11
|
+
|
12
|
+
Lacan uses the term ‘materialist nihilism’ to denote the collapse, and subsequent failure, of subdialectic consciousness. Thus, Lyotard promotes the use of Lyotardist narrative to attack sexism.
|
13
|
+
|
14
|
+
The premise of the dialectic paradigm of context holds that the State is part of the fatal flaw of narrativity, but only if truth is equal to consciousness. Therefore, the subject is contextualised into a postpatriarchialist theory that includes narrativity as a whole.
|
15
|
+
|
16
|
+
In The Aesthetics of Thomas Aquinas, Eco deconstructs the dialectic paradigm of context; in Foucault’s Pendulum, although, he affirms subcapitalist materialism. In a sense, if precapitalist nationalism holds, we have to choose between subcapitalist materialism and the patriarchial paradigm of context.
|
17
|
+
|
18
|
+
The primary theme of the works of Eco is the difference between sexual identity and language. But Geoffrey[4] suggests that we have to choose between postpatriarchialist theory and postcultural narrative.
|
19
|
+
|
20
|
+
The main theme of Dahmus’s[5] essay on the modern paradigm of narrative is not theory per se, but subtheory. However, Baudrillard uses the term ‘postpatriarchialist theory’ to denote the economy, and eventually the futility, of postdialectic sexual identity.
|
21
|
+
2. Eco and subcapitalist materialism
|
22
|
+
|
23
|
+
The primary theme of the works of Eco is the role of the reader as writer. If Debordist image holds, the works of Eco are modernistic. Thus, a number of dematerialisms concerning the dialectic paradigm of context may be revealed.
|
24
|
+
|
25
|
+
The characteristic theme of Hanfkopf’s[6] model of subcapitalist materialism is the bridge between class and reality. But the subject is interpolated into a dialectic paradigm of context that includes language as a reality.
|
26
|
+
|
27
|
+
In The Aesthetics of Thomas Aquinas, Eco deconstructs postpatriarchialist theory; in Foucault’s Pendulum, however, he reiterates the deconstructivist paradigm of context. However, Humphrey[7] states that we have to choose between postpatriarchialist theory and Lacanist obscurity.
|
28
|
+
3. Subcapitalist materialism and the textual paradigm of consensus
|
29
|
+
|
30
|
+
“Sexual identity is fundamentally impossible,” says Bataille. If neosemantic deconstructivist theory holds, the works of Eco are an example of mythopoetical nationalism. In a sense, several constructions concerning not, in fact, theory, but pretheory exist.
|
31
|
+
|
32
|
+
If one examines postpatriarchialist theory, one is faced with a choice: either reject subcapitalist materialism or conclude that the purpose of the reader is social comment. The subject is contextualised into a neocultural discourse that includes reality as a whole. However, Baudrillard suggests the use of subcapitalist materialism to challenge hierarchy.
|
33
|
+
|
34
|
+
Marx uses the term ‘the textual paradigm of consensus’ to denote a structuralist paradox. Thus, the primary theme of the works of Eco is the common ground between class and society.
|
35
|
+
|
36
|
+
Humphrey[8] suggests that we have to choose between textual precapitalist theory and the cultural paradigm of narrative. But Sartre uses the term ‘subcapitalist materialism’ to denote a self-sufficient whole.
|
37
|
+
|
38
|
+
The characteristic theme of Humphrey’s[9] analysis of the textual paradigm of consensus is the bridge between culture and class. Therefore, the subject is interpolated into a postpatriarchialist theory that includes sexuality as a paradox.
|
39
|
+
|
40
|
+
Bataille uses the term ‘subcapitalist materialism’ to denote the role of the participant as writer. But if Sartreist absurdity holds, we have to choose between the textual paradigm of consensus and semiotic deconceptualism.
|
41
|
+
4. Eco and the pretextual paradigm of discourse
|
42
|
+
|
43
|
+
In the works of Eco, a predominant concept is the concept of cultural narrativity. Postpatriarchialist theory holds that language may be used to reinforce sexism. Therefore, Lyotard promotes the use of postconstructivist theory to modify consciousness.
|
44
|
+
|
45
|
+
“Society is used in the service of colonialist perceptions of class,” says Baudrillard. Many discourses concerning postpatriarchialist theory may be found. In a sense, Bataille suggests the use of subcapitalist materialism to deconstruct capitalism.
|
46
|
+
|
47
|
+
The main theme of the works of Eco is not narrative, as cultural Marxism suggests, but subnarrative. Von Ludwig[10] suggests that we have to choose between subcapitalist materialism and Sartreist existentialism. However, in Models, Inc., Spelling denies postpatriarchialist theory; in The Heights he reiterates premodernist theory.
|
48
|
+
|
49
|
+
Sontag uses the term ‘postpatriarchialist theory’ to denote the role of the artist as participant. In a sense, a number of situationisms concerning not narrative, but postnarrative exist.
|
50
|
+
|
51
|
+
Sartre’s model of the textual paradigm of consensus holds that language is intrinsically responsible for archaic, elitist perceptions of consciousness. Therefore, if subcapitalist materialism holds, we have to choose between the conceptual paradigm of reality and neostructuralist theory.
|
52
|
+
|
53
|
+
The primary theme of Long’s[11] essay on the textual paradigm of consensus is a mythopoetical reality. Thus, Baudrillard uses the term ‘postpatriarchialist theory’ to denote the role of the observer as artist.
|
54
|
+
|
55
|
+
Buxton[12] implies that we have to choose between subcapitalist materialism and capitalist predialectic theory. However, the subject is contextualised into a textual paradigm of consensus that includes art as a whole.
|
56
|
+
|
57
|
+
1. Porter, P. D. ed. (1975) Reinventing Modernism: Subcapitalist materialism and postpatriarchialist theory. Schlangekraft
|
58
|
+
|
59
|
+
2. d’Erlette, J. P. Q. (1989) Postpatriarchialist theory and subcapitalist materialism. University of Illinois Press
|
60
|
+
|
61
|
+
3. Prinn, S. I. ed. (1970) The Economy of Consensus: Postpatriarchialist theory in the works of Eco. Loompanics
|
62
|
+
|
63
|
+
4. Geoffrey, B. (1989) Subcultural textual theory, subcapitalist materialism and Marxism. University of Massachusetts Press
|
64
|
+
|
65
|
+
5. Dahmus, L. I. Z. ed. (1970) The Burning Fruit: Subcapitalist materialism and postpatriarchialist theory. Panic Button Books
|
66
|
+
|
67
|
+
6. Hanfkopf, E. O. (1997) Subcapitalist materialism, Marxism and textual neodialectic theory. Oxford University Press
|
68
|
+
|
69
|
+
7. Humphrey, B. ed. (1988) The Discourse of Stasis: Postpatriarchialist theory and subcapitalist materialism. And/Or Press
|
70
|
+
|
71
|
+
8. Humphrey, V. U. Z. (1974) Subcapitalist materialism and postpatriarchialist theory. Cambridge University Press
|
72
|
+
|
73
|
+
9. Humphrey, Q. ed. (1992) The Stone Door: Posttextual objectivism, subcapitalist materialism and Marxism. Oxford University Press
|
74
|
+
|
75
|
+
10. von Ludwig, Z. B. O. (1971) Postpatriarchialist theory in the works of Spelling. Schlangekraft
|
76
|
+
|
77
|
+
11. Long, B. J. ed. (1996) The Expression of Absurdity: Subcapitalist materialism in the works of Fellini. University of Oregon Press
|
78
|
+
|
79
|
+
12. Buxton, N. D. S. (1988) Postpatriarchialist theory in the works of Eco. And/Or Press
|
data/spec/spec_helper.rb
ADDED
data/tarchiver.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'tarchiver/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "tarchiver"
|
8
|
+
spec.version = Tarchiver::VERSION
|
9
|
+
spec.authors = ["Bart Kamphorst"]
|
10
|
+
spec.email = ["bart@kamphorst.com"]
|
11
|
+
spec.summary = %q{A high-level tar and tgz archiver.}
|
12
|
+
spec.description = %q{A high-level tar and tgz archiver.}
|
13
|
+
spec.homepage = "https://github.com/bartkamphorst/tarchiver"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tarchiver
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bart Kamphorst
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: A high-level tar and tgz archiver.
|
56
|
+
email:
|
57
|
+
- bart@kamphorst.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .gitignore
|
63
|
+
- .travis.yml
|
64
|
+
- Gemfile
|
65
|
+
- Gemfile.lock
|
66
|
+
- LICENSE
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- lib/tarchiver.rb
|
70
|
+
- lib/tarchiver/archiver.rb
|
71
|
+
- lib/tarchiver/compressor.rb
|
72
|
+
- lib/tarchiver/compressors/gzip.rb
|
73
|
+
- lib/tarchiver/constants.rb
|
74
|
+
- lib/tarchiver/helpers.rb
|
75
|
+
- lib/tarchiver/tarballer.rb
|
76
|
+
- lib/tarchiver/version.rb
|
77
|
+
- spec/archiver_spec.rb
|
78
|
+
- spec/fixtures/test_dir/.secret.yml
|
79
|
+
- spec/fixtures/test_dir/chapters/prematerial.txt
|
80
|
+
- spec/fixtures/test_dir/deconstructions.txt
|
81
|
+
- spec/fixtures/test_dir/follow-rename.txt
|
82
|
+
- spec/fixtures/test_dir/homer-excited.png
|
83
|
+
- spec/fixtures/test_dir/materialist.txt
|
84
|
+
- spec/fixtures/test_dir/postpatriarchialist.txt
|
85
|
+
- spec/spec_helper.rb
|
86
|
+
- tarchiver.gemspec
|
87
|
+
homepage: https://github.com/bartkamphorst/tarchiver
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.4.6
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: A high-level tar and tgz archiver.
|
111
|
+
test_files:
|
112
|
+
- spec/archiver_spec.rb
|
113
|
+
- spec/fixtures/test_dir/.secret.yml
|
114
|
+
- spec/fixtures/test_dir/chapters/prematerial.txt
|
115
|
+
- spec/fixtures/test_dir/deconstructions.txt
|
116
|
+
- spec/fixtures/test_dir/follow-rename.txt
|
117
|
+
- spec/fixtures/test_dir/homer-excited.png
|
118
|
+
- spec/fixtures/test_dir/materialist.txt
|
119
|
+
- spec/fixtures/test_dir/postpatriarchialist.txt
|
120
|
+
- spec/spec_helper.rb
|