wordlist 1.0.1 → 1.0.2

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: 3648b45622323ff7c7c9a39d3cdb458d40388f1f0840fb80b917239df7ae995a
4
- data.tar.gz: 8302f069d5a7dfd68103cfa106df8ade1b1d00f7f6755be7158dd7acd2a4bf0e
3
+ metadata.gz: '09442b4fa26d163890845f9ba05bb3620d081ede1aeea4f4681e3292023a329e'
4
+ data.tar.gz: d69e26ee74fef00403afdbd2acddbc617398132d75074fe6cf8546704540ce83
5
5
  SHA512:
6
- metadata.gz: 01662d4d752294cca6da0809f7dfc0a953f7702259c448d73b4cfc796d214ce90797e4eedc80ebd48d005ec67039124ab5e974add35fadc8552f5cc9e6683de1
7
- data.tar.gz: d29b36e5319a75bd9d88617451e6a7fda6c0cf4d0fe4cb43fd41b19da1e960135a57982b09f3ce93ff106668443ba03f26479a664c73737cc7721d8e2d0f26e5
6
+ metadata.gz: f96fd76cbccdeab025ec9bf7c46946f7d684f91e5e01e7a3c68820b9bcbb1c80ec9e50a8d39fea61cbd5e757a0bfffca8e8e2ab1b435b91327d365efeac0f971
7
+ data.tar.gz: a99ea8d51f2e0ffd6b8a5a444870c28bee24698fdce3b44474c1c66acc000ebdba009493b267e68e68d592bd668189e5b77dff971f7e03f08ef7921032071a1c
data/ChangeLog.md CHANGED
@@ -1,3 +1,10 @@
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
+
1
8
  ### 1.0.1 / 2023-07-17
2
9
 
3
10
  * Require Ruby >= 2.0.0.
data/lib/wordlist/cli.rb CHANGED
@@ -239,7 +239,7 @@ module Wordlist
239
239
 
240
240
  # apply operators first
241
241
  @operators.each do |(operator,args)|
242
- wordlist.send(operator,*args)
242
+ wordlist = wordlist.send(operator,*args)
243
243
  end
244
244
 
245
245
  # then apply modifiers
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Wordlist
4
4
  # wordlist version
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
data/spec/cli_spec.rb CHANGED
@@ -683,6 +683,35 @@ Please report the following text to: #{Regexp.escape(described_class::BUG_REPORT
683
683
  ).to_stdout
684
684
  end
685
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
+
686
715
  context "when also given the --exec COMMAND option" do
687
716
  let(:command) { 'echo "WORD: {}"' }
688
717
  let(:argv) { ["--exec", command, file] }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordlist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
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: 2023-07-17 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
14
  name: bundler