cotta 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +75 -0
- data/lib/cotta.rb +12 -0
- data/lib/cotta/cotta.rb +37 -0
- data/lib/cotta/cotta_dir.rb +184 -0
- data/lib/cotta/cotta_file.rb +253 -0
- data/lib/cotta/file_factory.rb +117 -0
- data/lib/cotta/file_not_found_error.rb +13 -0
- data/lib/cotta/impl/command_error.rb +13 -0
- data/lib/cotta/impl/command_interface.rb +46 -0
- data/lib/cotta/impl/command_runner.rb +55 -0
- data/lib/cotta/impl/cotta_pathname.rb +9 -0
- data/lib/cotta/impl/in_memory_system.rb +295 -0
- data/lib/cotta/impl/physical_system.rb +90 -0
- data/lib/cotta/version +1 -0
- data/test/cotta/command_interface_spec.rb +42 -0
- data/test/cotta/command_runner_spec.rb +24 -0
- data/test/cotta/content.txt +3 -0
- data/test/cotta/cotta_dir_behaviors.rb +202 -0
- data/test/cotta/cotta_dir_in_memory_spec.rb +23 -0
- data/test/cotta/cotta_dir_physical_spec.rb +14 -0
- data/test/cotta/cotta_file_behaviors.rb +139 -0
- data/test/cotta/cotta_file_in_memory_spec.rb +15 -0
- data/test/cotta/cotta_file_physical_spec.rb +47 -0
- data/test/cotta/cotta_zip_support_spec.rb +53 -0
- data/test/cotta/example_spec.rb +20 -0
- data/test/cotta/file_factory_spec.rb +54 -0
- data/test/cotta/file_system_behaviors.rb +163 -0
- data/test/cotta/in_memory_system_spec.rb +24 -0
- data/test/cotta/logo.gif +0 -0
- data/test/cotta/pathname_spec.rb +20 -0
- data/test/cotta/physical_system_spec.rb +34 -0
- data/test/cotta/physical_system_stub.rb +122 -0
- data/test/cotta/tar_test.tar +0 -0
- data/test/test.rb +19 -0
- data/test/ts_cotta.rb +6 -0
- metadata +89 -0
Binary file
|
data/test/test.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../lib/cotta'
|
2
|
+
require File.dirname(__FILE__) + '/cotta/physical_system_stub'
|
3
|
+
require 'spec'
|
4
|
+
|
5
|
+
module Cotta
|
6
|
+
module TempDirs
|
7
|
+
def setup_tmp
|
8
|
+
root = current(__FILE__).parent {|dir| dir.name == 'buildmaster' and dir.dir('bin').exists?}
|
9
|
+
output = root.dir('tmp')
|
10
|
+
output.delete
|
11
|
+
output
|
12
|
+
end
|
13
|
+
|
14
|
+
def current(file)
|
15
|
+
FileFactory.file(file).parent
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
data/test/ts_cotta.rb
ADDED
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cotta
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shane Duan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-06-16 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: a lightweight, simple and sensible API to file operation and testing
|
17
|
+
email: cotta@googlegroups.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
files:
|
25
|
+
- lib/cotta/cotta.rb
|
26
|
+
- lib/cotta/cotta_dir.rb
|
27
|
+
- lib/cotta/cotta_file.rb
|
28
|
+
- lib/cotta/file_factory.rb
|
29
|
+
- lib/cotta/file_not_found_error.rb
|
30
|
+
- lib/cotta/impl/command_error.rb
|
31
|
+
- lib/cotta/impl/command_interface.rb
|
32
|
+
- lib/cotta/impl/command_runner.rb
|
33
|
+
- lib/cotta/impl/cotta_pathname.rb
|
34
|
+
- lib/cotta/impl/in_memory_system.rb
|
35
|
+
- lib/cotta/impl/physical_system.rb
|
36
|
+
- lib/cotta/version
|
37
|
+
- lib/cotta.rb
|
38
|
+
- test/cotta/command_interface_spec.rb
|
39
|
+
- test/cotta/command_runner_spec.rb
|
40
|
+
- test/cotta/content.txt
|
41
|
+
- test/cotta/cotta_dir_behaviors.rb
|
42
|
+
- test/cotta/cotta_dir_in_memory_spec.rb
|
43
|
+
- test/cotta/cotta_dir_physical_spec.rb
|
44
|
+
- test/cotta/cotta_file_behaviors.rb
|
45
|
+
- test/cotta/cotta_file_in_memory_spec.rb
|
46
|
+
- test/cotta/cotta_file_physical_spec.rb
|
47
|
+
- test/cotta/cotta_zip_support_spec.rb
|
48
|
+
- test/cotta/example_spec.rb
|
49
|
+
- test/cotta/file_factory_spec.rb
|
50
|
+
- test/cotta/file_system_behaviors.rb
|
51
|
+
- test/cotta/in_memory_system_spec.rb
|
52
|
+
- test/cotta/logo.gif
|
53
|
+
- test/cotta/pathname_spec.rb
|
54
|
+
- test/cotta/physical_system_spec.rb
|
55
|
+
- test/cotta/physical_system_stub.rb
|
56
|
+
- test/cotta/tar_test.tar
|
57
|
+
- test/test.rb
|
58
|
+
- test/ts_cotta.rb
|
59
|
+
- README
|
60
|
+
has_rdoc: true
|
61
|
+
homepage: http://cotta.rubyforge.org/
|
62
|
+
licenses: []
|
63
|
+
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
version:
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "0"
|
80
|
+
version:
|
81
|
+
requirements: []
|
82
|
+
|
83
|
+
rubyforge_project: cotta
|
84
|
+
rubygems_version: 1.3.4
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: A project for a better file operation API in Ruby
|
88
|
+
test_files: []
|
89
|
+
|