random-words 1.0.8 → 1.0.10

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +0 -1
  3. data/CHANGELOG.md +30 -0
  4. data/LICENSE +19 -0
  5. data/README.md +21 -13
  6. data/bin/randw +20 -7
  7. data/lib/random-words/array.rb +9 -0
  8. data/lib/random-words/boolean.rb +60 -0
  9. data/lib/random-words/config.rb +8 -2
  10. data/lib/random-words/generator.rb +89 -46
  11. data/lib/random-words/lorem-markdown.rb +20 -3
  12. data/lib/random-words/number-to-word.rb +4 -4
  13. data/lib/random-words/numeric.rb +13 -0
  14. data/lib/random-words/string.rb +112 -13
  15. data/lib/random-words/version.rb +1 -1
  16. data/lib/random-words/words/1984/clauses.txt +79 -79
  17. data/lib/random-words/words/1984/terminators.txt +1 -0
  18. data/lib/random-words/words/alice/clauses.txt +81 -81
  19. data/lib/random-words/words/alice/terminators.txt +1 -0
  20. data/lib/random-words/words/bacon/clauses.txt +639 -639
  21. data/lib/random-words/words/bacon/terminators.txt +1 -0
  22. data/lib/random-words/words/corporate/clauses.txt +100 -100
  23. data/lib/random-words/words/doctor/clauses.txt +83 -83
  24. data/lib/random-words/words/english/clauses.txt +639 -639
  25. data/lib/random-words/words/english/conjunctions-subordinate.txt +0 -1
  26. data/lib/random-words/words/english/terminators.txt +1 -0
  27. data/lib/random-words/words/foulmouth/clauses.txt +58 -58
  28. data/lib/random-words/words/hipster/clauses.txt +180 -180
  29. data/lib/random-words/words/hipster/conjunctions-coordinating.txt +1 -1
  30. data/lib/random-words/words/hipster/phrases.txt +3 -3
  31. data/lib/random-words/words/spanish/clauses.txt +74 -74
  32. data/lib/random-words/words/spanish/config.yml +1 -1
  33. data/lib/random-words/words/spanish/terminators.txt +0 -3
  34. data/lib/random-words/words/veggie/clauses.txt +57 -57
  35. data/lib/random-words.rb +2 -0
  36. data/src/_README.md +25 -13
  37. metadata +5 -3
  38. data/Gemfile.lock +0 -131
