wq 1.0.1 → 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: 99c754aa1972272dc4d56849bd25d392db0c94d6858ab9824ef153359704c461
4
- data.tar.gz: 41b871ec70e79c59c4afe1add7b7acb7606dfceb49a3d70ca66c15b36cec60e4
3
+ metadata.gz: 120fff11d41745a8a0b4f9349ffb0ea0af6d56c0d6cb40384d9616f12c09f9aa
4
+ data.tar.gz: 669e7612150a82ae77f91e2b9b1d3aca7b974c695d3702b6de5f086960baccf7
5
5
  SHA512:
6
- metadata.gz: 4046bbcdbf37be0bcd924373656fe6873e5d5199cf37f6cd9c1e49bc8290346111bc3d6d0629f02cf7fec9c5c69e67ad84b94333cfafe8d04ceb1a351f494c6b
7
- data.tar.gz: 0b9b5b7858e91c4191963776db0aa74a099acb903aef422d44fe331a660bf385e8c195aad75048dac8a903491f3cf79876129fb73caad8c5e85b10519697b1e8
6
+ metadata.gz: 0c24111fe59222da20e098d8d264844bd607c6f7a19f9bd66045e37fde604b8908f94cab4e2220485f9c82da6e941a5206714b86be70ff14e2312c7685d552da
7
+ data.tar.gz: e5dbd8594d286d6936ec4d10eeb21a87f26fdf60f913992f46f1a482a31db33db545fda7fb77ac529d601676dc0a3cb71d5af0c379fe07d86c023af565dd47d9
data/README.md CHANGED
@@ -26,7 +26,7 @@ The quotes data source is [the dwyl/quotes repository](https://github.com/dwyl/q
26
26
 
27
27
  ## Releases
28
28
 
29
- To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`.
29
+ To release a new version, bump the version number in `version.rb`, run `bundle install`, and then `bundle exec rake release`.
30
30
 
31
31
  ## Resources
32
32
 
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."
@@ -6498,5 +6474,97 @@
6498
6474
  {
6499
6475
  "author": "Norman Vincent Peale",
6500
6476
  "text": "Change your thoughts and you change your world."
6477
+ },
6478
+ {
6479
+ "author": "Marcus Aurelius",
6480
+ "text": "The things you think about determine the quality of your mind."
6481
+ },
6482
+ {
6483
+ "author": "Marcus Aurelius",
6484
+ "text": "The impediment to action advances action. What stands in the way becomes the way."
6485
+ },
6486
+ {
6487
+ "author": "Marcus Aurelius",
6488
+ "text": "When you arise in the morning, think of what a precious privilege it is to be alive."
6489
+ },
6490
+ {
6491
+ "author": "Seneca",
6492
+ "text": "We suffer more often in imagination than in reality."
6493
+ },
6494
+ {
6495
+ "author": "Seneca",
6496
+ "text": "It is not that we have a short time to live, but that we waste a lot of it."
6497
+ },
6498
+ {
6499
+ "author": "Seneca",
6500
+ "text": "True happiness is to enjoy the present, without anxious dependence upon the future."
6501
+ },
6502
+ {
6503
+ "author": "Epictetus",
6504
+ "text": "Man is not worried by real problems so much as by his imagined anxieties about real problems."
6505
+ },
6506
+ {
6507
+ "author": "Epictetus",
6508
+ "text": "If you want to improve, be content to be thought foolish and stupid."
6509
+ },
6510
+ {
6511
+ "author": "Epictetus",
6512
+ "text": "Don't explain your philosophy. Embody it."
6513
+ },
6514
+ {
6515
+ "author": "Zeno of Citium",
6516
+ "text": "We have two ears and one mouth, so we should listen more than we say."
6517
+ },
6518
+ {
6519
+ "author": "Cicero",
6520
+ "text": "The function of wisdom is to discriminate between good and evil."
6521
+ },
6522
+ {
6523
+ "author": "Musonius Rufus",
6524
+ "text": "The soul becomes dyed with the color of its thoughts."
6525
+ },
6526
+ {
6527
+ "author": "Publilius Syrus",
6528
+ "text": "It is a great thing to know the season for speech and the season for silence."
6529
+ },
6530
+ {
6531
+ "author": "Heraclitus",
6532
+ "text": "No man ever steps in the same river twice."
6533
+ },
6534
+ {
6535
+ "author": "Alfred A. Montapert",
6536
+ "text": "Do not confuse motion and progress. A rocking horse keeps moving but does not make any progress."
6537
+ },
6538
+ {
6539
+ "author": "Alfred A. Montapert",
6540
+ "text": "The great essentials to be happy and successful are being a loving person and a vitalizer."
6541
+ },
6542
+ {
6543
+ "author": "Alfred A. Montapert",
6544
+ "text": "Action is the foundation key to all success."
6545
+ },
6546
+ {
6547
+ "author": "Alfred A. Montapert",
6548
+ "text": "An army of sheep led by a lion can defeat an army of lions led by a sheep."
6549
+ },
6550
+ {
6551
+ "author": "Alfred A. Montapert",
6552
+ "text": "Expect problems and face them. That is the winning way of life."
6553
+ },
6554
+ {
6555
+ "author": "Alfred A. Montapert",
6556
+ "text": "Life is a gift -- use it."
6557
+ },
6558
+ {
6559
+ "author": "Alfred A. Montapert",
6560
+ "text": "Nothing at is impossible to a willing heart."
6561
+ },
6562
+ {
6563
+ "author": "Alfred A. Montapert",
6564
+ "text": "Every new day is the start of a new success."
6565
+ },
6566
+ {
6567
+ "author": "Alfred A. Montapert",
6568
+ "text": "Don't be misled by what you see in the mass media or public schools. Real education is the result of deep thought and pure intent."
6501
6569
  }
6502
6570
  ]
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.0.1"
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.0.1
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: 3.7.2
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: []