tori 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/README.md +2 -0
- data/lib/tori/backend/filesystem.rb +3 -0
- data/lib/tori/version.rb +1 -1
- data/test/test_tori_backend_filesystem.rb +6 -0
- data/test/test_tori_backend_s3.rb +1 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60c498b145993e83c117daa560ad2679d090cd35
|
4
|
+
data.tar.gz: d242d6b256b840d490000aeeb68c06bdb6ac1662
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15320df2ebf93398a6da016aad599dfc8ed4a9b8492ebe83184f30e27f3e89883fbbee33fbfd832f0cede6e262066fbd0e74282abe1e62dcd3e7c2e9ad521592
|
7
|
+
data.tar.gz: 86776a02078c91a7e7cb0fa30b1b5d63f8f9886ab8d2361845f054005e6ee0712443caa57f4d8cf99e21dcbef4d798ac2ab2aba42db3c6aea37a6d84d7306fd9
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -11,6 +11,9 @@ module Tori
|
|
11
11
|
case resource
|
12
12
|
when String
|
13
13
|
::File.open(path(filename), 'w'){ |f| f.write resource }
|
14
|
+
# see also https://bugs.ruby-lang.org/issues/11199
|
15
|
+
when Pathname
|
16
|
+
::IO.copy_stream resource.to_s, path(filename)
|
14
17
|
else
|
15
18
|
::IO.copy_stream resource, path(filename)
|
16
19
|
end
|
data/lib/tori/version.rb
CHANGED
@@ -41,5 +41,11 @@ class TestToriBackendFileSystem < Test::Unit::TestCase
|
|
41
41
|
|
42
42
|
@filesystem.write("copyfile", "string")
|
43
43
|
assert { "string" == @filesystem.read("copyfile") }
|
44
|
+
|
45
|
+
@filesystem.write(Pathname.new("copyfile"), @filesystem.path("testfile"))
|
46
|
+
assert { "text" == @filesystem.read("copyfile") }
|
47
|
+
|
48
|
+
@filesystem.write(Pathname.new("copyfile"), "string")
|
49
|
+
assert { "string" == @filesystem.read("copyfile") }
|
44
50
|
end
|
45
51
|
end
|
@@ -36,9 +36,7 @@ class TestToriBackendS3 < Test::Unit::TestCase
|
|
36
36
|
end
|
37
37
|
|
38
38
|
test "#read" do
|
39
|
-
|
40
|
-
# when call aws-sdk-core s3:get_object
|
41
|
-
# assert { "text" == @backend.read("testfile") }
|
39
|
+
assert_equal "text", @backend.read("testfile")
|
42
40
|
end
|
43
41
|
|
44
42
|
test "#exists?" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,6 +74,7 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
77
78
|
- Gemfile
|
78
79
|
- LICENSE.txt
|
79
80
|
- README.md
|