@@ -1,74 +1,74 @@
1
- antes de que anochezca.
2
- antes de que empiece la tormenta.
3
- aunque esté cansado.
4
- aunque esté ocupado.
5
- aunque me digas lo contrario.
6
- aunque me sienta nervioso.
7
- aunque no creas en mí.
8
- aunque no lo creas.
9
- aunque no lo entiendo.
10
- aunque no lo esperaba.
11
- aunque no lo recuerde.
12
- aunque no lo sepas.
13
- aunque no sea fácil.
14
- aunque no sea perfecto.
15
- aunque no tenga ganas.
16
- aunque parezca imposible.
17
- como si no pasara nada.
18
- cuando abrí la puerta.
19
- cuando cruzamos la calle.
20
- cuando el sol salió.
21
- cuando empecé a trabajar.
22
- cuando era niño.
23
- cuando escuché la noticia.
24
- cuando hable con el profesor.
25
- cuando llegó el paquete.
26
- cuando llegué a casa.
27
- cuando lleguen los invitados.
28
- cuando me despierto por la mañana.
29
- cuando me envíes el mensaje.
30
- cuando me llamaste.
31
- cuando me siento feliz.
32
- cuando pasamos por el parque.
33
- cuando salimos de vacaciones.
34
- cuando termine el día.
35
- cuando termine el trabajo.
36
- cuando termine la película.
37
- cuando vi a mis amigos.
38
- después de que acabe la conferencia.
39
- después de que cenamos.
40
- después de que comí.
41
- después de que hable con ella.
42
- después de que se fue.
43
- después de que termine la reunión.
44
- después de que terminó la clase.
45
- mientras él cocinaba.
46
- mientras ella cantaba.
47
- mientras esperábamos el tren.
48
- mientras estudiaba para el examen.
49
- mientras leía un libro.
50
- porque es importante.
51
- porque estaba lloviendo.
52
- porque lo dijo él.
53
- porque no puedo esperar.
54
- porque quiero descansar.
55
- si decides venir.
56
- si encuentras mis llaves.
57
- si hay algo que decir.
58
- si hay tiempo suficiente.
59
- si lo deseas.
60
- si lo haces por mí.
61
- si me das una oportunidad.
62
- si me invitas a la fiesta.
63
- si no hay problemas.
64
- si no llego a tiempo.
65
- si no tienes planes.
66
- si puedo ayudar.
67
- si tienes alguna pregunta.
68
- si tienes tiempo.
69
- si tú me ayudas.
70
- siempre que estés listo.
71
- siempre que lo necesites.
72
- siempre que me necesites.
73
- siempre que sea necesario.
74
- siempre que sea posible.
1
+ antes de que anochezca
2
+ antes de que empiece la tormenta
3
+ aunque esté cansado
4
+ aunque esté ocupado
5
+ aunque me digas lo contrario
6
+ aunque me sienta nervioso
7
+ aunque no creas en
8
+ aunque no lo creas
9
+ aunque no lo entiendo
10
+ aunque no lo esperaba
11
+ aunque no lo recuerde
12
+ aunque no lo sepas
13
+ aunque no sea fácil
14
+ aunque no sea perfecto
15
+ aunque no tenga ganas
16
+ aunque parezca imposible
17
+ como si no pasara nada
18
+ cuando abrí la puerta
19
+ cuando cruzamos la calle
20
+ cuando el sol salió
21
+ cuando empecé a trabajar
22
+ cuando era niño
23
+ cuando escuché la noticia
24
+ cuando hable con el profesor
25
+ cuando llegó el paquete
26
+ cuando llegué a casa
27
+ cuando lleguen los invitados
28
+ cuando me despierto por la mañana
29
+ cuando me envíes el mensaje
30
+ cuando me llamaste
31
+ cuando me siento feliz
32
+ cuando pasamos por el parque
33
+ cuando salimos de vacaciones
34
+ cuando termine el día
35
+ cuando termine el trabajo
36
+ cuando termine la película
37
+ cuando vi a mis amigos
38
+ después de que acabe la conferencia
39
+ después de que cenamos
40
+ después de que comí
41
+ después de que hable con ella
42
+ después de que se fue
43
+ después de que termine la reunión
44
+ después de que terminó la clase
45
+ mientras él cocinaba
46
+ mientras ella cantaba
47
+ mientras esperábamos el tren
48
+ mientras estudiaba para el examen
49
+ mientras leía un libro
50
+ porque es importante
51
+ porque estaba lloviendo
52
+ porque lo dijo él
53
+ porque no puedo esperar
54
+ porque quiero descansar
55
+ si decides venir
56
+ si encuentras mis llaves
57
+ si hay algo que decir
58
+ si hay tiempo suficiente
59
+ si lo deseas
60
+ si lo haces por
61
+ si me das una oportunidad
62
+ si me invitas a la fiesta
63
+ si no hay problemas
64
+ si no llego a tiempo
65
+ si no tienes planes
66
+ si puedo ayudar
67
+ si tienes alguna pregunta
68
+ si tienes tiempo
69
+ si tú me ayudas
70
+ siempre que estés listo
71
+ siempre que lo necesites
72
+ siempre que me necesites
73
+ siempre que sea necesario
74
+ siempre que sea posible
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  name: spanish
3
3
  description: Spanish words
4
- triggers: [spanish,espanol]
4
+ triggers: [spanish,espanol,español,espanola,espanoles]
@@ -6,9 +6,6 @@
6
6
  ,.
7
7
  ¿,?
8
8
  ¿,?
9
- ¿,?
10
- ¡,!
11
- ¡,!
12
9
  ¡,!
13
10
 
14
11
  ",."
