butler 1.8.3 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +293 -37
- data/README.txt +10 -0
- data/Rakefile +24 -13
- data/bin/botcontrol +6 -5
- data/data/butler/dialogs/create.rb +21 -6
- data/data/butler/dialogs/create_config.rb +5 -2
- data/data/butler/dialogs/en/create.yaml +6 -3
- data/data/butler/dialogs/en/create_config.yaml +1 -0
- data/data/butler/dialogs/en/quickcreate.yaml +1 -1
- data/data/butler/dialogs/en/sync.yaml +7 -0
- data/data/butler/dialogs/en/username.yaml +2 -0
- data/data/butler/dialogs/quickcreate.rb +6 -2
- data/data/butler/dialogs/sync.rb +83 -0
- data/data/butler/dialogs/username.rb +1 -0
- data/data/butler/plugins/core/ping.rb +22 -0
- data/data/butler/plugins/core/remote.rb +38 -0
- data/data/butler/plugins/dev/eval.rb +6 -4
- data/data/butler/plugins/dev/onhandlers.rb +93 -0
- data/data/butler/plugins/dev/rawlog.rb +109 -45
- data/data/butler/plugins/games/countdown.rb +23 -14
- data/data/butler/plugins/games/eightball.rb +21 -13
- data/data/butler/plugins/games/roll.rb +12 -12
- data/data/butler/plugins/irc/join.rb +2 -2
- data/data/butler/plugins/irc/notice.rb +10 -10
- data/data/butler/plugins/irc/part.rb +12 -12
- data/data/butler/plugins/irc/privmsg.rb +10 -10
- data/data/butler/plugins/irc/quit.rb +12 -12
- data/data/butler/plugins/operator/devoice.rb +1 -1
- data/data/butler/plugins/public/help.rb +10 -4
- data/data/butler/plugins/{util → service}/calculator.rb +0 -0
- data/data/butler/plugins/service/define.rb +16 -13
- data/data/butler/plugins/service/log.rb +85 -0
- data/data/butler/plugins/service/seen.rb +64 -0
- data/data/butler/plugins/service/svn.rb +6 -5
- data/data/butler/plugins/util/load.rb +3 -1
- data/data/butler/services/org.rubyforge.butler/calculator/1/service.rb +96 -0
- data/data/butler/services/org.rubyforge.butler/log/1/service.rb +148 -68
- data/lib/access/admin.rb +5 -0
- data/lib/blank.rb +32 -0
- data/lib/butler.rb +4 -4
- data/lib/butler/bot.rb +118 -33
- data/lib/butler/control.rb +5 -4
- data/lib/butler/debuglog.rb +12 -4
- data/lib/butler/dialog.rb +1 -1
- data/lib/butler/initialvalues.rb +1 -1
- data/lib/butler/irc/client.rb +31 -12
- data/lib/butler/irc/message.rb +32 -13
- data/lib/butler/irc/parser.rb +67 -30
- data/lib/butler/irc/parser/{commands.rb → command.rb} +0 -38
- data/lib/butler/irc/parser/generic.rb +9 -12
- data/lib/butler/irc/parser/rfc2812.rb +40 -2
- data/lib/butler/irc/socket.rb +66 -41
- data/lib/butler/irc/string.rb +1 -5
- data/lib/butler/plugin.rb +56 -23
- data/lib/butler/plugin/configproxy.rb +1 -0
- data/lib/butler/plugin/more.rb +2 -2
- data/lib/butler/plugins.rb +7 -1
- data/lib/butler/remote/connection.rb +113 -0
- data/lib/butler/remote/message.rb +157 -0
- data/lib/butler/remote/server.rb +85 -0
- data/lib/butler/remote/user.rb +46 -0
- data/lib/butler/service.rb +2 -1
- data/lib/butler/services.rb +2 -2
- data/lib/butler/version.rb +2 -2
- data/lib/configuration.rb +13 -16
- data/lib/ostructfixed.rb +0 -6
- data/lib/ruby/array/random.rb +2 -1
- data/lib/scriptfile.rb +63 -14
- data/lib/timingoutresource.rb +54 -0
- data/test/test_scriptfile.rb +51 -0
- metadata +63 -61
- data/data/butler/dialogs/en/sync_plugins.yaml +0 -3
- data/data/butler/dialogs/sync_plugins.rb +0 -30
- data/data/butler/services/org.rubyforge.butler/calculator/1/calculator.rb +0 -68
- data/lib/log/splitter.rb +0 -30
- data/test/test_access/privilege/banners.statistics.yaml +0 -3
- data/test/test_access/privilege/banners.yaml +0 -3
- data/test/test_access/privilege/news.create.yaml +0 -3
- data/test/test_access/privilege/news.delete.yaml +0 -3
- data/test/test_access/privilege/news.edit.yaml +0 -3
- data/test/test_access/privilege/news.read.yaml +0 -3
- data/test/test_access/privilege/news.yaml +0 -3
- data/test/test_access/privilege/paid_content.yaml +0 -3
- data/test/test_access/privilege/statistics.ftp.yaml +0 -3
- data/test/test_access/privilege/statistics.web.yaml +0 -3
- data/test/test_access/privilege/statistics.yaml +0 -3
- data/test/test_access/role/chiefeditor.yaml +0 -7
- data/test/test_access/role/editor.yaml +0 -9
- data/test/test_access/user/test.yaml +0 -12
data/CHANGELOG.txt
CHANGED
@@ -1,5 +1,261 @@
|
|
1
1
|
= Butler2
|
2
2
|
|
3
|
+
=== 31st Dec, 2007
|
4
|
+
* Butler 1.9.0 (rev #645)
|
5
|
+
* bin/botcontrol
|
6
|
+
* sync_plugins is now sync, in preparation of services syncing
|
7
|
+
* botcontrol without command brings up help dialog
|
8
|
+
* dev/logupdate.rb
|
9
|
+
* Added, updates logs created by log service introduced in svn after 1.8.3.
|
10
|
+
* data/butler/dialogs
|
11
|
+
* create
|
12
|
+
* Added question for 'invocation'.
|
13
|
+
* create and quickcreate
|
14
|
+
* Added some comments
|
15
|
+
* Fixed language question in create and quickcreate.
|
16
|
+
* Fixed language choice regexp
|
17
|
+
* Removed question for quicksetup.
|
18
|
+
* create_config
|
19
|
+
* Added a little diagnostic output.
|
20
|
+
* sync
|
21
|
+
* Obsoletes sync_plugins.
|
22
|
+
* Now syncs services too.
|
23
|
+
* Patch to provide more info on failure.
|
24
|
+
* sync_plugins
|
25
|
+
* Replaced by sync.
|
26
|
+
* username
|
27
|
+
* Added
|
28
|
+
* data/butler/plugins
|
29
|
+
* General
|
30
|
+
* Cleaned up plugins (use metadata instead of trigger method and clean up metadata)
|
31
|
+
* core/ping
|
32
|
+
* Added, temporary(?) workaround for the "cork effect" (see bugtracker).
|
33
|
+
* core/remote
|
34
|
+
* Added, provides minimal control for remote server.
|
35
|
+
* core/user
|
36
|
+
* Obsoleted by core/access.
|
37
|
+
* dev/eval
|
38
|
+
* Uses 'more...' now.
|
39
|
+
* Outputs the whole backtrace in case of an exception.
|
40
|
+
* Pass on Interrupts.
|
41
|
+
* dev/onhandlers
|
42
|
+
* Fixed on_part handler.
|
43
|
+
* Incremented revision so it can be synced.
|
44
|
+
* dev/rawlog
|
45
|
+
* Fixed a string.
|
46
|
+
* Fixed output of incomming messages.
|
47
|
+
* games/eightball
|
48
|
+
* Translated to german.
|
49
|
+
* games/countdown
|
50
|
+
* Added.
|
51
|
+
* operator/devoice
|
52
|
+
* Fixed method name typo
|
53
|
+
* Fixed answer string name typo
|
54
|
+
* public/help
|
55
|
+
* Fixed to correctly display help topics, updated the help text
|
56
|
+
* service/log
|
57
|
+
* Overhauled to use log service.
|
58
|
+
* service/calculator
|
59
|
+
* Added
|
60
|
+
* service/define
|
61
|
+
* Improved behaviour on empty results.
|
62
|
+
* Updated for new answer method with integrated 'more'.
|
63
|
+
* service/seen
|
64
|
+
* Added
|
65
|
+
* service/svn
|
66
|
+
* Updated documentation
|
67
|
+
* util/load
|
68
|
+
* Changed output format.
|
69
|
+
* Pass on Interrupts.
|
70
|
+
* data/butler/services/org.rubyforge.butler
|
71
|
+
* log/1/service.rb
|
72
|
+
* IMPORTANT: the old database format is incompatible, use dev/logupdate.rb to update your db before using the new service.
|
73
|
+
* Added #find_first, #find_last
|
74
|
+
* Added 'identified' field
|
75
|
+
* Added #logged_channels
|
76
|
+
* Logs the select statement as debug
|
77
|
+
* Fixed #sub_where
|
78
|
+
* Added initialization of $swig_runtime_data_type_pointer2 because the sqlite people failed to.
|
79
|
+
* Fixed #find_first and #find_last to accept the limitation parameter as single argument.
|
80
|
+
* QUIT messages of course don't have a channel.
|
81
|
+
* Fixed a few bugs regarding selects/finds.
|
82
|
+
* Now also logs :NICK and :TOPIC.
|
83
|
+
* Fixed init of $swig_runtime_data_type_pointer2 to respect its read-onliness.
|
84
|
+
* calculator/1/service.rb
|
85
|
+
* Added.
|
86
|
+
* lib
|
87
|
+
* General
|
88
|
+
* Added ISUPPORT support.
|
89
|
+
* Added PASS patch supplied by scoopr.
|
90
|
+
* Added support for single-char prefix command calls.
|
91
|
+
* access/admin
|
92
|
+
* Added Admin#admin?.
|
93
|
+
* blank.rb
|
94
|
+
* Added.
|
95
|
+
* butler.rb:
|
96
|
+
* Append to logfiles rather than truncate and write.
|
97
|
+
* Thread.abort_on_exceptions is only set to true if $DEBUG is set
|
98
|
+
* Only quits in the ensure if connected
|
99
|
+
* butler/bot.rb:
|
100
|
+
* Fixed ghosting (no longer tries to ghost itself)
|
101
|
+
* Added use of Butler::Remote::Server
|
102
|
+
* Added some docs
|
103
|
+
* Removed selftest
|
104
|
+
* Replaced sleep with a proper wait when waiting for ghost to take effect on login
|
105
|
+
* Added Message#formatted_arguments
|
106
|
+
* Improved Message#arguments
|
107
|
+
* Message#post_arguments no longer strips color information and keeps spacing as original
|
108
|
+
* Fixed sanitizing last argument in #arguments, #post_arguments and #formatted_arguments.
|
109
|
+
* Added #connected?
|
110
|
+
* Rescues Errno::ECONNREFUSED and retries.
|
111
|
+
* butler/control.rb
|
112
|
+
* Make use of the new username question.
|
113
|
+
* The struct returned by #user_config now includes service_repository.
|
114
|
+
* Corrected comment.
|
115
|
+
* lib/butler/debuglog.rb
|
116
|
+
* Added $stderr default for @raw_log
|
117
|
+
* Improved docs
|
118
|
+
* butler/initialvalues.rb
|
119
|
+
* Configuration now uses plugins instead of plugin as path.
|
120
|
+
* butler/irc/client.rb
|
121
|
+
* Added auto-capab (CAPAB will be activated automatically).
|
122
|
+
* #dispatch is now a separate method to allow message injection.
|
123
|
+
* Fixed #thread_read so reconnect can work properly.
|
124
|
+
* #wait_for now accepts a callback argument to run after starting to listen and before blocking.
|
125
|
+
* Fixed #initialize, used Socket#write instead of #write_with_eol.
|
126
|
+
* butler/irc/message.rb
|
127
|
+
* Message's hash equality is now object-identity.
|
128
|
+
* Added a bit documentation.
|
129
|
+
* Fixed #answer to work with other messages than just :PRIVMSG and :NOTICE and to raise on unsupported messages.
|
130
|
+
* Corrected supported messages by #answer
|
131
|
+
* Improved docs
|
132
|
+
* butler/irc/parser.rb
|
133
|
+
* Added #alter_expression.
|
134
|
+
* Added #same_nick? as it is connection/parser dependent.
|
135
|
+
* butler/irc/parser/commands.rb
|
136
|
+
* Obsoleted.
|
137
|
+
* butler/irc/parser/generic.rb
|
138
|
+
* Added command 410.
|
139
|
+
* Fixed erroneous CAPAB detection.
|
140
|
+
* Expression for nickname uses isupports nicklen value.
|
141
|
+
* butler/irc/parser/rfc2812.rb
|
142
|
+
* Added public? and private? to more commands.
|
143
|
+
* Fixed expression for nickname (8 chars max).
|
144
|
+
* butler/irc/socket.rb
|
145
|
+
* Updated diagnostics (informs about start of connection).
|
146
|
+
* Added #log_out to log outgoing messages.
|
147
|
+
* #read sets #connected? now.
|
148
|
+
* Pass on Interrupts.
|
149
|
+
* Renamed #write to #write_with_eol
|
150
|
+
* Added #connected?
|
151
|
+
* Added #multiple_modes
|
152
|
+
* Mode commands now split on too many targets
|
153
|
+
* butler/irc/string.rb
|
154
|
+
* Removed a comment.
|
155
|
+
* Removed #same_nick?, it's now in Butler::IRC::Parser.
|
156
|
+
* butler/plugin.rb
|
157
|
+
* Added #say
|
158
|
+
* Fixed #answer_with_lead.
|
159
|
+
* #answer* got optimizations for remote messages.
|
160
|
+
* Uses the full base path of the plugin as template for the config path.
|
161
|
+
* Aligned plugin_accessor to plugin_attribute - second arg is now default value.
|
162
|
+
* ::plugin_attribute now accepts a default value.
|
163
|
+
* butler/plugin/configproxy.rb
|
164
|
+
* Creates the path to the directory of the proxy.
|
165
|
+
* butler/plugin/more.rb
|
166
|
+
* Increased length of parts to 500 chars.
|
167
|
+
* Removed ',' before "[more...]".
|
168
|
+
* butler/plugins.rb
|
169
|
+
* Pass on Interrupts.
|
170
|
+
* Plugin is unloaded before calling ::on_unload now.
|
171
|
+
* butler/remote/*
|
172
|
+
* Added.
|
173
|
+
* butler/service.rb
|
174
|
+
* Fixed an attr_reader (forgot to change its name).
|
175
|
+
* Added an info-level output for loading a service.
|
176
|
+
* butler/services.rb
|
177
|
+
* Fixed a copy & paste error.
|
178
|
+
* configuration.rb
|
179
|
+
* Added more characters to escape
|
180
|
+
* Fixed loading files without keys.
|
181
|
+
* Moved #encode_filename to ::escape and #decode_filename to ::unescape.
|
182
|
+
* Removed String#config_key
|
183
|
+
* ruby/array/random.rb
|
184
|
+
* Fixed Array#random(n) with argument (would only pick from the first n elements).
|
185
|
+
* scriptfile.rb:
|
186
|
+
* No longer opens files always in r+ mode
|
187
|
+
* Doesn't automatically append __END__
|
188
|
+
* timingoutresource.rb
|
189
|
+
* Added.
|
190
|
+
* test
|
191
|
+
* test_scriptfile.rb
|
192
|
+
* Added groundwork for scriptfile tests.
|
193
|
+
* test_access.rb
|
194
|
+
* Updated for new access.
|
195
|
+
* Rakefile:
|
196
|
+
* Added warning for rake install
|
197
|
+
* Fixed tarball installation
|
198
|
+
|
199
|
+
=== 6th Dec, 2007
|
200
|
+
* Butler 1.8.3 (rev #485)
|
201
|
+
* bin/botcontrol: Fixed call of uninstall dialog.
|
202
|
+
* data/butler/dialogs
|
203
|
+
* create_config.rb
|
204
|
+
* Fixed a bug where setup via su for another user wouldn't work.
|
205
|
+
* quickcreate.rb:
|
206
|
+
* Fixed a 'say'.
|
207
|
+
* uninstall.rb:
|
208
|
+
* Fixed.
|
209
|
+
* data/butler/plugins
|
210
|
+
* operator/*:
|
211
|
+
* Translation to spanish, thanks to Rafael George.
|
212
|
+
* dev/bleakhouse.rb:
|
213
|
+
* Disables itself if $BLEAK_HOUSE is not defined or true.
|
214
|
+
* data/butler/services:
|
215
|
+
* org.rubyforge.butler/log:
|
216
|
+
* Added
|
217
|
+
* org.rubyforge.butler/strings:
|
218
|
+
* Added
|
219
|
+
* lib
|
220
|
+
* access:
|
221
|
+
* Updated, adapted access plugin and quickcreate to the changes.
|
222
|
+
* butler.rb:
|
223
|
+
* Added creation of service directory for new bots.
|
224
|
+
* butler/bot.rb:
|
225
|
+
* Added support for services
|
226
|
+
* Added #services
|
227
|
+
* butler/bot.rb:
|
228
|
+
* Adapted for updated access framework.
|
229
|
+
* butler/control.rb
|
230
|
+
* Added support for services.
|
231
|
+
* butler/initialvalues.rb
|
232
|
+
* Removed Strings and added Services from bot-skeleton.
|
233
|
+
* butler/plugin.rb: Fixed a bug (Exception::Detail instead of the correct Exception::Detailed).
|
234
|
+
* Added #service.
|
235
|
+
* Added ::plugin_attribute and ::plugin_accessor.
|
236
|
+
* butler/plugins.rb:
|
237
|
+
* Uses now ruby/string/camelcase instead of inline definition
|
238
|
+
* Sets its @logger
|
239
|
+
* butler/service.rb
|
240
|
+
* Added.
|
241
|
+
* butler/services.rb:
|
242
|
+
* Added.
|
243
|
+
* butler/irc/client.rb
|
244
|
+
* Added support for CAPAB IDENTIFY-MSG.
|
245
|
+
* butler/irc/message.rb:
|
246
|
+
* Added #identified? (uses CAPAB IDENTIFY-MSG).
|
247
|
+
* butler/irc/parser.rb:
|
248
|
+
* Added support for CAPAB IDENTIFY-MSG.
|
249
|
+
* butler/irc/parser/generic.rb:
|
250
|
+
* Added support for CAPAB IDENTIFY-MSG.
|
251
|
+
* butler/irc/parser/rfc2812.rb:
|
252
|
+
* Added support for CAPAB IDENTIFY-MSG.
|
253
|
+
* ruby/string/camelcase.rb:
|
254
|
+
* Added.
|
255
|
+
* ruby/array/random.rb
|
256
|
+
* Added.
|
257
|
+
|
258
|
+
|
3
259
|
=== 28th Nov, 2007
|
4
260
|
* Butler 1.8.2 (rev #436)
|
5
261
|
* bin/botcontrol:
|
@@ -170,43 +426,43 @@
|
|
170
426
|
|
171
427
|
=== 27th Oct, 2007
|
172
428
|
* Butler 1.8.1 (rev #328)
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
429
|
+
* botcontrol
|
430
|
+
* New flag -l (lowercased L) overrides config and connects locally.
|
431
|
+
* Setup now allows to set botcontrol up for another user
|
432
|
+
* Fixed permissions of directories created for a user
|
433
|
+
* Log now uses logger instead of log_device, changes due to that in:
|
434
|
+
* lib/butler.rb
|
435
|
+
* lib/butler/bot.rb
|
436
|
+
* lib/butler/irc/socket.rb
|
437
|
+
* lib/butler/plugin.rb
|
438
|
+
* lib/irc/client.rb
|
439
|
+
* lib/log/comfort.rb
|
440
|
+
* lib/butler/irc/client.rb:
|
441
|
+
* Adapted to new Commands requiring specification of command-sets
|
442
|
+
* Added #load_command_set
|
443
|
+
* lib/butler/irc/parser/rfc2812.rb: Added, moved rfc2812 commands to it.
|
444
|
+
* lib/butler/irc/parser/generic.rb:
|
445
|
+
* moved rfc2812 commands to rfc2812.rb
|
446
|
+
* Added 396 RPL_HIDDENHOST
|
447
|
+
* lib/butler/irc/parser/commands.rb:
|
448
|
+
* Now loads only command-sets as specified
|
449
|
+
* Added #load, to post-load command-sets
|
450
|
+
* Added logging
|
451
|
+
* Added a warning if matching of a message fails
|
452
|
+
* lib/butler/irc/user.rb: Added #force_update.
|
453
|
+
* lib/butler/irc/parser.rb:
|
454
|
+
* Fixed logging of ParseErrors (forgot to initialize_details)
|
455
|
+
* Adapted to new Commands requiring specification of command-sets
|
456
|
+
* lib/configuration.rb: Changed separator from . to / to increase consistence.
|
457
|
+
* lib/log.rb: More documentation.
|
458
|
+
* lib/log/comfort.rb: Added #log_origin
|
459
|
+
* lib/log/entry.rb: Supports origin now.
|
460
|
+
* lib/butler.rb: Fixed a bug (::start wouldn't pass on the options param)
|
461
|
+
* lib/irc/client.rb: Now uses options[:server] if available
|
462
|
+
* lib/ruby/exception/detailed.rb: Hardened against misuse.
|
463
|
+
* lib/butler/irc/client.rb: Fixed a bug (forgot to include Log::Comfort)
|
464
|
+
* Rakefile: Added :website_docs task.
|
465
|
+
* README: updated.
|
210
466
|
|
211
467
|
=== 7th Oct, 2007
|
212
468
|
* Initial release of Butler2. Butler 1.8.x series is the alpha series of Butler2.
|
data/README.txt
CHANGED
@@ -14,8 +14,18 @@ authorization system, a remote login server and thorough localization support.
|
|
14
14
|
gem install butler
|
15
15
|
sudo botcontrol setup
|
16
16
|
|
17
|
+
=== From SVN
|
18
|
+
svn checkout svn://rubyforge.org/var/svn/butler/trunk
|
19
|
+
cd trunk
|
20
|
+
sudo rake install_gem
|
21
|
+
sudo botcontrol setup
|
22
|
+
Notice, if checkout fails, try a few minutes later. Rubyforge drops anonymous svn connections on
|
23
|
+
higher load.
|
24
|
+
|
17
25
|
=== From Tarball
|
18
26
|
Download the latest release from http://rubyforge.org/frs/?group_id=1349&release_id=15267
|
27
|
+
Note that Tarball installation is currently discouraged as there's no automatic way to remove
|
28
|
+
the installed libs.
|
19
29
|
cd butler*
|
20
30
|
sudo rake install
|
21
31
|
|
data/Rakefile
CHANGED
@@ -16,10 +16,6 @@ require 'rake/packagetask'
|
|
16
16
|
require 'rake/gempackagetask'
|
17
17
|
require 'rake/rdoctask'
|
18
18
|
require 'rake/contrib/rubyforgepublisher'
|
19
|
-
require 'fileutils'
|
20
|
-
require 'scriptfile'
|
21
|
-
require 'yaml'
|
22
|
-
require 'pp'
|
23
19
|
|
24
20
|
include FileUtils
|
25
21
|
require File.join(File.dirname(__FILE__), 'lib', 'butler', 'version')
|
@@ -62,7 +58,7 @@ LOCAL_PATHS['plugins'] = "#{LOCAL_PATHS['data']}/plugins"
|
|
62
58
|
#LOCAL_PATHS['config'] = "#{Config::CONFIG['sysconfdir']}/butler"
|
63
59
|
LOCAL_PATHS['pids'] = "#{Config::CONFIG['localstatedir']}/run/butler"
|
64
60
|
CHANGES = "See CHANGELOG.txt"
|
65
|
-
DESC = "Butler 1.
|
61
|
+
DESC = "Butler 1.9.0, 1st beta release of butler2."
|
66
62
|
|
67
63
|
GemSpec = Gem::Specification.new do |s|
|
68
64
|
s.homepage = HOMEPATH
|
@@ -116,6 +112,19 @@ desc "Default task, will install butler from tarball"
|
|
116
112
|
|
117
113
|
desc 'Install butler from tarball'
|
118
114
|
task :install do
|
115
|
+
puts "\e[41m\e[1m WARNING \e[0m"
|
116
|
+
puts "Tarball installation currently provides no way to uninstall the libraries."
|
117
|
+
puts "Since libraries installed via tarball have priority over gems,"
|
118
|
+
puts "you will have to delete all libraries manually before eventually installing"
|
119
|
+
puts "it as a gem."
|
120
|
+
puts "It is strongly recommended to use 'sudo rake install_gem' instead."
|
121
|
+
puts
|
122
|
+
print "Continue? [y/N]: "
|
123
|
+
abort("Nothing installed, terminating.") unless $stdin.gets =~ /^y(?:es?)?$/i
|
124
|
+
puts
|
125
|
+
puts "Installing..."
|
126
|
+
puts
|
127
|
+
|
119
128
|
path = OpenStruct.new(
|
120
129
|
:bin => Config::CONFIG["bindir"],
|
121
130
|
:lib => Config::CONFIG["sitedir"],
|
@@ -123,9 +132,10 @@ task :install do
|
|
123
132
|
:data => Config::CONFIG["datadir"]+'/butler',
|
124
133
|
:man => Config::CONFIG["mandir"]+'/butler'
|
125
134
|
)
|
126
|
-
path.dialogs
|
127
|
-
path.
|
128
|
-
path.
|
135
|
+
path.dialogs = path.data+'/dialogs'
|
136
|
+
path.services = path.data+'/services'
|
137
|
+
path.plugins = path.data+'/plugins'
|
138
|
+
path.strings = path.data+'/strings'
|
129
139
|
|
130
140
|
install = [
|
131
141
|
["src/bin/botcontrol", path.bin, "Installing Executable..."],
|
@@ -137,10 +147,11 @@ task :install do
|
|
137
147
|
]
|
138
148
|
replace = [
|
139
149
|
[path.lib+'/butler/control.rb', {
|
140
|
-
'%CONFIG_DIR%'
|
141
|
-
'%DIALOGS_DIR%'
|
142
|
-
'%PLUGINS_DIR%'
|
143
|
-
'%
|
150
|
+
'%CONFIG_DIR%' => path.etc.inspect,
|
151
|
+
'%DIALOGS_DIR%' => path.dialogs.inspect,
|
152
|
+
'%PLUGINS_DIR%' => path.plugins.inspect,
|
153
|
+
'%SERVICES_DIR%' => path.services.inspect,
|
154
|
+
'%STRINGS_DIR%' => path.strings.inspect,
|
144
155
|
}]
|
145
156
|
]
|
146
157
|
config = {
|
@@ -280,4 +291,4 @@ task :check_version do
|
|
280
291
|
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
281
292
|
exit
|
282
293
|
end
|
283
|
-
end
|
294
|
+
end
|
data/bin/botcontrol
CHANGED
@@ -85,7 +85,7 @@ options["start"] = CLOptions.new("[botname]") {
|
|
85
85
|
}
|
86
86
|
options["setup"] = CLOptions.new("[user]")
|
87
87
|
options["stop"] = CLOptions.new("[botname]")
|
88
|
-
options["
|
88
|
+
options["sync"] = CLOptions.new("[botname] [user]")
|
89
89
|
options.each { |name, opt| opt.application_name "#{File.basename($0)} #{name}" }
|
90
90
|
|
91
91
|
command = (ARGV.shift || "interactive").downcase
|
@@ -130,8 +130,9 @@ case command
|
|
130
130
|
botcontrol.discuss("info", false, :user => opt.argv.user)
|
131
131
|
|
132
132
|
when "interactive"
|
133
|
-
botcontrol.discuss("
|
134
|
-
botcontrol.discuss("
|
133
|
+
botcontrol.discuss("help", false, :command => nil)
|
134
|
+
#botcontrol.discuss("create_config", false, :user => nil)
|
135
|
+
#botcontrol.discuss("interactive")
|
135
136
|
|
136
137
|
when "log"
|
137
138
|
botcontrol.discuss("create_config", false, :user => nil)
|
@@ -240,9 +241,9 @@ case command
|
|
240
241
|
botname = opt.argv.botname || botcontrol.discuss(:selectbot, false)[:botname]
|
241
242
|
Butler.stop(nil, botname)
|
242
243
|
|
243
|
-
when "
|
244
|
+
when "sync"
|
244
245
|
botcontrol.discuss("create_config", false, :user => opt.argv.user)
|
245
|
-
botcontrol.discuss("
|
246
|
+
botcontrol.discuss("sync", false,
|
246
247
|
:user => opt.argv.user,
|
247
248
|
:path => botcontrol.user_config(opt.argv.user),
|
248
249
|
:botname => opt.argv.botname
|