quotify 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 947b696a1aadf9f898e7ab6024bee8553634995e2515821d3a84a5d0b9e7a8ca
4
- data.tar.gz: ba7bed8d8578c3d68fa5ad0b7bc198b4d319d28c1a4176bb98eb9e721fd6cfae
3
+ metadata.gz: effe75ebf5a35879f5578a0286cc538b46a982c829715399b36c1fdeda33bc21
4
+ data.tar.gz: cafb9418e7f98dd5c0e92c67c13a021a045639b3c56ad0ef79983c10a0830dca
5
5
  SHA512:
6
- metadata.gz: c0ebbdcb57598bb013368885bbe0b2a2229f4e78edf47f3a4fa410df9221cc48c4a0c30f36a440d2ca24e2f19755c562a7ec4d0f6e03f15489ba25edcea29004
7
- data.tar.gz: 11115de3813e56912a2a5d643230f3e240e00c72dccb0953ad0e3c7b2e6faa14828b7d33a9d77a278cf38bcb455e53461d8c412ff80a4f23f36dd09a15a6dfe8
6
+ metadata.gz: f3783ef58fa4f42fd7cdb2228ea8a5c7b3736c47a1734daa9a996b451505d95576d31e4b44b3fb98e9e557b8353d065b12c93de51626f7de6cee083463892ddf
7
+ data.tar.gz: 198c6f2b60d4a81848fb5b8408f9338d5bc3687d77689c685f3c0da8c080bdbd6eaf8634267d8c5e5955ba72db437765668ec1baab739608b03e51e5f9bb954d
@@ -1,4 +1,7 @@
1
- ## V0.2.0rc
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
@@ -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
@@ -1,5 +1,6 @@
1
- :updated_at: 2018-01-08
2
- :default_spacer: ' - '
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.2.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-04 00:00:00.000000000 Z
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