Auto 4.0.0.alpha.1-x86-mingw32

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.
Files changed (65) hide show
  1. data/.yardopts +7 -0
  2. data/Gemfile +19 -0
  3. data/LICENSE.md +31 -0
  4. data/README.md +109 -0
  5. data/Rakefile +41 -0
  6. data/bin/auto +110 -0
  7. data/bin/auto-conf +45 -0
  8. data/conf/example.json +100 -0
  9. data/conf/example.yml +125 -0
  10. data/docs/Contributing.md +77 -0
  11. data/docs/Events.md +103 -0
  12. data/docs/Todo.md +21 -0
  13. data/docs/Upgrade.md +16 -0
  14. data/ext/dsl_base.c +49 -0
  15. data/ext/libauto/auto.h +20 -0
  16. data/ext/libauto/extconf.rb +16 -0
  17. data/ext/libauto/libauto.c +29 -0
  18. data/ext/libauto/libauto.h +28 -0
  19. data/ext/libauto/logger.c +177 -0
  20. data/ext/libauto/logger.h +44 -0
  21. data/lib/auto.rb +43 -0
  22. data/lib/auto/api.rb +7 -0
  23. data/lib/auto/api/events.rb +166 -0
  24. data/lib/auto/api/object.rb +29 -0
  25. data/lib/auto/api/plugin.rb +155 -0
  26. data/lib/auto/api/timers.rb +93 -0
  27. data/lib/auto/bot.rb +338 -0
  28. data/lib/auto/config.rb +181 -0
  29. data/lib/auto/configure.rb +410 -0
  30. data/lib/auto/configure/shell.rb +154 -0
  31. data/lib/auto/dsl/base.rb +74 -0
  32. data/lib/auto/dsl/irc.rb +13 -0
  33. data/lib/auto/irc.rb +8 -0
  34. data/lib/auto/irc/common.rb +63 -0
  35. data/lib/auto/irc/library.rb +89 -0
  36. data/lib/auto/irc/object/channel.rb +21 -0
  37. data/lib/auto/irc/object/entity.rb +90 -0
  38. data/lib/auto/irc/object/message.rb +99 -0
  39. data/lib/auto/irc/object/user.rb +139 -0
  40. data/lib/auto/irc/protocol.rb +164 -0
  41. data/lib/auto/irc/protocol/numerics.rb +60 -0
  42. data/lib/auto/irc/sasl/diffie_hellman.rb +36 -0
  43. data/lib/auto/irc/sasl/mech.rb +15 -0
  44. data/lib/auto/irc/sasl/mech/dh_blowfish.rb +83 -0
  45. data/lib/auto/irc/sasl/mech/plain.rb +39 -0
  46. data/lib/auto/irc/server.rb +301 -0
  47. data/lib/auto/irc/state/channel_manager.rb +6 -0
  48. data/lib/auto/irc/state/support.rb +142 -0
  49. data/lib/auto/irc/state/user_manager.rb +6 -0
  50. data/lib/auto/irc/std/commands.rb +99 -0
  51. data/lib/auto/irc/std/numerics.rb +216 -0
  52. data/lib/auto/rubyext/integer.rb +25 -0
  53. data/lib/auto/rubyext/string.rb +10 -0
  54. data/lib/auto/version.rb +18 -0
  55. data/lib/libauto.so +0 -0
  56. data/spec/api_events_spec.rb +68 -0
  57. data/spec/config_json_spec.rb +116 -0
  58. data/spec/config_other_spec.rb +29 -0
  59. data/spec/config_yaml_spec.rb +136 -0
  60. data/spec/helper.rb +19 -0
  61. data/spec/irc_object_entity_spec.rb +51 -0
  62. data/spec/logger_spec.rb +30 -0
  63. data/spec/plugin_base_spec.rb +35 -0
  64. data/spec/timers_spec.rb +42 -0
  65. metadata +238 -0
