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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d56e52c07a06315670397f3d6e8a247bdc292e35
4
- data.tar.gz: 72d150ad6dec4b370910480c9610d92d04480de3
3
+ metadata.gz: ef7b4999b8e45c9a0dc01694ed2d959d17937605
4
+ data.tar.gz: cc3f86d2242538bbe8dd0e6014d2df4ba2078c6f
5
5
  SHA512:
6
- metadata.gz: 77d2cf552e6a0f85cfdfb684d4a5788026255fffad670a096b4d96790cb7fc3e92332f51990e23b9e369a3d002110b27e0298b78ad9732a0838c396eeb9a0e29
7
- data.tar.gz: 0881c4547307abec21c2a6b66cdcacfa08b9c6a951ac3b12348316c0758b5eb8e7bc1b015f2bf3f3c4d388b8243da5ecebe298ee3b1b46143726b6c986da9fdf
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(path(filename), 'wb'){ |f| f.write resource }
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
- FileUtils.mkdir_p path(filename).dirname
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(path(filename), 'wb') do |dst|
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
@@ -1,3 +1,3 @@
1
1
  module Tori
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
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
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-02-29 00:00:00.000000000 Z
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.5.1
135
+ rubygems_version: 2.6.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Simple file uploader