lita-onewheel-karma 1.2.2 → 1.2.3

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
  SHA1:
3
- metadata.gz: 230911b7d2cac8f91c7e24e9e7909f062b44934c
4
- data.tar.gz: 07501a884dda9a3d7a64e68b07e840e471dd102e
3
+ metadata.gz: 00734151d2100844826e12892c0270dd552d4da9
4
+ data.tar.gz: c71da26ff10cdaad4cea92471d4dafd6e7e6423c
5
5
  SHA512:
6
- metadata.gz: 177163ef26c90ee1bd11f5bf2454947091689348ed6e5fe7219ed6a94972fe007381c2a0865d751d84ef4dc7778160c5e5a5e59563d1b8795714c9def5bb2f74
7
- data.tar.gz: 0498073764f1ff415e2e0b585ae8f161a64352801209bb47716ee976c37041c65a5670cbd4ce8d2d0387bbb00858d3d6887a5d6e3ac33568836e8043b1ca30df
6
+ metadata.gz: b26fe48459860a108764f1f4ed516a100fc7e33ee46615dd87383f6e2840db39f8bbf58fee3226bfb13e87d7b3d2ad66e1f15b24fd69a946986b746fbbe6e41b
7
+ data.tar.gz: 24b7ccb1b53fe83a2fb8461d3879010c19c9c9cf3a70c6ab15ce59e8ea3cab987506adb1cb4724df3cb545dc8919d1d22f0ec64287fda824caa7f761585be8fb
@@ -13,6 +13,8 @@ module Lita
13
13
  help: {'object-=n:' => 'Remove n karma from [object].'}
14
14
  route /karma\s+(.*)$/, :display_karma, command: true,
15
15
  help: {'karma what' => 'Display karma for what.'}
16
+ route /karma$/, :list_karma, command: true,
17
+ help: {'karma' => 'List all karmas.'}
16
18
 
17
19
  def add_one_karma(response)
18
20
  karma_object = get_karma_object(response)
@@ -81,6 +83,11 @@ module Lita
81
83
  redis.get(karma_object).to_i
82
84
  end
83
85
 
86
+ def list_karma(response)
87
+ redis.getall.each do |k|
88
+ response.reply k
89
+ end
90
+ end
84
91
  end
85
92
 
86
93
  Lita.register_handler(OnewheelKarma)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-karma'
3
- spec.version = '1.2.2'
3
+ spec.version = '1.2.3'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = 'Karma with a maths-focused twist.'
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.add_runtime_dependency 'lita', '~> 4.7'
17
+ spec.add_runtime_dependency 'lita', '~> 4'
18
18
 
19
19
  spec.add_development_dependency 'bundler', '~> 1.3'
20
20
  # spec.add_development_dependency 'pry-byebug', '~> 3.1'
@@ -149,11 +149,6 @@ describe Lita::Handlers::OnewheelKarma, lita_handler: true do
149
149
  expect(replies.last).to eq('dooby has 2 karma!')
150
150
  end
151
151
 
152
- it 'will not just karma' do
153
- send_command 'karma'
154
- expect(replies.last).to eq nil
155
- end
156
-
157
152
  it 'will ignore @\'s' do
158
153
  send_message '@one++'
159
154
  send_message 'one++'
@@ -169,4 +164,13 @@ describe Lita::Handlers::OnewheelKarma, lita_handler: true do
169
164
  expect(replies.count).to eq(5)
170
165
  expect(replies.last).to eq('karma_bot has 4 karma!')
171
166
  end
167
+
168
+ # it 'will !karma best' do
169
+ #
170
+ # end
171
+
172
+ it 'will !karma and list karmas' do
173
+ send_command 'karma'
174
+ expect(replies.last).to be('xx')
175
+ end
172
176
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-karma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.7'
19
+ version: '4'
20
20
  type: :runtime
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: '4.7'
26
+ version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.4.5.1
151
+ rubygems_version: 2.5.1
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Karma shouldn't be bound by simple increment and decrement operations.