wordlist 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -0
  3. data/ChangeLog.md +17 -0
  4. data/Gemfile +2 -0
  5. data/README.md +41 -5
  6. data/gemspec.yml +13 -6
  7. data/lib/wordlist/abstract_wordlist.rb +1 -0
  8. data/lib/wordlist/builder.rb +9 -7
  9. data/lib/wordlist/cli.rb +2 -1
  10. data/lib/wordlist/file.rb +3 -2
  11. data/lib/wordlist/format.rb +1 -0
  12. data/lib/wordlist/lexer/lang.rb +2 -0
  13. data/lib/wordlist/lexer/stop_words.rb +1 -0
  14. data/lib/wordlist/lexer.rb +11 -8
  15. data/lib/wordlist/list_methods.rb +21 -21
  16. data/lib/wordlist/modifiers/capitalize.rb +2 -1
  17. data/lib/wordlist/modifiers/downcase.rb +2 -1
  18. data/lib/wordlist/modifiers/gsub.rb +2 -1
  19. data/lib/wordlist/modifiers/mutate.rb +2 -1
  20. data/lib/wordlist/modifiers/mutate_case.rb +1 -0
  21. data/lib/wordlist/modifiers/sub.rb +2 -1
  22. data/lib/wordlist/modifiers/tr.rb +2 -1
  23. data/lib/wordlist/modifiers/upcase.rb +2 -1
  24. data/lib/wordlist/modifiers.rb +1 -0
  25. data/lib/wordlist/operators/binary_operator.rb +1 -0
  26. data/lib/wordlist/operators/concat.rb +3 -2
  27. data/lib/wordlist/operators/intersect.rb +3 -2
  28. data/lib/wordlist/operators/power.rb +2 -1
  29. data/lib/wordlist/operators/product.rb +3 -2
  30. data/lib/wordlist/operators/subtract.rb +3 -2
  31. data/lib/wordlist/operators/unary_operator.rb +1 -0
  32. data/lib/wordlist/operators/union.rb +3 -2
  33. data/lib/wordlist/operators/unique.rb +2 -1
  34. data/lib/wordlist/operators.rb +1 -0
  35. data/lib/wordlist/unique_filter.rb +1 -0
  36. data/lib/wordlist/version.rb +4 -2
  37. data/lib/wordlist/words.rb +1 -0
  38. data/lib/wordlist.rb +2 -1
  39. data/spec/cli_spec.rb +34 -4
  40. data/spec/file_spec.rb +11 -0
  41. data/spec/lexer_spec.rb +80 -14
  42. data/spec/modifiers/sub_spec.rb +1 -1
  43. data/spec/operators/unary_operator_spec.rb +14 -0
  44. data/spec/unique_filter_spec.rb +3 -3
  45. data/wordlist.gemspec +1 -0
  46. metadata +16 -41
  47. data/spec/classes/parser_class.rb +0 -7
  48. data/spec/classes/test_list.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98d7c15c0542442692f3ddd9eb1903b717ee9dc99c38744efa035140d3387c3b
4
- data.tar.gz: 3a343f015e734d5b48caaaa0379cfab7b082235f21c14048de72bc7aba0658da
3
+ metadata.gz: '09442b4fa26d163890845f9ba05bb3620d081ede1aeea4f4681e3292023a329e'
4
+ data.tar.gz: d69e26ee74fef00403afdbd2acddbc617398132d75074fe6cf8546704540ce83
5
5
  SHA512:
6
- metadata.gz: c6ad1af333afa7b2599729db8ff761d236ab7b70c37a0855f888debf547818fd1698b5efaa064742107f5003621fcab9efc6a3e101a8241c1ef7ea68b80344b6
7
- data.tar.gz: 920e99dac9529db87d16394d94ccafcdefd45b64b6e8f9dc4664dc95846c6cfa5d5910d119cfa146249e1d46325e7a07a1471ea061d15f53f4b1b6736d4bd16e
6
+ metadata.gz: f96fd76cbccdeab025ec9bf7c46946f7d684f91e5e01e7a3c68820b9bcbb1c80ec9e50a8d39fea61cbd5e757a0bfffca8e8e2ab1b435b91327d365efeac0f971
7
+ data.tar.gz: a99ea8d51f2e0ffd6b8a5a444870c28bee24698fdce3b44474c1c66acc000ebdba009493b267e68e68d592bd668189e5b77dff971f7e03f08ef7921032071a1c
@@ -12,6 +12,7 @@ jobs:
12
12
  - 2.6
13
13
  - 2.7
14
14
  - 3.0
15
+ - 3.1
15
16
  - jruby
16
17
  - truffleruby
17
18
  name: Ruby ${{ matrix.ruby }}