@@ -0,0 +1,30 @@
1
+ # Auto 4
2
+ # Copyright (c) 2013, Auto Project
3
+ # Distributed under the terms of the FreeBSD license (LICENSE.md).
4
+ require(File.expand_path('../helper.rb', __FILE__))
5
+
6
+ require 'libauto'
7
+
8
+ describe Auto::Logger do
9
+
10
+ before do
11
+ Dir.chdir(File.expand_path('..', __FILE__))
12
+ end
13
+
14
+ describe "#new" do
15
+
16
+ it 'should produce directory logs/' do
17
+ logger = Auto::Logger.new
18
+ Dir.exists?("logs").must_equal true
19
+ end
20
+
21
+ end
22
+
23
+ after do
24
+ Dir[File.join('logs', '*')].each { |f| File.delete f }
25
+ Dir.rmdir("logs")
26
+ end
27
+
28
+ end
29
+
30
+ # vim: set ts=4 sts=2 sw=2 et:
@@ -0,0 +1,35 @@
1
+ # Auto 4
2
+ # Copyright (c) 2013, Auto Project
3
+ # Distributed under the terms of the FreeBSD license (LICENSE.md).
4
+ require_relative "helper"
5
+
6
+ require "auto/api/plugin"
7
+ require "auto/version"
8
+ require "auto/dsl/base"
9
+ require "auto/dsl/irc"
10
+
11
+ $m.stubs(:opts).returns Mocha::Mock.new('OPTS')
12
+ $m.opts.stubs(:verbose?).returns false
13
+
14
+
15
+ describe "The Auto Plugin API" do
16
+
17
+ it "uses a block to let you configure it" do
18
+ $m.expects(:debug)
19
+
20
+ class TestPluginConfigure < Auto::API::Plugin; end
21
+ plugin = TestPluginConfigure.new
22
+ plugin.configure do |c|
23
+ c.name = "AutumnPrettyCaller"
24
+ c.summary = "Basically it's just swarley in a plugin"
25
+ c.version = "1.33.7"
26
+ c.library = "irc"
27
+ c.author = "swarley"
28
+ c.auto = "~> 4.0"
29
+ end
30
+ [plugin.name, plugin.summary, plugin.version, plugin.library, plugin.author, plugin.auto].must_equal(
31
+ ["AutumnPrettyCaller", "Basically it's just swarley in a plugin", "1.33.7", "irc", "swarley", "~> 4.0"]
32
+ )
33
+ end
34
+
35
+ end
@@ -0,0 +1,42 @@
1
+ # Auto 4
2
+ # Copyright (c) 2013, Auto Project
3
+ # Distributed under the terms of the FreeBSD license (LICENSE.md).
4
+ require(File.join(File.expand_path(File.dirname(__FILE__)), 'helper.rb'))
5
+
6
+ require 'auto/api/timers'
7
+
8
+ describe 'The API timer system' do
9
+
10
+ before do
11
+ @clock = Auto::API::Timers.new
12
+ end
13
+
14
+ it 'should have a publicly viewable hash of timers' do
15
+ @clock.timers.class.must_equal Hash
16
+ end
17
+
18
+ it 'should correctly execute once-only timers' do
19
+ @meow = false
20
+ @clock.spawn(0.01, :once) { @meow = true }
21
+ sleep 0.02
22
+ @meow.must_equal true
23
+ end
24
+
25
+ it 'and repeating timers' do
26
+ @moo = 1
27
+ @clock.spawn(0.01, :every) { @moo += 1; self.die if @moo == 3 }
28
+ sleep 0.04
29
+ @moo.must_equal 3
30
+ end
31
+
32
+ it 'should terminate a timer with #del' do
33
+ @rawr = true
34
+ timer = @clock.spawn(0.01, :once) { @rawr = false }
35
+ @clock.del timer
36
+ sleep 0.02
37
+ @rawr.must_equal true
38
+ end
39
+
40
+ end
41
+
42
+ # vim: set ts=4 sts=2 sw=2 et:
metadata ADDED
@@ -0,0 +1,238 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Auto
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0.alpha.1
5
+ prerelease: 6
6
+ platform: x86-mingw32
7
+ authors:
8
+ - Autumn Perrault
9
+ - Matthew Carey
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-01-13 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: colored
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '1.2'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '1.2'
31
+ - !ruby/object:Gem::Dependency
32
+ name: sequel
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: '3.43'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: '3.43'
47
+ - !ruby/object:Gem::Dependency
48
+ name: highline
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.6'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: '1.6'
63
+ - !ruby/object:Gem::Dependency
64
+ name: slop
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ~>
69
+ - !ruby/object:Gem::Version
70
+ version: '3.4'
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ version: '3.4'
79
+ - !ruby/object:Gem::Dependency
80
+ name: rake
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ~>
85
+ - !ruby/object:Gem::Version
86
+ version: '10.0'
87
+ type: :development
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: '10.0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: rake-compiler
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ~>
101
+ - !ruby/object:Gem::Version
102
+ version: '0.8'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '0.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: mocha
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ~>
117
+ - !ruby/object:Gem::Version
118
+ version: '0.13'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ~>
125
+ - !ruby/object:Gem::Version
126
+ version: '0.13'
127
+ description: ! " A simple and smart multi-protocol bot (currently supports IRC)
128
+ which allows for\n easy extension by means of its plugin API.\n"
129
+ email: autobot-talk@googlegroups.com
130
+ executables:
131
+ - auto
132
+ - auto-conf
133
+ extensions: []
134
+ extra_rdoc_files: []
135
+ files:
136
+ - bin/auto-conf
137
+ - bin/auto
138
+ - lib/auto.rb
139
+ - lib/libauto.so
140
+ - lib/auto/dsl/irc.rb
141
+ - lib/auto/dsl/base.rb
142
+ - lib/auto/configure.rb
143
+ - lib/auto/api.rb
144
+ - lib/auto/rubyext/string.rb
145
+ - lib/auto/rubyext/integer.rb
146
+ - lib/auto/irc.rb
147
+ - lib/auto/configure/shell.rb
148
+ - lib/auto/api/timers.rb
149
+ - lib/auto/api/plugin.rb
150
+ - lib/auto/api/events.rb
151
+ - lib/auto/api/object.rb
152
+ - lib/auto/config.rb
153
+ - lib/auto/version.rb
154
+ - lib/auto/irc/protocol.rb
155
+ - lib/auto/irc/library.rb
156
+ - lib/auto/irc/object/message.rb
157
+ - lib/auto/irc/object/entity.rb
158
+ - lib/auto/irc/object/user.rb
159
+ - lib/auto/irc/object/channel.rb
160
+ - lib/auto/irc/sasl/mech.rb
161
+ - lib/auto/irc/sasl/diffie_hellman.rb
162
+ - lib/auto/irc/sasl/mech/dh_blowfish.rb
163
+ - lib/auto/irc/sasl/mech/plain.rb
164
+ - lib/auto/irc/protocol/numerics.rb
165
+ - lib/auto/irc/state/support.rb
166
+ - lib/auto/irc/state/channel_manager.rb
167
+ - lib/auto/irc/state/user_manager.rb
168
+ - lib/auto/irc/common.rb
169
+ - lib/auto/irc/server.rb
170
+ - lib/auto/irc/std/numerics.rb
171
+ - lib/auto/irc/std/commands.rb
172
+ - lib/auto/bot.rb
173
+ - ext/dsl_base.c
174
+ - ext/libauto/logger.c
175
+ - ext/libauto/auto.h
176
+ - ext/libauto/logger.h
177
+ - ext/libauto/extconf.rb
178
+ - ext/libauto/libauto.c
179
+ - ext/libauto/libauto.h
180
+ - docs/Contributing.md
181
+ - docs/Upgrade.md
182
+ - docs/Events.md
183
+ - docs/Todo.md
184
+ - README.md
185
+ - LICENSE.md
186
+ - Gemfile
187
+ - .yardopts
188
+ - conf/example.yml
189
+ - conf/example.json
190
+ - spec/plugin_base_spec.rb
191
+ - spec/config_yaml_spec.rb
192
+ - spec/helper.rb
193
+ - spec/config_json_spec.rb
194
+ - spec/api_events_spec.rb
195
+ - spec/irc_object_entity_spec.rb
196
+ - spec/timers_spec.rb
197
+ - spec/config_other_spec.rb
198
+ - spec/logger_spec.rb
199
+ - Rakefile
200
+ homepage: http://auto.autoproj.org
201
+ licenses:
202
+ - FreeBSD
203
+ post_install_message: ! "Thanks for installing Auto!\n\nWe suggest that, if you're
204
+ not already consulting it, you read the installation guide:\nhttps://github.com/Auto/Auto/wiki/Install-Guide\n\nMoreover,
205
+ you should typically now run `auto-conf` to produce a configuration file.\n\r\nNOTICE:
206
+ You have installed the binary distribution of this gem."
207
+ rdoc_options: []
208
+ require_paths:
209
+ - lib
210
+ required_ruby_version: !ruby/object:Gem::Requirement
211
+ none: false
212
+ requirements:
213
+ - - ! '>='
214
+ - !ruby/object:Gem::Version
215
+ version: 1.9.2
216
+ required_rubygems_version: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>'
220
+ - !ruby/object:Gem::Version
221
+ version: 1.3.1
222
+ requirements: []
223
+ rubyforge_project:
224
+ rubygems_version: 1.8.23
225
+ signing_key:
226
+ specification_version: 3
227
+ summary: A modern, simple, extensible multi-protocol bot.
228
+ test_files:
229
+ - spec/plugin_base_spec.rb
230
+ - spec/config_yaml_spec.rb
231
+ - spec/helper.rb
232
+ - spec/config_json_spec.rb
233
+ - spec/api_events_spec.rb
234
+ - spec/irc_object_entity_spec.rb
235
+ - spec/timers_spec.rb
236
+ - spec/config_other_spec.rb
237
+ - spec/logger_spec.rb
238
+ - Rakefile