README.md in ortega-0.0.6 vs README.md in ortega-0.0.7
- old
+ new
@@ -1,11 +1,9 @@
# Ortega
-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/ortega`. To experiment with that code, run `bin/console` for an interactive prompt.
+Ruby file downloader
-TODO: Delete this and the text above, and describe your gem
-
## Installation
Add this line to your application's Gemfile:
```ruby
@@ -20,10 +18,35 @@
$ gem install ortega
## Usage
-TODO: Write usage instructions here
+```ruby
+ require 'ortega'
+
+ Ortega.download('example.com/downloadable_file.pdf')
+ # Output
+ # Downloading downloadable_file.pdf
+ ############ 12 %
+```
+
+You can specify target path, file name and its extension by passing arguments
+
+Example
+
+```ruby
+Ortega.download('example.com/downloadable_file.pdf', name: 'my_file.pdf', path: '~/Desktop')
+```
+If you want to hide progress bar, set ```bar``` option to false
+
+```ruby
+Ortega.download('example.com/downloadable_file.pdf', bar: false)
+```
+
+If url does not contain the extension, it should be good to spectify it manually as:
+```ruby
+Ortega.download('example.com/downloadable_file', extension: 'pdf')
+```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.