data/ChangeLog.md CHANGED
@@ -1,3 +1,20 @@
1
+ ### 1.0.2 / 2023-07-18
2
+
3
+ #### CLI
4
+
5
+ * Fixed a bug where operator options (ex: `--power 3`) were not being applied
6
+ to the wordlist.
7
+
8
+ ### 1.0.1 / 2023-07-17
9
+
10
+ * Require Ruby >= 2.0.0.
11
+ * Added `frozen_string_literal: true` magic comments.
12
+ * Flush the output after each line is written in {Wordlist::Builder}.
13
+ This allows for watching the wordlist file grow using `tail -f`.
14
+ * Fixed a bug in {Wordlist::Lexer#parse} where Unicode whitespace or other
15
+ Unicode characters caused an infinite loop.
16
+ * Various documentation fixes.
17
+
1
18
  ### 1.0.0 / 2021-11-01
2
19
 
3
20
  * Redesigned the API.
data/Gemfile CHANGED
@@ -7,7 +7,9 @@ group :development do
7
7
  gem 'rubygems-tasks', '~> 0.2'
8
8
  gem 'rspec', '~> 3.0'
9
9
  gem 'simplecov', '~> 0.20'
10
+
10
11
  gem 'kramdown'
12
+ gem 'redcarpet', platform: :mri
11
13
  gem 'yard', '~> 0.9'
12
14
  gem 'yard-spellcheck', require: false
13
15
  end
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Wordlist
2
2
 
3
3
  [![CI](https://github.com/postmodern/wordlist.rb/actions/workflows/ruby.yml/badge.svg)](https://github.com/postmodern/wordlist.rb/actions/workflows/ruby.yml)
4
+ [![Code Climate](https://codeclimate.com/github/postmodern/wordlist.rb.svg)](https://codeclimate.com/github/postmodern/wordlist.rb)
4
5
  [![Gem Version](https://badge.fury.io/rb/wordlist.svg)](https://badge.fury.io/rb/wordlist)
5
6
 
6
7
  * [Source](https://github.com/postmodern/wordlist.rb#readme)
@@ -9,8 +10,8 @@
9
10
 
10
11
  ## Description
11
12
 
12
- Wordlist is a Ruby library for reading, manipulating, and creating wordlists,
13
- efficiently.
13
+ Wordlist is a Ruby library and CLI for reading, combining, mutating, and
14
+ building wordlists, efficiently.
14
15
 
15
16
  ## Features
16
17
 
@@ -22,8 +23,9 @@ efficiently.
22
23
  * Can parse/skip digits, special characters, whole numbers, acronyms.
23
24
  * Can normalize case, apostrophes, and acronyms.
24
25
  * Supports wordlist operations for combining multiple wordlists together.
25
- * Supports wordlist manipulating to modify the words in the wordlist on the fly.
26
- * Fast-ish
26
+ * Supports wordlist modify or mutating the words in the wordlist on the fly.
27
+ * Also provides a `wordlist` [command](#synopsis).
28
+ * [Fast-ish](#benchmarks)
27
29
 
28
30
  ## Examples
29
31
 
@@ -161,6 +163,13 @@ Performs every possible mutation of each word in a wordlist:
161
163
  wordlist.mutate(/[oae]/, {'o' => '0', 'a' => '@', 'e' => '3'}).each do |word|
162
164
  puts word
163
165
  end
166
+ # dog
167
+ # d0g
168
+ # firefox
169
+ # fir3fox
170
+ # firef0x
171
+ # fir3f0x
172
+ # ...
164
173
  ```
165
174
 
166
175
  Enumerates over every possible case variation of every word in a wordlist:
@@ -169,6 +178,15 @@ Enumerates over every possible case variation of every word in a wordlist:
169
178
  wordlist.mutate_case.each do |word|
170
179
  puts word
171
180
  end
181
+ # cat
182
+ # Cat
183
+ # cAt
184
+ # caT
185
+ # CAt
186
+ # CaT
187
+ # cAT
188
+ # CAT
189
+ # ...
172
190
  ```
173
191
 
174
192
  ### Building a Wordlist
@@ -203,6 +221,12 @@ Parsing a file's content:
203
221
  builder.parse_file(path)
204
222
  ```
205
223
 
224
+ ## Requirements
225
+
226
+ * [ruby] >= 2.0.0
227
+
228
+ [ruby]: https://www.ruby-lang.org/
229
+
206
230
  ## Install
207
231
 
208
232
  ```shell
@@ -239,18 +263,30 @@ Combining every word from one wordlist with another:
239
263
 
240
264
  ```shell
241
265
  $ wordlist sport_teams.txt -p beers.txt -p all_four_digits.txt
266
+ coors0000
267
+ coors0001
268
+ coors0002
269
+ coors0003
270
+ ...
242
271
  ```
243
272
 
244
273
  Combining every word from one wordlist with itself, N times:
245
274
 
246
275
  ```shell
247
- $ wordlist shakespeare.txt -P 3
276
+ $ wordlist words.txt -P 3
248
277
  ```
249
278
 
250
279
  Mutating every word in a wordlist:
251
280
 
252
281
  ```shell
253
282
  $ wordlist passwords.txt -m o:0 -m e:3 -m a:@
283
+ dog
284
+ d0g
285
+ firefox
286
+ fir3fox
287
+ firef0x
288
+ fir3f0x
289
+ ...
254
290
  ```
255
291
 
256
292
  Executing a command on each word in the wordlist:
data/gemspec.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  name: wordlist
2
- summary: Ruby library for reading, manipulating, and creating wordlists.
2
+ summary:
3
+ Ruby library and CLI for reading, combining, mutating, and building wordlists
3
4
  description:
4
- Wordlist is a Ruby library for reading, manipulating, and creating wordlists,
5
- efficiently.
5
+ Wordlist is a Ruby library and CLI for reading, combining, mutating, and
6
+ building wordlists, efficiently.
6
7
 
7
8
  license: MIT
8
9
  authors: Postmodern
@@ -10,7 +11,13 @@ email: postmodern.mod3@gmail.com
10
11
  homepage: https://github.com/postmodern/wordlist.rb
11
12
  has_yard: true
12
13
 
14
+ metadata:
15
+ documentation_uri: https://rubydoc.info/gems/wordlist
16
+ source_code_uri: https://github.com/postmodern/wordlist.rb
17
+ bug_tracker_uri: https://github.com/postmodern/wordlist.rb/issues
18
+ changelog_uri: https://github.com/postmodern/wordlist.rb/blob/master/ChangeLog.md
19
+
20
+ required_ruby_version: ">= 2.0.0"
21
+
13
22
  development_dependencies:
14
- rubygems-tasks: ~> 0.1
15
- rspec: ~> 2.4
16
- yard: ~> 0.8
23
+ bundler: ~> 2.0
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/list_methods'
2
3
 
3
4
  module Wordlist
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/format'
2
3
  require 'wordlist/lexer'
3
4
  require 'wordlist/unique_filter'
@@ -61,25 +62,25 @@ module Wordlist
61
62
  # @option kwargs [Array<String, Regexp>] :ignore_words
62
63
  # Optional list of words to ignore. Can contain Strings or Regexps.
63
64
  #
64
- # @option kwargs [Boolean] :digits
65
+ # @option kwargs [Boolean] :digits (true)
65
66
  # Controls whether parsed words may contain digits or not.
66
67
  #
67
- # @option kwargs [Array<String>] :special_chars
68
+ # @option kwargs [Array<String>] :special_chars (Lexer::SPCIAL_CHARS)
68
69
  # The additional special characters allowed within words.
69
70
  #
70
- # @option kwargs [Boolean] :numbers
71
+ # @option kwargs [Boolean] :numbers (false)
71
72
  # Controls whether whole numbers will be parsed as words.
72
73
  #
73
- # @option kwargs [Boolean] :acronyms
74
+ # @option kwargs [Boolean] :acronyms (true)
74
75
  # Controls whether acronyms will be parsed as words.
75
76
  #
76
- # @option kwargs [Boolean] :normalize_case
77
+ # @option kwargs [Boolean] :normalize_case (false)
77
78
  # Controls whether to convert all words to lowercase.
78
79
  #
79
- # @option kwargs [Boolean] :normalize_apostrophes
80
+ # @option kwargs [Boolean] :normalize_apostrophes (false)
80
81
  # Controls whether apostrophes will be removed from the end of words.
81
82
  #
82
- # @option kwargs [Boolean] :normalize_acronyms
83
+ # @option kwargs [Boolean] :normalize_acronyms (false)
83
84
  # Controls whether acronyms will have `.` characters removed.
84
85
  #
85
86
  # @raise [ArgumentError]
@@ -258,6 +259,7 @@ module Wordlist
258
259
  #
259
260
  def write(line)
260
261
  @io.puts(line)
262
+ @io.flush
261
263
  end
262
264
 
263
265
  #
data/lib/wordlist/cli.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/file'
2
3
  require 'wordlist/builder'
3
4
  require 'wordlist/version'
@@ -238,7 +239,7 @@ module Wordlist
238
239
 
239
240
  # apply operators first
240
241
  @operators.each do |(operator,args)|
241
- wordlist.send(operator,*args)
242
+ wordlist = wordlist.send(operator,*args)
242
243
  end
243
244
 
244
245
  # then apply modifiers
data/lib/wordlist/file.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/abstract_wordlist'
2
3
  require 'wordlist/exceptions'
3
4
  require 'wordlist/format'
@@ -49,11 +50,11 @@ module Wordlist
49
50
  @format = format
50
51
 
51
52
  unless ::File.file?(@path)
52
- raise(WordlistNotFound,"wordlist file does not exist: #{path.inspect}")
53
+ raise(WordlistNotFound,"wordlist file does not exist: #{@path.inspect}")
53
54
  end
54
55
 
55
56
  unless Format::FORMATS.include?(@format)
56
- raise(UnknownFormat,"unknown format given: #{format.inspect}")
57
+ raise(UnknownFormat,"unknown format given: #{@format.inspect}")
57
58
  end
58
59
  end
59
60
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/exceptions'
2
3
 
3
4
  module Wordlist
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Wordlist
2
4
  class Lexer
3
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/exceptions'
2
3
 
3
4
  module Wordlist
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/lexer/lang'
2
3
  require 'wordlist/lexer/stop_words'
3
4
 
@@ -13,8 +14,6 @@ module Wordlist
13
14
  #
14
15
  class Lexer
15
16
 
16
- include Enumerable
17
-
18
17
  # Regexp to match acronyms.
19
18
  ACRONYM = /[[:alpha:]](?:\.[[:alpha:]])+\./
20
19
 
@@ -97,9 +96,11 @@ module Wordlist
97
96
  escaped_chars = Regexp.escape(@special_chars.join)
98
97
 
99
98
  @word = if @digits
100
- /[[:alpha:]](?:[[:alnum:]#{escaped_chars}]*[[:alnum:]])?/
99
+ # allows numeric characters
100
+ /\p{L}(?:[\p{L}\p{Nd}#{escaped_chars}]*[\p{L}\p{Nd}])?/
101
101
  else
102
- /[[:alpha:]](?:[[:alpha:]#{escaped_chars}]*[[:alpha:]])?/
102
+ # only allows alpha characters
103
+ /\p{L}(?:[\p{L}#{escaped_chars}]*\p{L})?/
103
104
  end
104
105
 
105
106
  skip_words = Regexp.union(
@@ -114,12 +115,14 @@ module Wordlist
114
115
  )
115
116
 
116
117
  if @numbers
117
- @skip_word = /(?:#{skip_words}[[:punct:]]*(?:\s+|$))+/i
118
+ # allows lexing whole numbers
119
+ @skip_word = /(?:#{skip_words}[[:punct:]]*(?:[[:space:]]+|$))+/i
118
120
  @word = /#{@word}|\d+/
119
- @not_a_word = /[\s[:punct:]]+/
121
+ @not_a_word = /[^\p{L}\d]+/
120
122
  else
121
- @skip_word = /(?:(?:#{skip_words}|\d+)[[:punct:]]*(?:\s+|$))+/i
122
- @not_a_word = /[\s\d[:punct:]]+/
123
+ # skips whole numbers
124
+ @skip_word = /(?:(?:#{skip_words}|\d+)[[:punct:]]*(?:[[:space:]]+|$))+/i
125
+ @not_a_word = /[^\p{L}]+/
123
126
  end
124
127
  end
125
128
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators'
2
3
  require 'wordlist/modifiers'
3
4
 
@@ -22,8 +23,8 @@ module Wordlist
22
23
  # The lazily concatenated wordlists.
23
24
  #
24
25
  # @example
25
- # wordlist1 = Wordlist::List["foo", "bar", "baz"]
26
- # wordlist2 = Wordlist::List["abc", "xyz"]
26
+ # wordlist1 = Wordlist::Words["foo", "bar", "baz"]
27
+ # wordlist2 = Wordlist::Words["abc", "xyz"]
27
28
  # (wordlist1 + wordlist2).each do |word|
28
29
  # puts word
29
30
  # end
@@ -52,8 +53,8 @@ module Wordlist
52
53
  # The lazy subtraction of the two wordlists.
53
54
  #
54
55
  # @example
55
- # wordlist1 = Wordlist::List["foo", "bar", baz", "qux"]
56
- # wordlist2 = Wordlist::List["bar", "qux"]
56
+ # wordlist1 = Wordlist::Words["foo", "bar", baz", "qux"]
57
+ # wordlist2 = Wordlist::Words["bar", "qux"]
57
58
  # (wordlist1 - wordlist2).each do |word|
58
59
  # puts word
59
60
  # end
@@ -78,8 +79,8 @@ module Wordlist
78
79
  # The lazy product of the two wordlists.
79
80
  #
80
81
  # @example
81
- # wordlist1 = Wordlist::List["foo", "bar"]
82
- # wordlist2 = Wordlist::List["ABC", "XYZ"]
82
+ # wordlist1 = Wordlist::Words["foo", "bar"]
83
+ # wordlist2 = Wordlist::Words["ABC", "XYZ"]
83
84
  # (wordlist1 * wordlist2).each do |word|
84
85
  # puts word
85
86
  # end
@@ -106,7 +107,7 @@ module Wordlist
106
107
  # The lazy combination of the wordlist.
107
108
  #
108
109
  # @example
109
- # wordlist = Wordlist::List["foo", "bar"]
110
+ # wordlist = Wordlist::Words["foo", "bar"]
110
111
  # (wordlist ** 3).each do |word|
111
112
  # puts word
112
113
  # end
@@ -137,8 +138,8 @@ module Wordlist
137
138
  # The lazy intersection of the two wordlists.
138
139
  #
139
140
  # @example
140
- # wordlist1 = Wordlist::List["foo", "bar", "baz", "qux"]
141
- # wordlist2 = Wordlist::List["xyz", "bar", "abc", "qux"]
141
+ # wordlist1 = Wordlist::Words["foo", "bar", "baz", "qux"]
142
+ # wordlist2 = Wordlist::Words["xyz", "bar", "abc", "qux"]
142
143
  # (wordlist1 & wordlist2).each do |word|
143
144
  # puts word
144
145
  # end
@@ -164,8 +165,8 @@ module Wordlist
164
165
  # The lazy union of the two wordlists.
165
166
  #
166
167
  # @example
167
- # wordlist1 = Wordlist::List["foo", "bar", "baz", "qux"]
168
- # wordlist2 = Wordlist::List["xyz", "bar", "abc", "qux"]
168
+ # wordlist1 = Wordlist::Words["foo", "bar", "baz", "qux"]
169
+ # wordlist2 = Wordlist::Words["xyz", "bar", "abc", "qux"]
169
170
  # (wordlist1 | wordlist2).each do |word|
170
171
  # puts word
171
172
  # end
@@ -184,7 +185,6 @@ module Wordlist
184
185
 
185
186
  alias | union
186
187
 
187
- #
188
188
  #
189
189
  # Lazily enumerates over only the unique words in the wordlist, filtering
190
190
  # out duplicates.
@@ -193,7 +193,7 @@ module Wordlist
193
193
  # The lazy uniqueness of the wordlist.
194
194
  #
195
195
  # @example
196
- # wordlist= Wordlist::List["foo", "bar", "baz", "qux"]
196
+ # wordlist= Wordlist::Words["foo", "bar", "baz", "qux"]
197
197
  # (wordlist + wordlist).uniq.each do |word|
198
198
  # puts word
199
199
  # end
@@ -225,7 +225,7 @@ module Wordlist
225
225
  # The lazy `String#tr` modification of the wordlist.
226
226
  #
227
227
  # @example
228
- # wordlist = Wordlist::List["foo", "bar", "baz"]
228
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
229
229
  # wordlist.capitalize.each do |word|
230
230
  # puts word
231
231
  # end
@@ -259,7 +259,7 @@ module Wordlist
259
259
  # The lazy `String#sub` modification of the wordlist.
260
260
  #
261
261
  # @example
262
- # wordlist = Wordlist::List["foo", "bar", "baz"]
262
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
263
263
  # wordlist.sub(/o/, '0').each do |word|
264
264
  # puts word
265
265
  # end
@@ -297,7 +297,7 @@ module Wordlist
297
297
  # The lazy `String#gsub` modification of the wordlist.
298
298
  #
299
299
  # @example
300
- # wordlist = Wordlist::List["Foo", "BAR", "bAz"]
300
+ # wordlist = Wordlist::Words["Foo", "BAR", "bAz"]
301
301
  # wordlist.gsub(/o/,'0').each do |word|
302
302
  # puts word
303
303
  # end
@@ -322,7 +322,7 @@ module Wordlist
322
322
  # The lazy `String#gsub` modification of the wordlist.
323
323
  #
324
324
  # @example
325
- # wordlist = Wordlist::List["foo", "bar", "baz"]
325
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
326
326
  # wordlist.capitalize.each do |word|
327
327
  # puts word
328
328
  # end
@@ -343,7 +343,7 @@ module Wordlist
343
343
  # The lazy `String#gsub` modification of the wordlist.
344
344
  #
345
345
  # @example
346
- # wordlist = Wordlist::List["foo", "bar", "baz"]
346
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
347
347
  # wordlist.upcase.each do |word|
348
348
  # puts word
349
349
  # end
@@ -364,7 +364,7 @@ module Wordlist
364
364
  # The lazy `String#gsub` modification of the wordlist.
365
365
  #
366
366
  # @example
367
- # wordlist = Wordlist::List["Foo", "BAR", "bAz"]
367
+ # wordlist = Wordlist::Words["Foo", "BAR", "bAz"]
368
368
  # wordlist.downcase.each do |word|
369
369
  # puts word
370
370
  # end
@@ -399,7 +399,7 @@ module Wordlist
399
399
  # The lazy `String#gsub` modification of the wordlist.
400
400
  #
401
401
  # @example
402
- # wordlist = Wordlist::List["foo", "bar", "baz"]
402
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
403
403
  # wordlist.mutate(/[oa]/, {'o' => '0', 'a' => '@'}).each do |word|
404
404
  # puts word
405
405
  # end
@@ -429,7 +429,7 @@ module Wordlist
429
429
  # The lazy `String#gsub` modification of the wordlist.
430
430
  #
431
431
  # @example
432
- # wordlist = Wordlist::List["foo", "bar"]
432
+ # wordlist = Wordlist::Words["foo", "bar"]
433
433
  # wordlist.mutate_case.each do |word|
434
434
  # puts word
435
435
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/modifier'
2
3
 
3
4
  module Wordlist
@@ -22,7 +23,7 @@ module Wordlist
22
23
  # If no block is given, an Enumerator object will be returned.
23
24
  #
24
25
  # @example
25
- # wordlist = Wordlist::List["foo", "bar", "baz"]
26
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
26
27
  # wordlist.capitalize.each do |word|
27
28
  # puts word
28
29
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/modifier'
2
3
 
3
4
  module Wordlist
@@ -22,7 +23,7 @@ module Wordlist
22
23
  # If no block is given, an Enumerator object will be returned.
23
24
  #
24
25
  # @example
25
- # wordlist = Wordlist::List["Foo", "BAR", "bAz"]
26
+ # wordlist = Wordlist::Words["Foo", "BAR", "bAz"]
26
27
  # wordlist.downcase.each do |word|
27
28
  # puts word
28
29
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/sub'
2
3
 
3
4
  module Wordlist
@@ -22,7 +23,7 @@ module Wordlist
22
23
  # If no block is given, an Enumerator object will be returned.
23
24
  #
24
25
  # @example
25
- # wordlist = Wordlist::List["Foo", "BAR", "bAz"]
26
+ # wordlist = Wordlist::Words["Foo", "BAR", "bAz"]
26
27
  # wordlist.gsub(/o/,'0').each do |word|
27
28
  # puts word
28
29
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/sub'
2
3
 
3
4
  module Wordlist
@@ -23,7 +24,7 @@ module Wordlist
23
24
  # If no block is given, an Enumerator object will be returned.
24
25
  #
25
26
  # @example
26
- # wordlist = Wordlist::List["foo", "bar", "baz"]
27
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
27
28
  # wordlist.mutate(/[oa]/, {'o' => '0', 'a' => '@'}).each do |word|
28
29
  # puts word
29
30
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/mutate'
2
3
 
3
4
  module Wordlist
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/modifier'
2
3
 
3
4
  module Wordlist
@@ -68,7 +69,7 @@ module Wordlist
68
69
  # If no block is given, an Enumerator object will be returned.
69
70
  #
70
71
  # @example
71
- # wordlist = Wordlist::List["foo", "bar", "baz"]
72
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
72
73
  # wordlist.sub(/o/, '0').each do |word|
73
74
  # puts word
74
75
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/modifier'
2
3
 
3
4
  module Wordlist
@@ -48,7 +49,7 @@ module Wordlist
48
49
  # If no block is given, an Enumerator object will be returned.
49
50
  #
50
51
  # @example
51
- # wordlist = Wordlist::List["foo", "bar", "baz"]
52
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
52
53
  # wordlist.tr("oa", "0@").each do |word|
53
54
  # puts word
54
55
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/modifier'
2
3
 
3
4
  module Wordlist
@@ -22,7 +23,7 @@ module Wordlist
22
23
  # If no block is given, an Enumerator object will be returned.
23
24
  #
24
25
  # @example
25
- # wordlist = Wordlist::List["foo", "bar", "baz"]
26
+ # wordlist = Wordlist::Words["foo", "bar", "baz"]
26
27
  # wordlist.upcase.each do |word|
27
28
  # puts word
28
29
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/modifiers/tr'
2
3
  require 'wordlist/modifiers/sub'
3
4
  require 'wordlist/modifiers/gsub'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/operator'
2
3
 
3
4
  module Wordlist
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/binary_operator'
2
3
 
3
4
  module Wordlist
@@ -22,8 +23,8 @@ module Wordlist
22
23
  # If no block is given, an Enumerator object will be returned.
23
24
  #
24
25
  # @example
25
- # wordlist1 = Wordlist::List["foo", "bar", "baz"]
26
- # wordlist2 = Wordlist::List["abc", "xyz"]
26
+ # wordlist1 = Wordlist::Words["foo", "bar", "baz"]
27
+ # wordlist2 = Wordlist::Words["abc", "xyz"]
27
28
  # (wordlist1 + wordlist2).each do |word|
28
29
  # puts word
29
30
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/binary_operator'
2
3
  require 'wordlist/unique_filter'
3
4
 
@@ -24,8 +25,8 @@ module Wordlist
24
25
  # If no block is given, an Enumerator object will be returned.
25
26
  #
26
27
  # @example
27
- # wordlist1 = Wordlist::List["foo", "bar", "baz", "qux"]
28
- # wordlist2 = Wordlist::List["xyz", "bar", "abc", "qux"]
28
+ # wordlist1 = Wordlist::Words["foo", "bar", "baz", "qux"]
29
+ # wordlist2 = Wordlist::Words["xyz", "bar", "abc", "qux"]
29
30
  # (wordlist1 & wordlist2).each do |word|
30
31
  # puts word
31
32
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/binary_operator'
2
3
  require 'wordlist/operators/product'
3
4
 
@@ -48,7 +49,7 @@ module Wordlist
48
49
  # If no block is given, an Enumerator object will be returned.
49
50
  #
50
51
  # @example
51
- # wordlist = Wordlist::List["foo", "bar"]
52
+ # wordlist = Wordlist::Words["foo", "bar"]
52
53
  # (wordlist ** 3).each do |word|
53
54
  # puts word
54
55
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/binary_operator'
2
3
 
3
4
  module Wordlist
@@ -23,8 +24,8 @@ module Wordlist
23
24
  # If no block is given, an Enumerator object will be returned.
24
25
  #
25
26
  # @example
26
- # wordlist1 = Wordlist::List["foo", "bar"]
27
- # wordlist2 = Wordlist::List["ABC", "XYZ"]
27
+ # wordlist1 = Wordlist::Words["foo", "bar"]
28
+ # wordlist2 = Wordlist::Words["ABC", "XYZ"]
28
29
  # (wordlist1 * wordlist2).each do |word|
29
30
  # puts word
30
31
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/binary_operator'
2
3
  require 'wordlist/unique_filter'
3
4
 
@@ -25,8 +26,8 @@ module Wordlist
25
26
  # If no block is given, an Enumerator object will be returned.
26
27
  #
27
28
  # @example
28
- # wordlist1 = Wordlist::List["foo", "bar", baz", "qux"]
29
- # wordlist2 = Wordlist::List["bar", "qux"]
29
+ # wordlist1 = Wordlist::Words["foo", "bar", baz", "qux"]
30
+ # wordlist2 = Wordlist::Words["bar", "qux"]
30
31
  # (wordlist1 - wordlist2).each do |word|
31
32
  # puts word
32
33
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/operator'
2
3
 
3
4
  module Wordlist
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/binary_operator'
2
3
  require 'wordlist/unique_filter'
3
4
 
@@ -25,8 +26,8 @@ module Wordlist
25
26
  # If no block is given, an Enumerator object will be returned.
26
27
  #
27
28
  # @example
28
- # wordlist1 = Wordlist::List["foo", "bar", "baz", "qux"]
29
- # wordlist2 = Wordlist::List["xyz", "bar", "abc", "qux"]
29
+ # wordlist1 = Wordlist::Words["foo", "bar", "baz", "qux"]
30
+ # wordlist2 = Wordlist::Words["xyz", "bar", "abc", "qux"]
30
31
  # (wordlist1 | wordlist2).each do |word|
31
32
  # puts word
32
33
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/unary_operator'
2
3
  require 'wordlist/unique_filter'
3
4
 
@@ -24,7 +25,7 @@ module Wordlist
24
25
  # If no block is given, an Enumerator object will be returned.
25
26
  #
26
27
  # @example
27
- # wordlist= Wordlist::List["foo", "bar", "baz", "qux"]
28
+ # wordlist= Wordlist::Words["foo", "bar", "baz", "qux"]
28
29
  # (wordlist + wordlist).uniq.each do |word|
29
30
  # puts word
30
31
  # end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/operators/concat'
2
3
  require 'wordlist/operators/subtract'
3
4
  require 'wordlist/operators/product'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'set'
2
3
 
3
4
  module Wordlist
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Wordlist
2
- # Word version
3
- VERSION = '1.0.0'
4
+ # wordlist version
5
+ VERSION = '1.0.2'
4
6
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "wordlist/abstract_wordlist"
2
3
 
3
4
  module Wordlist
data/lib/wordlist.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'wordlist/words'
2
3
  require 'wordlist/file'
3
4
  require 'wordlist/builder'
@@ -30,7 +31,7 @@ module Wordlist
30
31
  # @param [Hash{Symbol => Object}] kwargs
31
32
  # Additional keyword arguments for {Wordlist::File#initialize}.
32
33
  #
33
- # @option [:txt, :bzip, :bzip2, :xz] :format
34
+ # @option kwargs [:txt, :bzip, :bzip2, :xz] :format
34
35
  # Specifies the format of the wordlist. If no format is given, the format
35
36
  # will be inferred from the path's file extension.
36
37
  #
data/spec/cli_spec.rb CHANGED
@@ -100,14 +100,15 @@ Please report the following text to: #{Regexp.escape(described_class::BUG_REPORT
100
100
  end
101
101
 
102
102
  context "when the file does not exist" do
103
- let(:path) { 'does/not/exist.txt' }
103
+ let(:path) { 'does/not/exist.txt' }
104
+ let(:absolute_path) { File.expand_path(path) }
104
105
 
105
106
  it "must print an error and exit with -1" do
106
107
  expect(subject).to receive(:exit).with(-1)
107
108
 
108
109
  expect {
109
110
  subject.open_wordlist(path)
110
- }.to output("#{described_class::PROGRAM_NAME}: wordlist file does not exist: #{path.inspect}#{$/}").to_stderr
111
+ }.to output("#{described_class::PROGRAM_NAME}: wordlist file does not exist: #{absolute_path.inspect}#{$/}").to_stderr
111
112
  end
112
113
  end
113
114
  end
@@ -617,7 +618,7 @@ Please report the following text to: #{Regexp.escape(described_class::BUG_REPORT
617
618
  context "when given #{flag}" do
618
619
  let(:argv) { [flag] }
619
620
 
620
- it "must append to #modifiers" do
621
+ it "must print the program name and the Wordlist::VERSION" do
621
622
  expect(subject).to receive(:exit)
622
623
 
623
624
  expect {
@@ -631,7 +632,7 @@ Please report the following text to: #{Regexp.escape(described_class::BUG_REPORT
631
632
  context "when given #{flag}" do
632
633
  let(:argv) { [flag] }
633
634
 
634
- it "must append to #modifiers" do
635
+ it "must print the option paresr --help output" do
635
636
  expect(subject).to receive(:exit)
636
637
 
637
638
  expect {
@@ -682,6 +683,35 @@ Please report the following text to: #{Regexp.escape(described_class::BUG_REPORT
682
683
  ).to_stdout
683
684
  end
684
685
 
686
+ context "when a modifier option is also given" do
687
+ let(:expected_words) { super().map(&:capitalize) }
688
+ let(:argv) { ["--capitalize", file] }
689
+
690
+ it "must apply the modifier to each word in the wordist" do
691
+ expect {
692
+ subject.run(argv)
693
+ }.to output(
694
+ expected_words.join($/) + $/
695
+ ).to_stdout
696
+ end
697
+ end
698
+
699
+ context "when an operator option is also given" do
700
+ let(:expected_words) do
701
+ super().product(super()).map(&:join)
702
+ end
703
+
704
+ let(:argv) { ["--power",'2', file] }
705
+
706
+ it "must apply the operator to the wordist" do
707
+ expect {
708
+ subject.run(argv)
709
+ }.to output(
710
+ expected_words.join($/) + $/
711
+ ).to_stdout
712
+ end
713
+ end
714
+
685
715
  context "when also given the --exec COMMAND option" do
686
716
  let(:command) { 'echo "WORD: {}"' }
687
717
  let(:argv) { ["--exec", command, file] }
data/spec/file_spec.rb CHANGED
@@ -20,6 +20,17 @@ describe Wordlist::File do
20
20
  described_class.new(path)
21
21
  }.to raise_error(Wordlist::WordlistNotFound,"wordlist file does not exist: #{path.inspect}")
22
22
  end
23
+
24
+ context "and the path is relative" do
25
+ let(:path) { 'does/not/exist.txt' }
26
+ let(:absolute_path) { File.expand_path(path) }
27
+
28
+ it "must include the absolute path in the exception message" do
29
+ expect {
30
+ described_class.new(path)
31
+ }.to raise_error(Wordlist::WordlistNotFound,"wordlist file does not exist: #{absolute_path.inspect}")
32
+ end
33
+ end
23
34
  end
24
35
 
25
36
  context "when given a relative path" do
data/spec/lexer_spec.rb CHANGED
@@ -4,10 +4,6 @@ require 'wordlist/lexer'
4
4
  describe Wordlist::Lexer do
5
5
  let(:text) { "foo bar baz qux" }
6
6
 
7
- it do
8
- expect(described_class).to include(Enumerable)
9
- end
10
-
11
7
  describe "#initialize" do
12
8
  let(:default_lang) { Wordlist::Lexer::Lang.default }
13
9
 
@@ -153,6 +149,86 @@ describe Wordlist::Lexer do
153
149
  }.to yield_successive_args(*expected_words)
154
150
  end
155
151
 
152
+ context "and when the text is empty" do
153
+ let(:text) { '' }
154
+
155
+ it "must not yield any words" do
156
+ expect { |b|
157
+ subject.parse(text,&b)
158
+ }.to_not yield_control
159
+ end
160
+ end
161
+
162
+ context "and when the text is only whitespace" do
163
+ let(:text) { " \t\r\n" }
164
+
165
+ it "must not yield any words" do
166
+ expect { |b|
167
+ subject.parse(text,&b)
168
+ }.to_not yield_control
169
+ end
170
+ end
171
+
172
+ context "and when the text contains newlines" do
173
+ let(:text) { expected_words.join("\n") }
174
+
175
+ it "must parse each line" do
176
+ expect { |b|
177
+ subject.parse(text,&b)
178
+ }.to yield_successive_args(*expected_words)
179
+ end
180
+ end
181
+
182
+ context "and when the text is only unicode whitespace" do
183
+ let(:text) { "\u{a0}" }
184
+
185
+ it "must not yield any words" do
186
+ expect { |b|
187
+ subject.parse(text,&b)
188
+ }.to_not yield_control
189
+ end
190
+ end
191
+
192
+ context "and when the text is only unicode symbols" do
193
+ let(:text) { "©" }
194
+
195
+ it "must not yield any words" do
196
+ expect { |b|
197
+ subject.parse(text,&b)
198
+ }.to_not yield_control
199
+ end
200
+ end
201
+
202
+ context "and when the words are separated by unicode whitespace" do
203
+ let(:text) { expected_words.join("\u{a0}") }
204
+
205
+ it "must skip the unicode whitespace and yield the words" do
206
+ expect { |b|
207
+ subject.parse(text,&b)
208
+ }.to yield_successive_args(*expected_words)
209
+ end
210
+ end
211
+
212
+ context "and when the text contains unicode symbols" do
213
+ let(:text) { "© #{super()}" }
214
+
215
+ it "must skip any unicode symbols and yield the words" do
216
+ expect { |b|
217
+ subject.parse(text,&b)
218
+ }.to yield_successive_args(*expected_words)
219
+ end
220
+ end
221
+
222
+ context "when the words contain unicode letters" do
223
+ let(:expected_words) { %w[Hervé Schäfer Ålesund] }
224
+
225
+ it "must parse words containing unicode letters" do
226
+ expect { |b|
227
+ subject.parse(text,&b)
228
+ }.to yield_successive_args(*expected_words)
229
+ end
230
+ end
231
+
156
232
  context "when the words contain uppercase letters" do
157
233
  let(:expected_words) { %w[foo Bar baZ QUX] }
158
234
 
@@ -200,16 +276,6 @@ describe Wordlist::Lexer do
200
276
  end
201
277
  end
202
278
 
203
- context "and when the text contains newlines" do
204
- let(:text) { expected_words.join("\n") }
205
-
206
- it "must parse each line" do
207
- expect { |b|
208
- subject.parse(text,&b)
209
- }.to yield_successive_args(*expected_words)
210
- end
211
- end
212
-
213
279
  context "and when the text contains punctuation" do
214
280
  let(:text) { expected_words.join(", ") + '.' }
215
281
 
@@ -53,7 +53,7 @@ describe Wordlist::Modifiers::Sub do
53
53
  end
54
54
 
55
55
  context "when a block is given" do
56
- subject { described_class.new(wordlist,pattern,replace,&block) }
56
+ subject { described_class.new(wordlist,pattern,&block) }
57
57
 
58
58
  it "must set #block" do
59
59
  expect(subject.block).to eq(block)
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+ require 'wordlist/operators/unary_operator'
3
+
4
+ describe Wordlist::Operators::UnaryOperator do
5
+ let(:wordlist) { %w[foo bar] }
6
+
7
+ subject { described_class.new(wordlist) }
8
+
9
+ describe "#initialize" do
10
+ it "must set #wordlist" do
11
+ expect(subject.wordlist).to eq(wordlist)
12
+ end
13
+ end
14
+ end
@@ -53,8 +53,8 @@ describe Wordlist::UniqueFilter do
53
53
 
54
54
  before { subject.add(word) }
55
55
 
56
- context "when the unique filter contains the String's hash" do
57
- it "must return nil" do
56
+ context "when the unique filter already contains the String's hash" do
57
+ it "must return false" do
58
58
  expect(subject.add?(word)).to be(false)
59
59
  end
60
60
  end
@@ -62,7 +62,7 @@ describe Wordlist::UniqueFilter do
62
62
  context "when the unqiue filter does not contain the String's hash" do
63
63
  let(:new_word) { "bar" }
64
64
 
65
- it "must return nil" do
65
+ it "must return true" do
66
66
  expect(subject.add?(new_word)).to be(true)
67
67
  end
68
68
  end
data/wordlist.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.authors = Array(gemspec['authors'])
21
21
  gem.email = gemspec['email']
22
22
  gem.homepage = gemspec['homepage']
23
+ gem.metadata = gemspec['metadata'] if gemspec['metadata']
23
24
 
24
25
  glob = lambda { |patterns| gem.files & Dir[*patterns] }
25
26
 
metadata CHANGED
@@ -1,59 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordlist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2023-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rubygems-tasks
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.1'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.4'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.4'
41
- - !ruby/object:Gem::Dependency
42
- name: yard
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.8'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.8'
55
- description: Wordlist is a Ruby library for reading, manipulating, and creating wordlists,
56
- efficiently.
26
+ version: '2.0'
27
+ description: Wordlist is a Ruby library and CLI for reading, combining, mutating,
28
+ and building wordlists, efficiently.
57
29
  email: postmodern.mod3@gmail.com
58
30
  executables:
59
31
  - wordlist
@@ -158,8 +130,6 @@ files:
158
130
  - spec/abstract_list_spec.rb
159
131
  - spec/builder_examples.rb
160
132
  - spec/builder_spec.rb
161
- - spec/classes/parser_class.rb
162
- - spec/classes/test_list.rb
163
133
  - spec/cli_spec.rb
164
134
  - spec/compression/reader_spec.rb
165
135
  - spec/compression/writer_spec.rb
@@ -194,6 +164,7 @@ files:
194
164
  - spec/operators/power_spec.rb
195
165
  - spec/operators/product_spec.rb
196
166
  - spec/operators/subtract_spec.rb
167
+ - spec/operators/unary_operator_spec.rb
197
168
  - spec/operators/union_spec.rb
198
169
  - spec/operators/unique_spec.rb
199
170
  - spec/spec_helper.rb
@@ -207,7 +178,11 @@ files:
207
178
  homepage: https://github.com/postmodern/wordlist.rb
208
179
  licenses:
209
180
  - MIT
210
- metadata: {}
181
+ metadata:
182
+ documentation_uri: https://rubydoc.info/gems/wordlist
183
+ source_code_uri: https://github.com/postmodern/wordlist.rb
184
+ bug_tracker_uri: https://github.com/postmodern/wordlist.rb/issues
185
+ changelog_uri: https://github.com/postmodern/wordlist.rb/blob/master/ChangeLog.md
211
186
  post_install_message:
212
187
  rdoc_options: []
213
188
  require_paths:
@@ -216,15 +191,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
191
  requirements:
217
192
  - - ">="
218
193
  - !ruby/object:Gem::Version
219
- version: '0'
194
+ version: 2.0.0
220
195
  required_rubygems_version: !ruby/object:Gem::Requirement
221
196
  requirements:
222
197
  - - ">="
223
198
  - !ruby/object:Gem::Version
224
199
  version: '0'
225
200
  requirements: []
226
- rubygems_version: 3.2.22
201
+ rubygems_version: 3.4.10
227
202
  signing_key:
228
203
  specification_version: 4
229
- summary: Ruby library for reading, manipulating, and creating wordlists.
204
+ summary: Ruby library and CLI for reading, combining, mutating, and building wordlists
230
205
  test_files: []
@@ -1,7 +0,0 @@
1
- require 'wordlist/parsers'
2
-
3
- class ParserClass
4
-
5
- include Wordlist::Parsers
6
-
7
- end
@@ -1,9 +0,0 @@
1
- require 'wordlist/list'
2
-
3
- class TestList < Wordlist::List
4
-
5
- def each_word
6
- yield 'omg.hackers'
7
- end
8
-
9
- end