tkellem 0.8.8 → 0.8.9

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.
@@ -15,7 +15,7 @@ class Tkellem::Daemon
15
15
  end
16
16
 
17
17
  def run
18
- OptionParser.new do |opts|
18
+ opts = OptionParser.new do |opts|
19
19
  opts.banner = "Usage #{$0} <command> <options>"
20
20
  opts.separator %{\nWhere <command> is one of:
21
21
  start start the jobs daemon
@@ -29,7 +29,8 @@ class Tkellem::Daemon
29
29
  opts.separator "\n<options>"
30
30
  opts.on("-p", "--path", "Use alternate folder for tkellem data (default #{options[:path]})") { |p| options[:path] = p }
31
31
  opts.on_tail("-h", "--help", "Show this message") { puts opts; exit }
32
- end.parse!(@args)
32
+ end
33
+ opts.parse!(@args)
33
34
 
34
35
  FileUtils.mkdir_p(path)
35
36
  File.chmod(0700, path)
@@ -50,6 +51,8 @@ class Tkellem::Daemon
50
51
  start
51
52
  when 'admin'
52
53
  admin
54
+ when nil
55
+ puts opts
53
56
  else
54
57
  raise("Unknown command: #{command.inspect}")
55
58
  end
@@ -258,7 +258,7 @@ class TkellemBot
258
258
 
259
259
  if opts['username']
260
260
  if Command.admin_user?(user)
261
- user = User.first(:conditions => { :username => args['username'] })
261
+ user = User.first(:conditions => { :username => opts['username'] })
262
262
  else
263
263
  raise Command::ArgumentError, "Only admins can change other passwords"
264
264
  end
@@ -16,14 +16,6 @@ require 'tkellem/plugins/push_service'
16
16
 
17
17
  module Tkellem
18
18
 
19
- unless ActiveRecord::Base.connected?
20
- ActiveRecord::Base.establish_connection({
21
- :adapter => 'sqlite3',
22
- :database => File.expand_path("~/.tkellem/tkellem.sqlite3"),
23
- })
24
- ActiveRecord::Migrator.migrate(File.expand_path("../migrations", __FILE__), nil)
25
- end
26
-
27
19
  class TkellemServer
28
20
  include Tkellem::EasyLogger
29
21
 
@@ -34,6 +26,14 @@ class TkellemServer
34
26
  @bouncers = {}
35
27
  $tkellem_server = self
36
28
 
29
+ unless ActiveRecord::Base.connected?
30
+ ActiveRecord::Base.establish_connection({
31
+ :adapter => 'sqlite3',
32
+ :database => File.expand_path("~/.tkellem/tkellem.sqlite3"),
33
+ })
34
+ ActiveRecord::Migrator.migrate(File.expand_path("../migrations", __FILE__), nil)
35
+ end
36
+
37
37
  ListenAddress.all.each { |a| listen(a) }
38
38
  NetworkUser.find_each { |nu| add_bouncer(Bouncer.new(nu)) }
39
39
  Observer.forward_to << self
@@ -1,3 +1,3 @@
1
1
  module Tkellem
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
3
3
  end
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkellem
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 45
4
5
  prerelease:
5
- version: 0.8.8
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 9
10
+ version: 0.8.9
6
11
  platform: ruby
7
12
  authors:
8
13
  - Brian Palmer
@@ -10,8 +15,7 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-07-01 00:00:00 -06:00
14
- default_executable: tkellem
18
+ date: 2011-10-03 00:00:00 Z
15
19
  dependencies:
16
20
  - !ruby/object:Gem::Dependency
17
21
  name: eventmachine
@@ -21,6 +25,11 @@ dependencies:
21
25
  requirements:
22
26
  - - ~>
23
27
  - !ruby/object:Gem::Version
28
+ hash: 59
29
+ segments:
30
+ - 0
31
+ - 12
32
+ - 10
24
33
  version: 0.12.10
25
34
  type: :runtime
26
35
  version_requirements: *id001
@@ -32,6 +41,11 @@ dependencies:
32
41
  requirements:
33
42
  - - ~>
34
43
  - !ruby/object:Gem::Version
44
+ hash: 7
45
+ segments:
46
+ - 3
47
+ - 0
48
+ - 0
35
49
  version: 3.0.0
36
50
  type: :runtime
37
51
  version_requirements: *id002
@@ -43,6 +57,11 @@ dependencies:
43
57
  requirements:
44
58
  - - ~>
45
59
  - !ruby/object:Gem::Version
60
+ hash: 29
61
+ segments:
62
+ - 1
63
+ - 3
64
+ - 3
46
65
  version: 1.3.3
47
66
  type: :runtime
48
67
  version_requirements: *id003
@@ -54,6 +73,10 @@ dependencies:
54
73
  requirements:
55
74
  - - ~>
56
75
  - !ruby/object:Gem::Version
76
+ hash: 9
77
+ segments:
78
+ - 2
79
+ - 5
57
80
  version: "2.5"
58
81
  type: :development
59
82
  version_requirements: *id004
@@ -65,6 +88,9 @@ dependencies:
65
88
  requirements:
66
89
  - - ">="
67
90
  - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
68
94
  version: "0"
69
95
  type: :development
70
96
  version_requirements: *id005
@@ -125,7 +151,6 @@ files:
125
151
  - spec/irc_server_spec.rb
126
152
  - spec/spec_helper.rb
127
153
  - tkellem.gemspec
128
- has_rdoc: true
129
154
  homepage: http://github.com/codekitchen/tkellem
130
155
  licenses: []
131
156
 
@@ -139,17 +164,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
164
  requirements:
140
165
  - - ">="
141
166
  - !ruby/object:Gem::Version
167
+ hash: 3
168
+ segments:
169
+ - 0
142
170
  version: "0"
143
171
  required_rubygems_version: !ruby/object:Gem::Requirement
144
172
  none: false
145
173
  requirements:
146
174
  - - ">="
147
175
  - !ruby/object:Gem::Version
176
+ hash: 3
177
+ segments:
178
+ - 0
148
179
  version: "0"
149
180
  requirements: []
150
181
 
151
182
  rubyforge_project:
152
- rubygems_version: 1.6.2
183
+ rubygems_version: 1.8.10
153
184
  signing_key:
154
185
  specification_version: 3
155
186
  summary: IRC bouncer with multi-client support