Skip to content

Commit

Permalink
Updated README. Updated description. Prepared for release. Use quiet …
Browse files Browse the repository at this point in the history
…only for Thor log.
  • Loading branch information
merqlove committed Jul 17, 2014
1 parent 77bc8ab commit e0f064b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ First you may need to set DigitalOcean API keys:
```shell
export DIGITAL_OCEAN_CLIENT_ID = "SOMEID"
export DIGITAL_OCEAN_API_KEY = "SOMEKEY"
```
```

If you want to set keys without environment, than set it via options:

```shell
Expand Down Expand Up @@ -76,11 +77,11 @@ Description:

--mail to:[email protected] from:[email protected] --smtp address:smtp.gmail.com user_name:someuser password:somepassword

For more details look here: https://github.com/benprew/pony
For more details look here: [https://github.com/benprew/pony](https://github.com/benprew/pony)

Example:

> $ do_snapshot --keep 5
> $ do_snapshot --keep 5 --quiet

> $ do_snapshot --only 123456 1234567 --store 3

Expand Down
4 changes: 2 additions & 2 deletions do_snapshot.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
spec.version = DoSnapshot::VERSION
spec.authors = ['Alexander Merkulov']
spec.email = ['[email protected]']
spec.summary = %q{Snapshot runner for Digital Ocean droplets. Use it with Cron or other tools.}
spec.description = %q{Snapshot runner for Digital Ocean droplets. Use it with Cron or other tools.}
spec.summary = %q{Snapshot creator for Digital Ocean droplets. Use it with Cron or other tools.}
spec.description = %q{Snapshot creator for Digital Ocean droplets. Use it with Cron or other tools.}
spec.homepage = 'http://github.com/merqlove/do_snapshot'
spec.license = 'MIT'

Expand Down
7 changes: 5 additions & 2 deletions lib/do_snapshot/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ class CLI < Thor

def initialize(*args)
super
if options.include?('log') && !options.include?('quiet')

# Use Thor log especially
Log.thor_log = Thor::Shell::Color.new unless options.include?('quiet')

if options.include?('log')
Log.logger = Logger.new(options['log'])
Log.thor_log = Thor::Shell::Color.new
Log.logger.level = options.include?('trace') ? Logger::DEBUG : Logger::INFO
end

Expand Down

0 comments on commit e0f064b

Please sign in to comment.