lita-onewheel-word-jumble 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 482f6f8107f35dc725420e9108b45ec578cbbc3976f0a23c5d24cc128be77086
4
- data.tar.gz: d3110600c51e6ae5f495e4c5bd2aa15aa010fc6861be2322e17b8ce586168b84
3
+ metadata.gz: bbf22535b76909afa60ab21658ee83a9a675966a0880ee987fc7c20a0e9fc8d6
4
+ data.tar.gz: 48e995d0e7a98399b533c7032af90f0bc3bf884e56edf13ac08ea3ee0e49c837
5
5
  SHA512:
6
- metadata.gz: '048cacb26f33cf9442361744601ed4eced796d9f2cc8e16194bf9dc1bca6601daa79d111167e26dff9203d92269524ba31c5ec2666bfed356e769a00f3222fda'
7
- data.tar.gz: 87f95e3225988a9998411b49325a9a3687bf314aa76b0237569fa518fd9d47aee7feee8360c41c0bd616ad205bd7a5d36c7db1e1f4b38ed4123a379f091759bf
6
+ metadata.gz: 3e4e98449435c95ecc3de5bfcc2f702f63af1760b1ac06791b0eb105459c850a3383b2b653d3e708bff603d8a4625e71b7b91c45b7c09d13153d5633d2a2731b
7
+ data.tar.gz: 9ff1ba4064ce74d9ebac59309e8feb1fe469aefdc2cd15ada9dc3bf56b064c02ed4fc0725701d5d62661501f24087e0c86fcce8945c24df60f5b8beeeb9db674
File without changes
@@ -28,14 +28,16 @@ module Lita
28
28
 
29
29
  combos = []
30
30
 
31
- for n in (min_len..len) do
31
+ (min_len..len).each do |n|
32
32
  Lita.logger.debug "Checking for #{n} length words..."
33
+ arr = []
33
34
  letters.split(//).permutation(n).to_a.map(&:join).each do |combo|
34
- combos.push combo if words[combo] == 1
35
+ arr.push combo if words[combo] == 1
35
36
  end
37
+ combos.push arr.sort.uniq
36
38
  end
37
39
 
38
- combo_str = combos.sort.uniq.join ", "
40
+ combo_str = combos.join ", "
39
41
 
40
42
  Lita.logger.info "Returning: #{combo_str}"
41
43
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-word-jumble'
3
- spec.version = '0.1.0'
3
+ spec.version = '0.1.1'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = 'A word jumble solver helper.'
@@ -15,7 +15,7 @@ describe Lita::Handlers::OnewheelWordJumble, lita_handler: true do
15
15
  send_command 'words aelb'
16
16
  expect(replies.last).to_not be(nil)
17
17
  expect(replies.count).to be(1)
18
- expect(replies.last).to eq('abe, abel, able, alb, albe, ale, bae, bal, bale, bea, beal, bel, bela, blae, elb, lab, lea')
18
+ expect(replies.last).to eq('abe, alb, ale, bae, bal, bea, bel, elb, lab, lea, abel, able, albe, bale, beal, bela, blae')
19
19
  end
20
20
 
21
21
  it 'solves yer jumble' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-word-jumble
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-15 00:00:00.000000000 Z
11
+ date: 2018-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -120,7 +120,7 @@ files:
120
120
  - ".travis.yml"
121
121
  - Gemfile
122
122
  - LICENSE
123
- - README.rst
123
+ - README.md
124
124
  - Rakefile
125
125
  - lib/lita-onewheel-word-jumble.rb
126
126
  - lib/lita/handlers/onewheel_word_jumble.rb