wq 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8944bf491347ab7f2de46760aee52f99547a540000d2d33bd043debe4135a45
4
- data.tar.gz: d55fca02ae763d585c988fecea441741b0a687a1789a2cbd40c601cd5326c6d5
3
+ metadata.gz: 120fff11d41745a8a0b4f9349ffb0ea0af6d56c0d6cb40384d9616f12c09f9aa
4
+ data.tar.gz: 669e7612150a82ae77f91e2b9b1d3aca7b974c695d3702b6de5f086960baccf7
5
5
  SHA512:
6
- metadata.gz: d1206cfd73209c61d3017c75683c27fb6c1b72049e794aa9ffcc1ee19d20dfb55bf19d336a702d77eb8126f210c7d7204ed0b8753ff7bbc7a6f452027df3c3a8
7
- data.tar.gz: 822a56b744ddcf7b84ce2b973e15e7375aa757a42c80e10090e895993427e328d78a91757dc2d81fe1a110bcf61f4f6af0cce0664c373923f0e162ed4b1186f6
6
+ metadata.gz: 0c24111fe59222da20e098d8d264844bd607c6f7a19f9bd66045e37fde604b8908f94cab4e2220485f9c82da6e941a5206714b86be70ff14e2312c7685d552da
7
+ data.tar.gz: e5dbd8594d286d6936ec4d10eeb21a87f26fdf60f913992f46f1a482a31db33db545fda7fb77ac529d601676dc0a3cb71d5af0c379fe07d86c023af565dd47d9
data/data/quotes.json CHANGED
@@ -1539,10 +1539,6 @@
1539
1539
  "author": "Colette",
1540
1540
  "text": "I love my past. I love my present. I'm not ashamed of what I've had, and I'm not sad because I have it no longer."
1541
1541
  },
1542
- {
1543
- "author": "Colette",
1544
- "text": "I love my past. I love my present. I'm not ashamed of what I've had, and I'm not sad because I have it no longer."
1545
- },
1546
1542
  {
1547
1543
  "author": "Colin Powell",
1548
1544
  "text": "If you are going to achieve excellence in big things, you develop the habit in little matters. Excellence is not an exception, it is a prevailing attitude."
@@ -3279,10 +3275,6 @@
3279
3275
  "author": "John Lennon",
3280
3276
  "text": "Life is what happens to you while you're busy making other plans."
3281
3277
  },
3282
- {
3283
- "author": "John Lennon",
3284
- "text": "You may say I'm a dreamer, but I'm not the only one, I hope someday you will join us, and the world will live as one."
3285
- },
3286
3278
  {
3287
3279
  "author": "John Locke",
3288
3280
  "text": "I have always thought the actions of men the best interpreters of their thoughts."
@@ -3799,10 +3791,6 @@
3799
3791
  "author": "Louisa Alcott",
3800
3792
  "text": "I'm not afraid of storms, for I'm learning how to sail my ship."
3801
3793
  },
3802
- {
3803
- "author": "Louisa Alcott",
3804
- "text": "I'm not afraid of storms, for I'm learning how to sail my ship."
3805
- },
3806
3794
  {
3807
3795
  "author": "Louise Hay",
3808
3796
  "text": "The thoughts we choose to think are the tools we use to paint the canvas of our lives."
@@ -4631,10 +4619,6 @@
4631
4619
  "author": "Oscar Wilde",
4632
4620
  "text": "Be yourself; everyone else is already taken."
4633
4621
  },
4634
- {
4635
- "author": "Oscar Wilde",
4636
- "text": "Be yourself; everyone else is already taken."
4637
- },
4638
4622
  {
4639
4623
  "author": "Ovid",
4640
4624
  "text": "The cause is hidden. The effect is visible to all."
@@ -5235,10 +5219,6 @@
5235
5219
  "author": "Richard Bach",
5236
5220
  "text": "You are never given a wish without also being given the power to make it come true. You may have to work for it, however."
5237
5221
  },
5238
- {
5239
- "author": "Richard Bach",
5240
- "text": "Argue for your limitations, and sure enough they're yours."
5241
- },
5242
5222
  {
5243
5223
  "author": "Richard Evans",
5244
5224
  "text": "The undertaking of a new action brings new strength."
@@ -5495,10 +5475,6 @@
5495
5475
  "author": "Seneca",
5496
5476
  "text": "Things that were hard to bear are sweet to remember."
5497
5477
  },
5498
- {
5499
- "author": "Seneca",
5500
- "text": "Luck is what happens when preparation meets opportunity."
5501
- },
5502
5478
  {
5503
5479
  "author": "Seneca",
5504
5480
  "text": "It is the power of the mind to be unconquerable."
@@ -6503,22 +6479,10 @@
6503
6479
  "author": "Marcus Aurelius",
6504
6480
  "text": "The things you think about determine the quality of your mind."
6505
6481
  },