@@ -1,57 +1,57 @@
1
- when I buy fresh vegetables
2
- after I wash the greens
3
- before I chop the carrots
4
- while cooking the stir-fry
5
- as I prepare the salad
6
- if the vegetables are in season
7
- because I prefer organic produce
8
- that I picked from the farmers' market
9
- so that I can eat healthier
10
- once I have everything ready
11
- although they are a bit pricey
12
- since they taste better raw
13
- whether I sauté or steam them
14
- while they are still crisp
15
- as soon as I get home
16
- once I finish my grocery shopping
17
- although they require some prep time
18
- if I can find them locally
19
- when I want to try a new recipe
20
- because they are packed with nutrients
21
- after I season them properly
22
- as I blend the vegetable soup
23
- while I wait for the water to boil
24
- when I add spices to the mix
25
- if they are stored properly
26
- before serving them to guests
27
- since they can enhance the flavor
28
- as I experiment with different cooking methods
29
- when I finish chopping the herbs
30
- if I need to feed a large group
31
- because I like to eat a variety of veggies
32
- as soon as I find the freshest ingredients
33
- after I check for quality and freshness
34
- when I plan my weekly meals
35
- while I enjoy the cooking process
36
- if I can find a good recipe
37
- that I can share with friends
38
- when I want to incorporate more greens
39
- because they add color to the plate
40
- as I prepare a hearty vegetable dish
41
- when I want to create a balanced meal
42
- after I gather all the necessary ingredients
43
- if the recipe calls for seasonal vegetables
44
- before I serve the dish
45
- while I'm experimenting with flavors
46
- when I pick up my favorite vegetables
47
- because they are versatile and easy to cook
48
- if I want to make a healthy snack
49
- after I finish cooking
50
- as I explore new cuisines
51
- when I want to eat more plant-based meals
52
- before I go grocery shopping
53
- while I'm trying to eat more healthily
54
- if I have time to cook from scratch
55
- although I sometimes prefer frozen options
56
- once I gather my ingredients
57
- that I can enjoy with my family
1
+ I buy fresh vegetables
2
+ I wash the greens
3
+ I chop the carrots
4
+ cooking the stir-fry
5
+ I prepare the salad
6
+ the vegetables are in season
7
+ I prefer organic produce
8
+ I picked from the farmers' market
9
+ I can eat healthier
10
+ I have everything ready
11
+ they are a bit pricey
12
+ they taste better raw
13
+ I sauté or steam them
14
+ they are still crisp
15
+ soon as I get home
16
+ I finish my grocery shopping
17
+ they require some prep time
18
+ I can find them locally
19
+ I want to try a new recipe
20
+ they are packed with nutrients
21
+ I season them properly
22
+ I blend the vegetable soup
23
+ I wait for the water to boil
24
+ I add spices to the mix
25
+ they are stored properly
26
+ serving them to guests
27
+ they can enhance the flavor
28
+ I experiment with different cooking methods
29
+ I finish chopping the herbs
30
+ I need to feed a large group
31
+ I like to eat a variety of veggies
32
+ soon as I find the freshest ingredients
33
+ I check for quality and freshness
34
+ I plan my weekly meals
35
+ I enjoy the cooking process
36
+ I can find a good recipe
37
+ I can share with friends
38
+ I want to incorporate more greens
39
+ they add color to the plate
40
+ I prepare a hearty vegetable dish
41
+ I want to create a balanced meal
42
+ I gather all the necessary ingredients
43
+ the recipe calls for seasonal vegetables
44
+ I serve the dish
45
+ I'm experimenting with flavors
46
+ I pick up my favorite vegetables
47
+ they are versatile and easy to cook
48
+ I want to make a healthy snack
49
+ I finish cooking
50
+ I explore new cuisines
51
+ I want to eat more plant-based meals
52
+ I go grocery shopping
53
+ I'm trying to eat more healthily
54
+ I have time to cook from scratch
55
+ I sometimes prefer frozen options
56
+ I gather my ingredients
57
+ I can enjoy with my family
data/lib/random-words.rb CHANGED
@@ -8,6 +8,8 @@ require_relative 'random-words/version'
8
8
  require_relative 'random-words/string'
9
9
  require_relative 'random-words/hash'
10
10
  require_relative 'random-words/array'
11
+ require_relative 'random-words/boolean'
12
+ require_relative 'random-words/numeric'
11
13
  require_relative 'random-words/source'
12
14
  require_relative 'random-words/config'
13
15
  require_relative 'random-words/generator'
data/src/_README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # RandomWords
2
2
  <!--README-->
3
3
 
