Skip to content

Commit

Permalink
Merge pull request #7 from jusleg/v0.3.1
Browse files Browse the repository at this point in the history
small CLI fix
  • Loading branch information
jusleg authored Feb 2, 2018
2 parents a46c1e9 + 969bb1f commit 1e4fab2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## V0.3.1
Quotify CLI command can also be used to display random quotes without calling the update function. Calling `quotify` without parameter will now show a quote instead of returning null. Also the CLI logo was fixed.

## V0.3.0
Introduction quotify CLI. Pretty barebone implementation with update method. `quotify update` or `quotify u` updates the database.

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
quotify (0.3.0)
quotify (0.3.1)
httparty
json

Expand Down
13 changes: 7 additions & 6 deletions bin/quotify
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ require 'quotify'
require 'HTTParty'
require 'yaml'

if ARGV[0] == 'update' || ARGV[0] == 'u'
puts "-------------------------------------\n"\
" ____ __ _ ____
puts "-------------------------------------\n"\
" ____ __ _ ____
/ __ \\__ ______ / /_(_) __/_ __
/ / / / / / / __ \\/ __/ / /_/ / / /
/ /_/ / /_/ / /_/ / /_/ / __/ /_/ /
\\___\\_\\__,_/\\____/\\__/_/_/ \\__, /
/____/ \n"\
"-------------------------------------\n"\
"#{Quotify.generate}\n\n"
.____/ /
/______/\n"\
"-------------------------------------\n"\
"#{Quotify.generate}\n\n"
if ARGV[0] == 'update' || ARGV[0] == 'u'
payload = YAML.load(HTTParty.get('https://raw.githubusercontent.com/jusleg/quotify-ruby/master/lib/quotify/quotes.yml'))

if Quotify.config[:updated_at] < payload[:updated_at]
Expand Down
2 changes: 1 addition & 1 deletion quotify.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'quotify'
s.version = '0.3.0'
s.version = '0.3.1'
s.date = '2018-01-31'
s.summary = 'Generates random quotes'
s.description = 'Generates random quotes. Perfect placeholder text.'
Expand Down

0 comments on commit 1e4fab2

Please sign in to comment.