tori 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: becdba49b085e240f7f35bd1936ced8b5358e5d6
4
- data.tar.gz: 85146243cf9c41a9fd10153715380aaaada143e4
3
+ metadata.gz: 60c498b145993e83c117daa560ad2679d090cd35
4
+ data.tar.gz: d242d6b256b840d490000aeeb68c06bdb6ac1662
5
5
  SHA512:
6
- metadata.gz: e4efb7ade0894f4debf0a62ca997aa24ae7e20c1894709be262f9d687ff43b2affb1dbc8a0d0c2f318d9dad9678659ccf4ca4014e8ee6ff7457348ef7794b556
7
- data.tar.gz: e9437e94347e488a8eafefe023077e37b28ee5e30185b3f182b02d2c35707e4b6c64dc0341139f282883f02ca850c986a6435e5e02be94f93aceb364bb53fb91
6
+ metadata.gz: 15320df2ebf93398a6da016aad599dfc8ed4a9b8492ebe83184f30e27f3e89883fbbee33fbfd832f0cede6e262066fbd0e74282abe1e62dcd3e7c2e9ad521592
7
+ data.tar.gz: 86776a02078c91a7e7cb0fa30b1b5d63f8f9886ab8d2361845f054005e6ee0712443caa57f4d8cf99e21dcbef4d798ac2ab2aba42db3c6aea37a6d84d7306fd9
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.6
4
+ - 2.2.2
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Tori
2
2
  ===
3
3
 
4
+ [![Build Status](https://travis-ci.org/ksss/tori.svg?branch=master)](https://travis-ci.org/ksss/tori)
5
+
4
6
  "(\\( ⁰⊖⁰)/)"
5
7
 
6
8
  Tori is a very very simple file uploader.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tori
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -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
- # Incredible, Cannot continue run code thereafter
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.6
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-03-01 00:00:00.000000000 Z
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