tori 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tori/backend/filesystem.rb +6 -4
- data/lib/tori/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7b4999b8e45c9a0dc01694ed2d959d17937605
|
4
|
+
data.tar.gz: cc3f86d2242538bbe8dd0e6014d2df4ba2078c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e613f73fcfb2195a1f3635527be1a60e2627bc0db7c1c39f10056d35c970f3683666519cb4d3afecde4e69faff43df83a089ae0e9ef31fb2f84e5fa772827799
|
7
|
+
data.tar.gz: e7c63029df20ff69d6def1c69bbe38ea7f2c27bb1a2afe4d8fe417851bf8de84f15709802e64e7e7c0fec9e9d2bc5a48ee5779cb3560990029c1d026fff820d5
|
@@ -8,19 +8,21 @@ module Tori
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def write(filename, resource, opts = nil)
|
11
|
+
pathname = path(filename)
|
12
|
+
FileUtils.mkdir_p pathname.dirname
|
13
|
+
|
11
14
|
case resource
|
12
15
|
when String
|
13
|
-
::File.open(
|
16
|
+
::File.open(pathname, 'wb'){ |f| f.write resource }
|
14
17
|
when Pathname
|
15
18
|
# see also https://bugs.ruby-lang.org/issues/11199
|
16
19
|
::File.open(resource) { |src|
|
17
|
-
|
18
|
-
::File.open(path(filename), 'wb'){ |dst|
|
20
|
+
::File.open(pathname, 'wb'){ |dst|
|
19
21
|
::IO.copy_stream src, dst
|
20
22
|
}
|
21
23
|
}
|
22
24
|
else
|
23
|
-
::File.open(
|
25
|
+
::File.open(pathname, 'wb') do |dst|
|
24
26
|
::IO.copy_stream resource, dst
|
25
27
|
end
|
26
28
|
end
|
data/lib/tori/version.rb
CHANGED
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.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.6.1
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: Simple file uploader
|