-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'quotify' | ||
require 'HTTParty' | ||
require 'yaml' | ||
require 'pry' | ||
|
||
if ARGV[0] == 'update' || ARGV[0] == 'u' | ||
puts "-------------------------------------\n"\ | ||
" ____ __ _ ____ | ||
/ __ \\__ ______ / /_(_) __/_ __ | ||
/ / / / / / / __ \\/ __/ / /_/ / / / | ||
/ /_/ / /_/ / /_/ / /_/ / __/ /_/ / | ||
\\___\\_\\__,_/\\____/\\__/_/_/ \\__, / | ||
/____/ \n"\ | ||
"-------------------------------------\n"\ | ||
"#{Quotify.generate}\n\n" | ||
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] | ||
File.write(File.join(__dir__, '../lib/quotify/quotes.yml'), payload.to_yaml) | ||
puts "Updated the quote database. Enjoy the new quotes. As always, believe in yourself.\n\n" | ||
else | ||
puts "Nothing to update\n\n" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
Gem::Specification.new do |s| | ||
s.name = 'quotify' | ||
s.version = '0.2.0' | ||
s.date = '2018-01-04' | ||
s.version = '0.3.0' | ||
s.date = '2018-01-31' | ||
s.summary = 'Generates random quotes' | ||
s.description = 'Generates random quotes. Perfect placeholder text.' | ||
s.author = 'Justin Leger' | ||
s.email = '[email protected]' | ||
s.files = ['lib/quotify/quotes.yml', 'lib/quotify/quote.rb', 'lib/quotify.rb', 'LICENSE', 'CHANGELOG.md'] | ||
s.homepage = 'https://github.com/jusleg/quotify-ruby' | ||
s.license = 'MIT' | ||
s.executables << 'quotify' | ||
|
||
s.metadata = { | ||
"source_code_uri" => "https://github.com/jusleg/quotify-ruby", | ||
"changelog_uri" => "https://github.com/jusleg/quotify-ruby/blob/master/CHANGELOG.md" | ||
} | ||
|
||
s.add_dependency 'json' | ||
s.add_development_dependency "rake" | ||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'mocha' | ||
s.add_development_dependency 'minitest' | ||
s.add_development_dependency 'simplecov' | ||
|