6506
- {
6507
- "author": "Marcus Aurelius",
6508
- "text": "You have power over your mind — not outside events. Realize this, and you will find strength."
6509
- },
6510
- {
6511
- "author": "Marcus Aurelius",
6512
- "text": "Waste no more time arguing about what a good man should be. Be one."
6513
- },
6514
6482
  {
6515
6483
  "author": "Marcus Aurelius",
6516
6484
  "text": "The impediment to action advances action. What stands in the way becomes the way."
6517
6485
  },
6518
- {
6519
- "author": "Marcus Aurelius",
6520
- "text": "Very little is needed to make a happy life; it is all within yourself, in your way of thinking."
6521
- },
6522
6486
  {
6523
6487
  "author": "Marcus Aurelius",
6524
6488
  "text": "When you arise in the morning, think of what a precious privilege it is to be alive."
@@ -6531,22 +6495,10 @@
6531
6495
  "author": "Seneca",
6532
6496
  "text": "It is not that we have a short time to live, but that we waste a lot of it."
6533
6497
  },
6534
- {
6535
- "author": "Seneca",
6536
- "text": "Luck is what happens when preparation meets opportunity."
6537
- },
6538
- {
6539
- "author": "Seneca",
6540
- "text": "Difficulties strengthen the mind, as labor does the body."
6541
- },
6542
6498
  {
6543
6499
  "author": "Seneca",
6544
6500
  "text": "True happiness is to enjoy the present, without anxious dependence upon the future."
6545
6501
  },
6546
- {
6547
- "author": "Epictetus",
6548
- "text": "It's not what happens to you, but how you react to it that matters."
6549
- },
6550
6502
  {
6551
6503
  "author": "Epictetus",
6552
6504
  "text": "Man is not worried by real problems so much as by his imagined anxieties about real problems."
@@ -6599,10 +6551,6 @@
6599
6551
  "author": "Alfred A. Montapert",
6600
6552
  "text": "Expect problems and face them. That is the winning way of life."
6601
6553
  },
6602
- {
6603
- "author": "Alfred A. Montapert",
6604
- "text": "The shortest answer is doing."
6605
- },
6606
6554
  {
6607
6555
  "author": "Alfred A. Montapert",
6608
6556
  "text": "Life is a gift -- use it."
data/data/words.json CHANGED
@@ -65,7 +65,7 @@
65
65
  "meanings": [
66
66
  {
67
67
  "definition": "With hands on the hips and elbows turned outward.",
68
- "partOfSpeech": "adverb/adjective",
68
+ "partOfSpeech": "adverb",
69
69
  "example": "She stood with her arms akimbo, ready to argue her point.",
70
70
  "synonyms": ["hands on hips", "elbows out"]
71
71
  }
@@ -663,7 +663,7 @@
663
663
  },
664
664
  {
665
665
  "definition": "Infecting plants with blight (a disease).",
666
- "partOfSpeech": "verb (present participle)",
666
+ "partOfSpeech": "verb",
667
667
  "example": "A fungus was blighting the tomato crops.",
668
668
  "synonyms": [
669
669
  "infecting",
@@ -1290,7 +1290,7 @@
1290
1290
  "meanings": [
1291
1291
  {
1292
1292
  "definition": "People who are considered to be especially well informed about a particular subject.",
1293
- "partOfSpeech": "noun, plural",
1293
+ "partOfSpeech": "noun",
1294
1294
  "example": "The new art exhibition was highly praised by the cognoscenti.",
1295
1295
  "synonyms": [
1296
1296
  "experts",
@@ -13,8 +13,11 @@ module Wq
13
13
  def run(letter=nil)
14
14
  if letter.nil?
15
15
  words = Wq::Data.words
16
- else
16
+ elsif letter.match?(/\A[a-z]\z/i)
17
17
  words = Wq::Data.words.select { |w| w[:word].start_with?(letter.downcase) }
18
+ else
19
+ print_error("Invalid letter '#{letter}'. Expected a single letter A-Z.")
20
+ exit 1
18
21
  end
19
22
 
20
23
  if words.empty?
@@ -24,7 +24,7 @@ module Wq
24
24
  synonyms = meaning[:synonyms].compact.join(", ")
25
25
  puts ["\u{21BB}", synonyms].join(" ") if !meaning[:synonyms].empty?
26
26
 
27
- puts ""
27
+ puts
28
28
  end
29
29
  end
30
30
  end
@@ -20,7 +20,7 @@ module Wq
20
20
  meanings.each do |meaning|
21
21
  puts colors.white(meaning[:definition])
22
22
  puts colors.gray(['"', meaning[:example], '"'].join)
23
- puts ""
23
+ puts
24
24
  end
25
25
  end
26
26
  end
@@ -29,7 +29,7 @@ module Wq
29
29
  puts ""
30
30
  indent(2) do
31
31
  puts "\"#{quote[:text]}\""
32
- puts colors.gray("-— #{quote[:author]}")
32
+ puts colors.gray("-- #{quote[:author]}")
33
33
  end
34
34
  end
35
35
 
data/lib/wq/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wq
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Julio
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 4.0.17
71
+ rubygems_version: 4.0.23
72
72
  specification_version: 4
73
73
  summary: A CLI (wq) to learn 500+ words and inspirational quotes.
74
74
  test_files: []