4
- [![RubyGems.org](https://img.shields.io/gem/v/random-words)](https://rubygems.org/gems/random-words)
4
+ [![RubyGems.org](https://img.shields.io/gem/v/random-words)](https://rubygems.org/gems/random-words)[![](https://img.shields.io/github/license/ttscoff/random-words)](https://opensource.org/licenses/MIT)
5
5
 
6
6
  A random text (Lorem Ipsum) generator.
7
7
 
@@ -18,7 +18,7 @@ you use [Homebrew](https://brew.sh).
18
18
  ### CLI
19
19
 
20
20
  The gem installs a binary `randw`. It can generate random
21
- characters, sentences, paragraphs, markdown, html, and
21
+ characters, sentences, paragraphs, markdown, html, and
22
22
  passwords.
23
23
 
24
24
  ```console
@@ -68,7 +68,7 @@ elements to include.
68
68
 
69
69
  First, the source language (defaults to latin), then the
70
70
  length of paragraphs and tables: e.g. `english/medium`. You
71
- can add any digits to determine how many paragraps are
71
+ can add any digits to determine how many paragraphs are
72
72
  generated (default 5), e.g. `corporate/medium/10`.
73
73
 
74
74
  Then you can add individual elements, or use `/all` to
@@ -87,6 +87,7 @@ trigger all elements. The elements available are:
87
87
  | headers | add headlines |
88
88
  | image | add images |
89
89
  | table | add tables |
90
+ | x | add extended punctuation |
90
91
 
91
92
  The number of elements inserted depends on the length you specify.
92
93
 
@@ -168,6 +169,7 @@ YAML configuration. It contains the keys:
168
169
  name: english
169
170
  description: English words
170
171
  triggers: [english]
172
+ extended_punctuation: false
171
173
  ```
172
174
 
173
175
  A default configuration file will be created when running `--create-dictionary` with the CLI.
@@ -178,8 +180,11 @@ A default configuration file will be created when running `--create-dictionary`
178
180
  - `description`: Just used for display when running `--list-dictionaries`
179
181
  - `triggers`: An array of triggers that can be used to trigger the language.
180
182
 
181
- For example, the `bacon` language has the triggers `[bacon, meat, carnivore]`, so you can use `randw -S meat` on the command line (or with the library).
182
-
183
+ For example, the `bacon` language has the triggers
184
+ `[bacon, meat, carnivore]`, so you can use `randw -S
185
+ meat` on the command line (or with the library).
186
+ - `extended_punctuation`: Whether to include extended
187
+ punctuation like parenthesis, quotes, and ellipsis.
183
188
 
184
189
 
185
190
  ##### Terminators
@@ -212,13 +217,13 @@ the most likely to be used.
212
217
 
213
218
  ##### Names
214
219
 
215
- The `names.txt` file is just used when creating block quotes
216
- in Markdown or HTML output. Sections are split by blank
217
- lines: first names, last names, and optionally full names.
218
- If the first line contains characters other than letters,
219
- single quotes, and dashes, it will be assumed that you've
220
- skipped straight to full names and those will be used
221
- instead of generating random combinations.
220
+ The `names.txt` file is just used when creating random
221
+ names. Sections are split by blank lines: first names, last
222
+ names, and optionally full names. If the first line contains
223
+ characters other than letters, single quotes, and dashes, it
224
+ will be assumed that you've skipped straight to full names
225
+ and those will be used instead of generating random
226
+ combinations.
222
227
 
223
228
  #### Language Notes
224
229
 
@@ -233,8 +238,11 @@ If you create a fun dictionary, please let me know (or make a PR) and I'll gladl
233
238
  ```ruby
234
239
  require 'random-words'
235
240
 
236
- # Argument defines source dictionary (latin, english, corporate, bacon)
241
+ # Argument defines source dictionary (latin, english, corporate, bacon, etc.)
237
242
  rw = RandomWords::Generator.new(:corporate)
243
+
244
+ rw.sources # List all available dictionaries
245
+
238
246
  # Change source dictionary and re-init
239
247
  rw.source = :bacon
240
248
 
@@ -283,3 +291,7 @@ rw.paragraph_length
283
291
  rw.sentence_length
284
292
  ```
285
293
  <!--END README-->
294
+
295
+ ### License
296
+
297
+ This project is licensed under the [MIT license](LICENSE).
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random-words
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-17 00:00:00.000000000 Z
10
+ date: 2025-04-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: nokogiri
@@ -38,18 +38,20 @@ files:
38
38
  - ".vscode/launch.json"
39
39
  - CHANGELOG.md
40
40
  - Gemfile
41
- - Gemfile.lock
41
+ - LICENSE
42
42
  - README.md
43
43
  - Rakefile
44
44
  - bin/randw
45
45
  - lib/random-words.rb
46
46
  - lib/random-words/array.rb
47
+ - lib/random-words/boolean.rb
47
48
  - lib/random-words/config.rb
48
49
  - lib/random-words/generator.rb
49
50
  - lib/random-words/hash.rb
50
51
  - lib/random-words/html2markdown.rb
51
52
  - lib/random-words/lorem-markdown.rb
52
53
  - lib/random-words/number-to-word.rb
54
+ - lib/random-words/numeric.rb
53
55
  - lib/random-words/source.rb
54
56
  - lib/random-words/string.rb
55
57
  - lib/random-words/table-cleanup.rb
data/Gemfile.lock DELETED
@@ -1,131 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- random-words (1.0.8)
5
- nokogiri (~> 1.12)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ansi (1.5.0)
11
- ast (2.4.3)
12
- awesome_print (1.9.2)
13
- diff-lcs (1.6.1)
14
- docile (1.4.1)
15
- gem-release (2.2.4)
16
- json (2.10.2)
17
- language_server-protocol (3.17.0.4)
18
- lint_roller (1.1.0)
19
- mini_portile2 (2.8.8)
20
- multi_json (1.15.0)
21
- nokogiri (1.18.7)
22
- mini_portile2 (~> 2.8.2)
23
- racc (~> 1.4)
24
- nokogiri (1.18.7-arm64-darwin)
25
- racc (~> 1.4)
26
- parallel (1.27.0)
27
- parse_gemspec (1.0.0)
28
- parse_gemspec-cli (1.0.0)
29
- multi_json
30
- parse_gemspec
31
- thor
32
- parser (3.3.8.0)
33
- ast (~> 2.4.1)
34
- racc
35
- prism (1.4.0)
36
- racc (1.8.1)
37
- rainbow (3.1.1)
38
- rake (13.2.1)
39
- rdoc (6.3.4.1)
40
- regexp_parser (2.10.0)
41
- rspec (3.13.0)
42
- rspec-core (~> 3.13.0)
43
- rspec-expectations (~> 3.13.0)
44
- rspec-mocks (~> 3.13.0)
45
- rspec-core (3.13.3)
46
- rspec-support (~> 3.13.0)
47
- rspec-expectations (3.13.3)
48
- diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.13.0)
50
- rspec-mocks (3.13.2)
51
- diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.13.0)
53
- rspec-support (3.13.2)
54
- rubocop (1.75.2)
55
- json (~> 2.3)
56
- language_server-protocol (~> 3.17.0.2)
57
- lint_roller (~> 1.1.0)
58
- parallel (~> 1.10)
59
- parser (>= 3.3.0.2)
60
- rainbow (>= 2.2.2, < 4.0)
61
- regexp_parser (>= 2.9.3, < 3.0)
62
- rubocop-ast (>= 1.44.0, < 2.0)
63
- ruby-progressbar (~> 1.7)
64
- unicode-display_width (>= 2.4.0, < 4.0)
65
- rubocop-ast (1.44.1)
66
- parser (>= 3.3.7.2)
67
- prism (~> 1.4)
68
- rubocop-capybara (2.22.1)
69
- lint_roller (~> 1.1)
70
- rubocop (~> 1.72, >= 1.72.1)
71
- rubocop-performance (1.25.0)
72
- lint_roller (~> 1.1)
73
- rubocop (>= 1.75.0, < 2.0)
74
- rubocop-ast (>= 1.38.0, < 2.0)
75
- rubocop-rspec (2.20.0)
76
- rubocop (~> 1.33)
77
- rubocop-capybara (~> 2.17)
78
- ruby-progressbar (1.13.0)
79
- simplecov (0.22.0)
80
- docile (~> 1.1)
81
- simplecov-html (~> 0.11)
82
- simplecov_json_formatter (~> 0.1)
83
- simplecov-console (0.9.3)
84
- ansi
85
- simplecov
86
- terminal-table
87
- simplecov-html (0.13.1)
88
- simplecov_json_formatter (0.1.4)
89
- standard (1.49.0)
90
- language_server-protocol (~> 3.17.0.2)
91
- lint_roller (~> 1.0)
92
- rubocop (~> 1.75.2)
93
- standard-custom (~> 1.0.0)
94
- standard-performance (~> 1.8)
95
- standard-custom (1.0.2)
96
- lint_roller (~> 1.0)
97
- rubocop (~> 1.50)
98
- standard-performance (1.8.0)
99
- lint_roller (~> 1.1)
100
- rubocop-performance (~> 1.25.0)
101
- terminal-table (4.0.0)
102
- unicode-display_width (>= 1.1.1, < 4)
103
- thor (1.3.2)
104
- unicode-display_width (3.1.4)
105
- unicode-emoji (~> 4.0, >= 4.0.4)
106
- unicode-emoji (4.0.4)
107
- yard (0.9.37)
108
-
109
- PLATFORMS
110
- arm64-darwin-24
111
- ruby
112
-
113
- DEPENDENCIES
114
- awesome_print (~> 1.9)
115
- bundler (~> 2.0)
116
- gem-release (~> 2.2)
117
- parse_gemspec-cli (~> 1.0)
118
- rake (~> 13.0)
119
- random-words!
120
- rdoc (~> 6.3.4.1)
121
- rspec (~> 3.0)
122
- rubocop (~> 1.75.2)
123
- rubocop-performance (~> 1.25.0)
124
- rubocop-rspec (~> 2.0)
125
- simplecov (~> 0.21)
126
- simplecov-console (~> 0.9)
127
- standard (~> 1.3)
128
- yard (~> 0.9, >= 0.9.36)
129
-
130
- BUNDLED WITH
131
- 2.6.6