cinch-karma 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/cinch-karma.gemspec CHANGED
@@ -4,18 +4,19 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'cinch/plugins/karma/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "cinch-karma"
7
+ gem.name = 'cinch-karma'
8
8
  gem.version = Cinch::Plugins::Karma::VERSION
9
- gem.authors = ["Brian Haberer"]
10
- gem.email = ["bhaberer@gmail.com"]
9
+ gem.authors = ['Brian Haberer']
10
+ gem.email = ['bhaberer@gmail.com']
11
11
  gem.description = %q{Cinch Plugin to track karma (item++ / item--) in the channel}
12
12
  gem.summary = %q{Cinch Plugin to Track Karma}
13
- gem.homepage = "https://github.com/bhaberer/cinch-karma"
13
+ gem.homepage = 'https://github.com/bhaberer/cinch-karma'
14
+ gem.license = 'MIT'
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
19
+ gem.require_paths = ['lib']
19
20
 
20
21
  gem.add_development_dependency 'rake'
21
22
  gem.add_development_dependency 'rspec'
data/lib/cinch-karma.rb CHANGED
@@ -1,2 +1,3 @@
1
+ # -*- coding: utf-8 -*-
1
2
  require 'cinch/plugins/karma/version'
2
- require 'cinch/plugins/karma/karma'
3
+ require 'cinch/plugins/karma'
@@ -1,14 +1,18 @@
1
+ # -*- coding: utf-8 -*-
1
2
  require 'cinch'
2
3
  require 'cinch/cooldown'
3
4
  require 'cinch-storage'
4
5
 
5
6
  module Cinch::Plugins
7
+ # Cinch Plugin to monitor karma and report.
6
8
  class Karma
7
9
  include Cinch::Plugin
8
10
 
9
11
  enforce_cooldown
10
12
 
11
- self.help = 'Use .karma <item> to see it\'s karma level. You can use <item>++ or <item>-- [or (something with spaces)++] to alter karma for an item'
13
+ self.help = 'Use .karma <item> to see it\'s karma level. You can use ' +
14
+ '<item>++ or <item>-- [or (something with spaces)++] to ' +
15
+ 'alter karma for an item'
12
16
 
13
17
  listen_to :channel
14
18
 
@@ -59,13 +63,13 @@ module Cinch::Plugins
59
63
 
60
64
  def sent_via_pm?(m)
61
65
  if m.channel.nil?
62
- m.reply "You must use that command in the main channel."
66
+ m.reply 'You must use that command in the main channel.'
63
67
  return true
64
68
  end
65
69
  end
66
70
 
67
71
  def init_karma(channel, item = nil)
68
- @storage.data[channel] ||= Hash.new
72
+ @storage.data[channel] ||= {}
69
73
  @storage.data[channel][item] ||= 0 unless item.nil?
70
74
  end
71
75
  end
@@ -1,7 +1,9 @@
1
+ # -*- coding: utf-8 -*-
1
2
  module Cinch
2
3
  module Plugins
4
+ # Version info
3
5
  class Karma
4
- VERSION = "1.0.1"
6
+ VERSION = '1.0.2'
5
7
  end
6
8
  end
7
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinch-karma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-09 00:00:00.000000000 Z
12
+ date: 2014-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -138,12 +138,13 @@ files:
138
138
  - Rakefile
139
139
  - cinch-karma.gemspec
140
140
  - lib/cinch-karma.rb
141
- - lib/cinch/plugins/karma/karma.rb
141
+ - lib/cinch/plugins/karma.rb
142
142
  - lib/cinch/plugins/karma/version.rb
143
143
  - spec/cinch-karma_spec.rb
144
144
  - spec/spec_helper.rb
145
145
  homepage: https://github.com/bhaberer/cinch-karma
146
- licenses: []
146
+ licenses:
147
+ - MIT
147
148
  post_install_message:
148
149
  rdoc_options: []
149
150
  require_paths:
@@ -169,3 +170,4 @@ summary: Cinch Plugin to Track Karma
169
170
  test_files:
170
171
  - spec/cinch-karma_spec.rb
171
172
  - spec/spec_helper.rb
173
+ has_rdoc: