xrt 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/lib/xrt/transaction.rb +4 -0
- data/lib/xrt/version.rb +1 -1
- data/test/test-transaction.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ca60b37f3d5fb5acab81879c1544798a34fefeb
|
4
|
+
data.tar.gz: c5198a67465e9b06bbe2a3bc4df4ad5dff94aa9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 484545f084afa66d9d77874769cdd1ee7e9684bd69a65358a5b8a74efd4fa83e279a4e37f4cee7e2ba0ef9c0774abeadd852fc9a81d1169b41f3a28e32bb7cb0
|
7
|
+
data.tar.gz: 4bbe85919e5dd9a401d161f6098e2639efa58bb309ab53badd3ce8fedc1fde331d742dc48ede71ec520b80883520e221e79758950b2b10f530547aac84c9ae3d
|
data/lib/xrt/transaction.rb
CHANGED
data/lib/xrt/version.rb
CHANGED
data/test/test-transaction.rb
CHANGED
@@ -27,6 +27,15 @@ class TestTransaction < Test::Unit::TestCase
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
30
|
+
def test_new_file_with_directory
|
31
|
+
Dir.mktmpdir{|dir|
|
32
|
+
transaction = XRT::Transaction.new
|
33
|
+
transaction.new_file transaction.full_path(dir, 'some_dir/hello.txt').to_s, 'Hello!'
|
34
|
+
transaction.commit!
|
35
|
+
assert_equal 'Hello!', transaction.full_path(dir, 'some_dir', 'hello.txt').open.read
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
30
39
|
def test_new_file_throws_error_when_conflict
|
31
40
|
Dir.mktmpdir{|dir|
|
32
41
|
Pathname(dir).join('hello.txt').open('w'){ |f| f.write 'existing content' }
|