fog-dtdream 0.0.7 → 0.0.8

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: f8c5290adef3beff7f2be88066e5adc31b613f73
4
- data.tar.gz: 815decd956a9bb646000c7fb148395b3a43ddca4
3
+ metadata.gz: cdafc6fb1ef049f3bad35a9178064074219bf5d0
4
+ data.tar.gz: ceee563e53eabc7400c672f71905325d43a5dac3
5
5
  SHA512:
6
- metadata.gz: e41c00d5e2d7866a14a10845cf5d7de046728eee5cfc247b9556bbd3c131de390dd3ec1f6f32e1e1f8472e4417df1a1c59750b0de39cc0491017ad8777e93b87
7
- data.tar.gz: 61c636ed394e684a92212a7530251f9202fe8da2863ed88b807d8528431f37f63d1aaae09d57f132e817b4b460d9d4e17c112812e7560db177e3b978e9b0de08
6
+ metadata.gz: e826e09e7175aa70e8c90170eb2e00498931df3f55ea282344e3a57aadc668f3848cafd4fcc0560f67c585e96e02f509edf8ca99478d12209a98e6356d9f7405
7
+ data.tar.gz: 5c382be83d9395fb40018c2dc365e7d809723e69106edcce240a94e5da0aee662800d93ceb4f05c8ff5acfb9808afbb3d5fbdf5c21b856aaed58ee2a7f2e90aa
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  *~
11
+ fog-dtdream-*.*.*.gem
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Fog::Dtdream
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fog/dtdream`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
3
  ## Installation
6
4
 
7
5
  Add this line to your application's Gemfile:
@@ -175,7 +173,7 @@ The remainder of this document details the model abstraction.
175
173
  To retrieve a list of directories:
176
174
 
177
175
  ```ruby
178
- conn.directories
176
+ dirs = conn.directories
179
177
  ```
180
178
 
181
179
  This returns a collection of `Fog::Storage::Dtdream::Directory` models:
@@ -185,7 +183,7 @@ This returns a collection of `Fog::Storage::Dtdream::Directory` models:
185
183
  To retrieve a specific directory:
186
184
 
187
185
  ```ruby
188
- conn.directories.get "dir"
186
+ dir = dirs.get "dir"
189
187
  ```
190
188
 
191
189
  This returns a `Fog::Storage::Dtdream::Directory` instance:
@@ -195,7 +193,7 @@ This returns a `Fog::Storage::Dtdream::Directory` instance:
195
193
  To create a directory:
196
194
 
197
195
  ```ruby
198
- conn.directories.create :key => 'backups'
196
+ dirs.create :key => 'backups'
199
197
  ```
200
198
 
201
199
  ## Delete Directory
@@ -237,28 +235,6 @@ file = directory.files.create :key => 'space.jpg', :body => File.open "space.jpg
237
235
 
238
236
  **Note**: For files larger than 5 GB please refer to the [Upload Large Files](#upload_large_files) section.
239
237
 
240
- ### Additional Parameters
241
-
242
- The `create` method also supports the following key values:
243
-
244
- <table>
245
- <tr>
246
- <th>Key</th>
247
- <th>Description</th>
248
- </tr>
249
- <tr>
250
- <td>:content_type</td>
251
- <td>The content type of the object. Cloud Files will attempt to auto detect this value if omitted.</td>
252
- </tr>
253
- <tr>
254
- <td>:origin</td>
255
- <td>The origin is the URI of the object's host.</td>
256
- </tr>
257
- <tr>
258
- <td>:etag</td>
259
- <td>The MD5 checksum of your object's data. If specified, Cloud Files will validate the integrity of the uploaded object.</td>
260
- </tr>
261
- </table>
262
238
 
263
239
  ## Upload Large Files
264
240
 
@@ -34,10 +34,7 @@ module Fog
34
34
  nil
35
35
  end
36
36
  else
37
- ret = service.get_container("")
38
- if ret
39
- new(:key => "")
40
- end
37
+ new(:key => "")
41
38
  end
42
39
  rescue Fog::Storage::Dtdream::NotFound
43
40
  nil
@@ -19,6 +19,9 @@ module Fog
19
19
  prefix = directory.key+"/"
20
20
  end
21
21
  files = service.list_objects({:prefix => prefix})["Contents"]
22
+ if nil == files
23
+ return
24
+ end
22
25
  data = Array.new
23
26
  i = 0
24
27
  files.each do |file|
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Dtdream
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-dtdream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - dengqinsi