README.md in rmega-0.2.7 vs README.md in rmega-0.3.1
- old
+ new
@@ -1,12 +1,13 @@
[![Gem Version](https://badge.fury.io/rb/rmega.svg)](https://badge.fury.io/rb/rmega)
-[![Build Status](https://travis-ci.org/topac/rmega.svg?branch=master)](https://travis-ci.org/topac/rmega)
+[![rmega](https://circleci.com/gh/topac/rmega.svg?style=svg)](https://circleci.com/gh/topac/rmega)
+
# rmega
Pure ruby library for <img src="https://mega.co.nz/favicon.ico" alt=""/> **MEGA** [https://mega.nz/](https://mega.nz/).
-Works on Linux and OSX with Ruby 1.9.3+.
+Works on Linux and OSX with Ruby 2.1+.
## Installation
```
gem install rmega
@@ -91,18 +92,29 @@
# Download a file by url
public_url = 'https://mega.nz/file/MAkg2Iab#bc9Y2U6d93IlRRKVYpcC9hLZjS4G278OPdH6nTFPDNQ'
Rmega.download(public_url, '~/Downloads')
```
-### Upload
+### Upload a file
```ruby
# Upload a file to a specific folder
folder = storage.root.folders[3]
folder.upload("~/Downloads/my_file.txt")
# Upload a file to the root folder
storage.root.upload("~/Downloads/my_other_file.txt")
+```
+
+### Upload a directory
+
+```ruby
+# Upload a directory to a specific folder
+folder = storage.root.folders[3]
+folder.upload_dir("~/Downloads/my_directory")
+
+# Upload a directory to the root folder
+storage.root.upload_dir("~/Downloads/my_other_directory")
```
### Creating a folder
```ruby