quotify 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/bin/quotify +25 -0
- data/lib/quotify/quotes.yml +4 -3
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: effe75ebf5a35879f5578a0286cc538b46a982c829715399b36c1fdeda33bc21
|
4
|
+
data.tar.gz: cafb9418e7f98dd5c0e92c67c13a021a045639b3c56ad0ef79983c10a0830dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3783ef58fa4f42fd7cdb2228ea8a5c7b3736c47a1734daa9a996b451505d95576d31e4b44b3fb98e9e557b8353d065b12c93de51626f7de6cee083463892ddf
|
7
|
+
data.tar.gz: 198c6f2b60d4a81848fb5b8408f9338d5bc3687d77689c685f3c0da8c080bdbd6eaf8634267d8c5e5955ba72db437765668ec1baab739608b03e51e5f9bb954d
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
## V0.
|
1
|
+
## V0.3.0
|
2
|
+
Introduction quotify CLI. Pretty barebone implementation with update method. `quotify update` or `quotify u` updates the database.
|
3
|
+
|
4
|
+
## V0.2.0
|
2
5
|
Saves the quotes in memory to prevent too many IO operations. Added configs that can be updated at runtime. `quotes.yml` only works with symbols as keys. From now on, prioritize symbols over strings. A new field `updated_at` was added to `quotes.yml` to allow for updating quotes using gem command. This will be added in the future.
|
3
6
|
|
4
7
|
## V0.1.1
|
data/bin/quotify
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'quotify'
|
4
|
+
require 'HTTParty'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
if ARGV[0] == 'update' || ARGV[0] == 'u'
|
8
|
+
puts "-------------------------------------\n"\
|
9
|
+
" ____ __ _ ____
|
10
|
+
/ __ \\__ ______ / /_(_) __/_ __
|
11
|
+
/ / / / / / / __ \\/ __/ / /_/ / / /
|
12
|
+
/ /_/ / /_/ / /_/ / /_/ / __/ /_/ /
|
13
|
+
\\___\\_\\__,_/\\____/\\__/_/_/ \\__, /
|
14
|
+
/____/ \n"\
|
15
|
+
"-------------------------------------\n"\
|
16
|
+
"#{Quotify.generate}\n\n"
|
17
|
+
payload = YAML.load(HTTParty.get('https://raw.githubusercontent.com/jusleg/quotify-ruby/master/lib/quotify/quotes.yml'))
|
18
|
+
|
19
|
+
if Quotify.config[:updated_at] < payload[:updated_at]
|
20
|
+
File.write(File.join(__dir__, '../lib/quotify/quotes.yml'), payload.to_yaml)
|
21
|
+
puts "Updated the quote database. Enjoy the new quotes. As always, believe in yourself.\n\n"
|
22
|
+
else
|
23
|
+
puts "Nothing to update\n\n"
|
24
|
+
end
|
25
|
+
end
|
data/lib/quotify/quotes.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
|
-
:
|
1
|
+
---
|
2
|
+
:updated_at: 2018-01-31
|
3
|
+
:default_spacer: " - "
|
3
4
|
:authors:
|
4
5
|
- Ivanka Trump
|
5
6
|
- Dog The Bounty Hunter
|
@@ -28,7 +29,6 @@
|
|
28
29
|
- Snoop Dogg
|
29
30
|
- Olga
|
30
31
|
- Logan Paul
|
31
|
-
|
32
32
|
:quotes:
|
33
33
|
- The ode lives upon the ideal, the epic upon the grandiose, the drama upon the real.
|
34
34
|
- If we don't study the mistakes of the future we're doomed to repeat them for the
|
@@ -94,3 +94,4 @@
|
|
94
94
|
- Best merch in the game
|
95
95
|
- Link in Bio
|
96
96
|
- Be a maverick
|
97
|
+
- DAMN DAWG.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quotify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Leger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,12 +110,14 @@ dependencies:
|
|
96
110
|
version: '0'
|
97
111
|
description: Generates random quotes. Perfect placeholder text.
|
98
112
|
email: hey@justinleger.ca
|
99
|
-
executables:
|
113
|
+
executables:
|
114
|
+
- quotify
|
100
115
|
extensions: []
|
101
116
|
extra_rdoc_files: []
|
102
117
|
files:
|
103
118
|
- CHANGELOG.md
|
104
119
|
- LICENSE
|
120
|
+
- bin/quotify
|
105
121
|
- lib/quotify.rb
|
106
122
|
- lib/quotify/quote.rb
|
107
123
|
- lib/quotify/quotes.yml
|