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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbf22535b76909afa60ab21658ee83a9a675966a0880ee987fc7c20a0e9fc8d6
|
4
|
+
data.tar.gz: 48e995d0e7a98399b533c7032af90f0bc3bf884e56edf13ac08ea3ee0e49c837
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e4e98449435c95ecc3de5bfcc2f702f63af1760b1ac06791b0eb105459c850a3383b2b653d3e708bff603d8a4625e71b7b91c45b7c09d13153d5633d2a2731b
|
7
|
+
data.tar.gz: 9ff1ba4064ce74d9ebac59309e8feb1fe469aefdc2cd15ada9dc3bf56b064c02ed4fc0725701d5d62661501f24087e0c86fcce8945c24df60f5b8beeeb9db674
|
data/{README.rst → README.md}
RENAMED
File without changes
|
@@ -28,14 +28,16 @@ module Lita
|
|
28
28
|
|
29
29
|
combos = []
|
30
30
|
|
31
|
-
|
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
|
-
|
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.
|
40
|
+
combo_str = combos.join ", "
|
39
41
|
|
40
42
|
Lita.logger.info "Returning: #{combo_str}"
|
41
43
|
|
@@ -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,
|
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.
|
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-
|
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.
|
123
|
+
- README.md
|
124
124
|
- Rakefile
|
125
125
|
- lib/lita-onewheel-word-jumble.rb
|
126
126
|
- lib/lita/handlers/onewheel_word_jumble.rb
|