syndi 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 27ade4d78970ed7812bb1e4f7edb12b755e2ad84
4
- data.tar.gz: cdc9beaf0aba4162ca054d0085ab053dd7929844
3
+ metadata.gz: d3c3c628e51409c1937e24f0b5d297fb1d8b3cdd
4
+ data.tar.gz: e5e3f0cc263f154cb4f0df8ba70313a2d9cb2921
5
5
  !binary "U0hBNTEy":
6
- metadata.gz: e7d8e880065a0bfdbe71e6ed8963944026214745d9f6f4351b41888faf898494db17a71dd1920f59aa9825679ce09eddc8df3c5d12bb1c77bde2a61e33ea89c8
7
- data.tar.gz: d3d4ac783179808b7ae38391b0fe3cef5796f2c931e65b09806c088cf7b2c5c817488a90f2062bd53f1f1687dc861867b2f5e8eb9eee75ec094300c60af7da8f
6
+ metadata.gz: 0e5a95e3c02248c6e82d1e098147016ae9c7554b9ed4beee218ecb2068cab656d3ff50a526d6adf9ef9a92cb06765d7aabb4340a7d0d444ef4b7cf45b5e27a4c
7
+ data.tar.gz: 7c57468b20970ef7a2d152f503df0d1eb241a872b4f723e72908d9e7d9e92e9c5214bcd2f41562101ce4d755a9beeda228ef059b934206171b84930d76431fdf
data/README.md CHANGED
@@ -5,12 +5,12 @@ _A modern, elegant, extensible multi-protocol chat bot—reloaded._
5
5
 
6
6
  **Formerly known as Auto.**
7
7
 
8
- **Version**: 0.1.0 "Phoenix"
8
+ **Version**: 0.1.1 "Phoenix"
9
9
  [![Build Status](https://travis-ci.org/syndibot/syndi.png?branch=master)](https://travis-ci.org/syndibot/syndi)
10
- [![Dependency Status](https://gemnasium.com/syndibot/syndi.png)](https://gemnasium.com/syndibot/syndi)
11
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/syndibot/syndi)
10
+ [![Dependency Status](https://gemnasium.com/syndibot/syndi.png)](https://gemnasium.com/syndibot/syndi)
11
+ [![Code Climate](https://codeclimate.com/github/syndibot/syndi.png)](https://codeclimate.com/github/syndibot/syndi)
12
12
 
13
- + [Homepage](http://syndibot.com) (lots of information)
13
+ + [Website](http://syndibot.com) (lots of information)
14
14
  + [RubyGems](https://rubygems.org/gems/syndi)
15
15
  + [Wiki](https://github.com/syndibot/syndi/wiki)
16
16
  + [Mailing List](https://groups.google.com/group/syndibot)
@@ -19,10 +19,6 @@ _A modern, elegant, extensible multi-protocol chat bot—reloaded._
19
19
 
20
20
  Our official IRC channel is [#syndi on irc.freenode.net](irc://irc.freenode.net/#syndi).
21
21
 
22
- ### Is it Production-Ready™?
23
-
24
- Not yet. Syndi 4's a fairly sizable project. We're getting close though.
25
-
26
22
  Synopsis
27
23
  --------
28
24
 
@@ -34,6 +30,10 @@ Syndi is automated chat bot software, developed per this philosophy:
34
30
 
35
31
  It is a reboot of Auto, an old IRC bot which, though featureful, suffered of design flaws.
36
32
 
33
+ ### Is it Production-Ready™?
34
+
35
+ Not yet. Syndi's a fairly sizable project. We're getting close though.
36
+
37
37
  Installation
38
38
  ------------
39
39
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@
2
2
  # This free software is distributed under the FreeBSD license (see LICENSE).
3
3
 
4
4
  # import the gemspec
5
- GEMSPEC = 'Syndi.gemspec'
5
+ GEMSPEC = 'syndi.gemspec'
6
6
  $gemspec ||= eval(File.read(GEMSPEC), binding, GEMSPEC)
7
7
 
8
8
  def perform t
@@ -19,7 +19,11 @@ Dir["tasks/**/*.rake"].each do |t|
19
19
  end
20
20
 
21
21
  # groups
22
- task :default => %i[compile native gem]
22
+ if ENV['CI']
23
+ task :default => %i[compile spec]
24
+ else
25
+ task :default => %i[compile native gem]
26
+ end
23
27
  task :typical => %i[compile spec]
24
28
  task :full => %i[clean typical gem install]
25
29
 
data/WINDOWS.md CHANGED
@@ -18,7 +18,7 @@ Windows users can install Syndi easily by downloading and installing from RubyGe
18
18
  $ gem install Syndi [--pre]
19
19
 
20
20
  On Windows, this will install the native Windows distribution, which includes the
21
- _libsyndi_ library cross-compiled with [Minimalist GNU for Windows](http://www.mingw.org/),
21
+ _csyndi_ library cross-compiled with [Minimalist GNU for Windows](http://www.mingw.org/),
22
22
  commonly called MinGW.
23
23
 
24
24
  This assumes that you have installed Ruby compiled with MinGW; this is the case
@@ -35,7 +35,7 @@ a sufficiently sane build environment for this on Windows. We haven't tested
35
35
  it since we cross-compile on UNIX systems when packaging gems.
36
36
 
37
37
  You must then force RubyGems to download the distribution without binaries, so
38
- that _libsyndi_ will be compiled:
38
+ that _csyndi_ will be compiled:
39
39
 
40
40
  $ gem install Syndi [--pre] --platform=ruby --development
41
41
 
data/bin/syndi CHANGED
@@ -49,7 +49,7 @@ opts = Slop.parse(:banner => "Usage: #$PROGRAM_NAME [options]") do
49
49
  Syndi #{Syndi::FULLVERSION}
50
50
  [os: #{::RbConfig::CONFIG['host_os']}] [rb: #{::RbConfig::CONFIG['ruby_version']}] [arch: #{::RbConfig::CONFIG['arch']}]
51
51
 
52
- http://syndiproj.org
52
+ http://syndibot.com
53
53
  EOV
54
54
  exit 0
55
55
  end
data/bin/syndi-conf CHANGED
@@ -23,7 +23,7 @@ opts = Slop.parse(:banner => "Usage: #$0 [options/command]") do
23
23
  puts <<-EOV
24
24
  Syndi Configure v#{Syndi::Configure::VERSION}
25
25
 
26
- http://syndiproj.org
26
+ http://syndibot.com
27
27
  EOV
28
28
  exit 0
29
29
  end
data/ext/csyndi/libauto.c CHANGED
@@ -23,7 +23,7 @@ void initialize_exceptions()
23
23
  }
24
24
 
25
25
  /* initialize Syndi module */
26
- void Init_libsyndi()
26
+ void Init_csyndi()
27
27
  {
28
28
  mSyndi = rb_define_module("Syndi");
29
29
  /* initialize exceptions */
data/ext/csyndi/logger.c CHANGED
@@ -133,15 +133,16 @@ VALUE logger_fatal(VALUE self, VALUE message)
133
133
  * @param [Boolean] backtrace Whether to output a backtrace.
134
134
  * @return [nil]
135
135
  */
136
- VALUE logger_error(int argc, VALUE argv, VALUE self)
136
+ VALUE logger_error(int argc, VALUE *argv, VALUE self)
137
137
  {
138
138
  VALUE message;
139
139
  VALUE backtrace;
140
140
  VALUE bt_bool;
141
+ char *msg;
141
142
 
142
143
  rb_scan_args(argc, argv, "11", &message, &bt_bool);
143
144
 
144
- char *msg = RSTRING_PTR(message);
145
+ msg = RSTRING_PTR(message);
145
146
  log_out2file("ERROR", msg);
146
147
  log_out2scrn(TYPE_ERROR, msg, 0);
147
148
 
@@ -14,8 +14,8 @@
14
14
  /* variable for the Syndi module */
15
15
  extern VALUE mSyndi;
16
16
 
17
- /* Init_libsyndi prototype */
18
- void Init_libsyndi();
17
+ /* Init_csyndi prototype */
18
+ void Init_csyndi();
19
19
 
20
20
  /* Syndi's exceptions */
21
21
  extern VALUE eLogError;
@@ -31,7 +31,7 @@ extern VALUE ePluginError;
31
31
  #endif
32
32
 
33
33
  /* fetch the Syndi directory */
34
- #define SYNDI_DIR RSTRING_PTR(rb_funcall(mSyndi, SYM(app_dir), 0))
34
+ #define SYNDI_DIR RSTRING_PTR(rb_funcall(mSyndi, SYM(dir), 0))
35
35
 
36
36
  #endif
37
37
 
@@ -36,8 +36,7 @@ void init_syndi_logger();
36
36
  VALUE logger_init(VALUE self);
37
37
 
38
38
  VALUE logger_fatal(VALUE self, VALUE message);
39
- VALUE logger_error(VALUE self, VALUE message);
40
- VALUE logger_error_bt(VALUE self, VALUE message, VALUE backtrace);
39
+ VALUE logger_error(int argc, VALUE *argv, VALUE message);
41
40
  VALUE logger_verbose(VALUE self, VALUE message, VALUE level);
42
41
  VALUE logger_warning(VALUE self, VALUE message);
43
42
  VALUE logger_info(VALUE self, VALUE message);
data/include/syndi.h CHANGED
@@ -11,8 +11,8 @@
11
11
  #include <stdio.h>
12
12
  #include "ruby.h"
13
13
 
14
- /* include libsyndi headers */
15
- #include "syndi/libsyndi.h"
14
+ /* include csyndi headers */
15
+ #include "syndi/csyndi.h"
16
16
  #include "syndi/logger.h"
17
17
  #include "syndi/events.h"
18
18
  #include "syndi/integer.h"
data/lib/csyndi.so ADDED
Binary file
data/lib/syndi/bot.rb CHANGED
@@ -1,11 +1,7 @@
1
1
  # Copyright (c) 2013, Autumn Perrault, et al. All rights reserved.
2
2
  # This free software is distributed under the FreeBSD license (see LICENSE).
3
3
 
4
- syndiload :Redis, 'redis'
5
- syndiload :FileKV, 'filekv'
6
-
7
- require 'syndi/config'
8
- require 'syndi/api'
4
+ require 'redis'
9
5
 
10
6
  # Namespace: Syndi
11
7
  module Syndi
data/lib/syndi/config.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'psych'
5
5
  require 'syndi/verbosity'
6
- require 'libsyndi'
6
+ require 'csyndi'
7
7
 
8
8
  # Namespace: Syndi
9
9
  module Syndi
data/lib/syndi/events.rb CHANGED
@@ -50,11 +50,7 @@ module Syndi
50
50
  if @events[event]
51
51
 
52
52
  # collect the listeners with respect to priority
53
- one = @events.collect { |hook| (hook.priority == 1 ? hook : nil) }.compact
54
- two = @events.collect { |hook| (hook.priority == 2 ? hook : nil) }.compact
55
- three = @events.collect { |hook| (hook.priority == 3 ? hook : nil) }.compact
56
- four = @events.collect { |hook| (hook.priority == 4 ? hook : nil) }.compact
57
- five = @events.collect { |hook| (hook.priority == 5 ? hook : nil) }.compact
53
+ one, two, three, four, five = gather @events[event]
58
54
 
59
55
  Syndi.log.verbose "event *#{event}* is being broadcasted on #{self}", VNOISY
60
56
 
@@ -64,11 +60,11 @@ module Syndi
64
60
  # cease if status ever becomes false/nil
65
61
  status = true
66
62
 
67
- one.each { |code| status = code.call parameters if status }
68
- two.each { |code| status = code.call parameters if status }
69
- three.each { |code| status = code.call parameters if status }
70
- four.each { |code| status = code.call parameters if status }
71
- five.each { |code| status = code.call parameters if status }
63
+ one.each { |code| status = code.call *parameters if status }
64
+ two.each { |code| status = code.call *parameters if status }
65
+ three.each { |code| status = code.call *parameters if status }
66
+ four.each { |code| status = code.call *parameters if status }
67
+ five.each { |code| status = code.call *parameters if status }
72
68
  rescue => e
73
69
  # catch thread errors
74
70
  Syndi.log.error "A listener to a broadcast of #{event} on #{self} caused an exception to rise (#{e})", true
@@ -83,10 +79,24 @@ module Syndi
83
79
  end
84
80
  alias_method :to_s, :inspect
85
81
 
82
+ private
83
+
84
+ # Gather hooks.
85
+ def gather list
86
+ [list.collect { |hook| (hook.priority == 1 ? hook : nil) }.compact,
87
+ list.collect { |hook| (hook.priority == 2 ? hook : nil) }.compact,
88
+ list.collect { |hook| (hook.priority == 3 ? hook : nil) }.compact,
89
+ list.collect { |hook| (hook.priority == 4 ? hook : nil) }.compact,
90
+ list.collect { |hook| (hook.priority == 5 ? hook : nil) }.compact]
91
+ end
92
+
93
+ public
94
+
86
95
  # A class which represents a listener.
87
96
  class Listener
88
97
  attr_reader :event, :priority, :code
89
98
 
99
+ # Spawn a new listener object.
90
100
  def initialize sys, event, priority, prc
91
101
  @sys = sys
92
102
  @event = event
@@ -96,12 +106,18 @@ module Syndi
96
106
  Syndi.log.verbose "new listener spawned and attached to #{event}: #{self}", VNOISY
97
107
  end
98
108
 
109
+ # Terminate this object.
99
110
  def deaf
100
111
  @sys.events[event].delete self
101
112
  end
102
113
 
114
+ # Execute this listener.
115
+ def call *args
116
+ @code.call *args
117
+ end
118
+
103
119
  def inspect
104
- "<#Syndi::Events::Listener: sys=#@sys event=#@event priority=#@priority proc={#@code}>"
120
+ "<#Syndi::Events::Listener: sys=#@sys event=#@event priority=#@priority>"
105
121
  end
106
122
  alias_method :to_s, :inspect
107
123
 
@@ -3,12 +3,8 @@
3
3
 
4
4
  require 'syndi/irc/protocol/numerics'
5
5
 
6
- # namespace Syndi
7
6
  module Syndi
8
-
9
- # namespace IRC
10
7
  module IRC
11
- syndiload :SASL, 'syndi/irc/sasl/mech'
12
8
 
13
9
  # A class for parsing of data per the specifications of the IRC protocol,
14
10
  # v3.1.
@@ -123,6 +119,7 @@ module Syndi
123
119
  end
124
120
 
125
121
  if $m.conf['irc'][irc.s]['SASL'] and list.include? 'sasl'
122
+ require 'syndi/irc/sasl/mech'
126
123
  req.push 'sasl'
127
124
  end
128
125
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'base64'
5
5
  require 'openssl'
6
- require 'libsyndi'
6
+ require 'csyndi'
7
7
  require 'syndi/irc/sasl/diffie_hellman'
8
8
 
9
9
  module Syndi
@@ -1,15 +1,7 @@
1
1
  # Copyright (c) 2013, Autumn Perrault, et al. All rights reserved.
2
2
  # This free software is distributed under the FreeBSD license (see LICENSE).
3
3
 
4
- module Syndi
5
- module IRC
6
- module SASL
7
- module Mech
8
- syndiload :DHBlowfish, 'syndi/irc/sasl/mech/dh_blowfish'
9
- syndiload :Plain, 'syndi/irc/sasl/mech/plain'
10
- end
11
- end
12
- end
13
- end
4
+ require 'syndi/irc/sasl/mech/dh_blowfish'
5
+ require 'syndi/irc/sasl/mech/plain'
14
6
 
15
7
  # vim: set ts=4 sts=2 sw=2 et:
data/lib/syndi/version.rb CHANGED
@@ -6,7 +6,7 @@ module Syndi
6
6
  # Standard version string.
7
7
  #
8
8
  # We use semantic versioning: +MAJOR.MINOR.PATCH.PRE.PRENUM+
9
- VERSION = '0.1.0'.freeze
9
+ VERSION = '0.1.1'.freeze
10
10
 
11
11
  # Standard version plus the codename (assigned to each minor release).
12
12
  #
data/lib/syndi.rb CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'syndi/rubyext/string'
5
5
  require 'syndi/version'
6
+ require 'fileutils'
6
7
 
7
8
  module Syndi
8
9
  extend self
@@ -62,6 +63,13 @@ module Syndi
62
63
  @app_dir ||= File.join ENV['HOME'], '.syndi'
63
64
  end
64
65
 
66
+ # Set the application data directory.
67
+ def dir= directory
68
+ FileUtils.mkdir_p directory unless Dir.exists? directory
69
+ Dir.chdir directory
70
+ @app_dir = directory
71
+ end
72
+
65
73
  # Initiate Syndi with command-line +options+.
66
74
  #
67
75
  # @param [Slop] options The command-line options.
@@ -123,7 +131,7 @@ else
123
131
  require 'colored'
124
132
  end
125
133
 
126
- require 'libsyndi'
134
+ require 'csyndi'
127
135
  %w[events actress config bot].each { |lib| require "syndi/#{lib}" }
128
136
 
129
137
  # vim: set ts=4 sts=2 sw=2 et:
data/spec/helper.rb CHANGED
@@ -9,24 +9,29 @@ require 'rspec/expectations'
9
9
  require 'rspec/mocks'
10
10
  require 'fileutils'
11
11
  require 'stringio'
12
+ require 'tmpdir'
12
13
 
13
14
  require 'syndi'
14
15
 
15
- $temp_dir = Dir.mktmpdir 'syndi-rspec'
16
- Syndi.app_dir = $temp_dir
17
- $VERBOSITY = Float::INFINITY
16
+ $temp_dir = Dir.mktmpdir
17
+ Syndi.dir = $temp_dir
18
+ $VERBOSITY = -1
18
19
 
19
20
  module Helper
20
21
 
21
22
  end
22
23
 
23
24
  RSpec.configure do |conf|
24
- conf.syntax = :expect
25
25
  conf.include Helper
26
26
 
27
27
  conf.after(:all) do
28
+ Dir.chdir __dir__
28
29
  FileUtils.remove_entry $temp_dir
29
30
  end
31
+
32
+ conf.expect_with :rspec do |c|
33
+ c.syntax = :expect
34
+ end
30
35
  end
31
36
 
32
37
  # vim: set ts=4 sts=2 sw=2 et:
@@ -13,28 +13,74 @@ describe Syndi::Events do
13
13
 
14
14
  it 'listens for an event' do
15
15
  @events.on(:moo) do |magic|
16
- magic = true
16
+ magic.write 'OK'
17
17
  end
18
18
 
19
- rawr = false
19
+ rawr = StringIO.new
20
20
  @events.emit :moo, rawr
21
+ sleep 0.1
21
22
 
22
- expect { rawr }.to be_true
23
+ rawr.seek 0
24
+ expect(rawr.string).to eq 'OK'
23
25
  end
24
26
 
25
27
  it 'returns a listener' do
26
- expect do
27
- @events.on(:cows) { nil }
28
- end.to be_an_instance_of Syndi::Events::Listener
28
+ hook = @events.on(:cows) { nil }
29
+ expect(hook).to be_an_instance_of Syndi::Events::Listener
30
+ end
31
+
32
+ context 'when given a priority outside 1..5' do
33
+ it 'raises an ArgumentError' do
34
+ expect { @events.on(:meowbar, 6) { nil } }.to raise_error ArgumentError
35
+ end
36
+ end
37
+
38
+ end
39
+
40
+ describe '#emit' do
41
+
42
+ it 'broadcasts an event' do
43
+ @events.on(:fairy) do |cat, meow|
44
+ cat.write meow
45
+ end
46
+
47
+ cat = StringIO.new
48
+ @events.emit :fairy, cat, 'meow'
49
+ sleep 0.1
50
+
51
+ expect(cat.string).to eq 'meow'
52
+ end
53
+
54
+ it 'respects priority' do
55
+ @order = ''
56
+ @events.on(:a, 1) { |order| order << 'A' }
57
+ @events.on(:a, 3) { |order| order << 'B' }
58
+ @events.on(:a, 5) { |order| order << 'C' }
59
+
60
+ @events.emit :a, @order
61
+ sleep 0.1
62
+
63
+ expect(@order).to eq 'ABC'
29
64
  end
30
65
 
31
66
  end
32
67
 
33
- describe '#emit'
68
+ describe Syndi::Events::Listener do
34
69
 
35
- describe Syndi::Events::Listener
70
+ describe '#deaf' do
36
71
 
37
- describe '#deaf'
72
+ it 'terminates a listener' do
73
+ @ok = true
74
+ hook = @events.on(:beep) { @ok = false }
75
+ hook.deaf
76
+
77
+ @events.emit :beep
78
+ sleep 0.1
79
+
80
+ expect(@ok).to be_true
81
+ end
82
+
83
+ end
38
84
 
39
85
  end
40
86
 
data/tasks/compile.rake CHANGED
@@ -4,7 +4,7 @@
4
4
  require 'rake/extensiontask'
5
5
 
6
6
  desc 'Compile the native extension.'
7
- Rake::ExtensionTask.new 'libsyndi', $gemspec do |ext|
7
+ Rake::ExtensionTask.new 'csyndi', $gemspec do |ext|
8
8
  ext.cross_compile = true
9
9
 
10
10
  ext.cross_compiling do |spec|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syndi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Autumn Perrault
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -150,17 +150,13 @@ extra_rdoc_files: []
150
150
  files:
151
151
  - bin/syndi-conf
152
152
  - bin/syndi
153
+ - lib/csyndi.so
153
154
  - lib/syndi/dsl/irc.rb
154
155
  - lib/syndi/dsl/base.rb
155
- - lib/syndi/configure.rb
156
156
  - lib/syndi/verbosity.rb
157
157
  - lib/syndi/api.rb
158
158
  - lib/syndi/rubyext/string.rb
159
159
  - lib/syndi/irc.rb
160
- - lib/syndi/configure/generator.rb
161
- - lib/syndi/configure/cli.rb
162
- - lib/syndi/api/plugin.rb
163
- - lib/syndi/api/events.rb
164
160
  - lib/syndi/api/object.rb
165
161
  - lib/syndi/config.rb
166
162
  - lib/syndi/version.rb
@@ -208,7 +204,6 @@ files:
208
204
  - README.md
209
205
  - LICENSE
210
206
  - WINDOWS.md
211
- - INSTALL.md
212
207
  - CHANGELOG.md
213
208
  - Gemfile
214
209
  - Rakefile
data/INSTALL.md DELETED
@@ -1,86 +0,0 @@
1
- *This is a copy of https://github.com/Syndi/Syndi/wiki/Install-Guide as it appeared Jan 13 2013 4:16 UTC.*
2
-
3
- Thank you for choosing **Syndi 4** to serve your needs! Please foremost read the [licensing terms](/Syndi/Syndi/wiki/License), as *by proceeding you confirm your agreement to them*.
4
-
5
- Before installing, you must decide on how you would like to install Syndi. There is a relatively easy way, and a somewhat more advanced way.
6
-
7
- For most users, the relatively easy way is advisable, and that is the **gem method**.
8
-
9
- Users who have some reason for doing so and are more advanced can install Syndi from source. See further below for that.
10
-
11
- ---
12
-
13
- # Gem
14
-
15
- You must have [Ruby 1.9.2 or later](http://www.ruby-lang.org).
16
-
17
- ## Installation
18
-
19
- There is a complete list of releases and links therefor on the [official releases page](http://syndi.syndiproj.org/releases.html).
20
-
21
- We recommend merely installing the latest (pre-)release from [RubyGems](https://rubygems.org/gems/Syndi):
22
-
23
- $ gem install Syndi --pre
24
-
25
- If you downloaded the source, either from Git or in an archive, do this in the main directory to compile a gem:
26
-
27
- $ gem build Syndi.gemspec
28
- $ gem install Syndi-*.gem
29
-
30
- Depending on which database management system you wish to use, you must separately download the respective gem whether you use the distributed **Syndi** or your own build:
31
-
32
- **SQLite**: `$ gem install sqlite3`
33
- **MySQL**: `$ gem install mysqlplus`
34
- **PostgreSQL**: `$ gem install pg`
35
-
36
- ## Configuration
37
-
38
- The indispensable [Syndi Configure](/Syndi/Syndi/wiki/Syndi-Configure) utility will help you configure Syndi, and this is the suggested method as it is the easiest.
39
-
40
- $ syndi-conf
41
-
42
- Otherwise you must navigate to the path to which **syndibot** was installed (typically somewhere in `~/.gem/`) and find the `conf/` directory; that is unless you cloned from Git, in which case you'll find it in `Syndi/conf/`.
43
-
44
- The **Y**AML **A**in't **M**arkup **L**anguage configuration, which is suggested, is `example.yml`. Open it with your favorite editor and save it as `~/.config/syndibot/syndi.yml`. You can also save it to a path of your choosing, but remember to invoke Syndi with `--config=path/to/config.yml`:
45
-
46
- $ syndi --config=/somewhere/where/cows/speak/syndi.yml
47
-
48
- If you prefer, the **J**ava **S**cript **O**bject **N**otation configuration is `example.json`. Modify it as above (except use a `.json` extension). Invoke Syndi with the `-j` flag (unless you specify `--config`, in which case the `--j` is superfluous).
49
-
50
- $ syndi -j
51
-
52
- ## Start
53
-
54
- $ syndi
55
-
56
- Consult with the [Syndi Handbook](/Syndi/Syndi/wiki/Syndi-Handbook) for information on using Syndi.
57
-
58
- # Source
59
-
60
- You need at least [Ruby 1.9.2](http://www.ruby-lang.org)!
61
-
62
- The easiest way to install Syndi's gem prerequisites is to use [**GemBundler**](https://rubygems.org/gems/bundler). Install it:
63
-
64
- $ gem install bundler
65
-
66
- After downloading the source code and entering the main directory, invoke bundler:
67
-
68
- $ bundle install --without dev
69
-
70
- If testing and/or development are among your intentions, exclude the `--without dev` to install testing/development dependencies.
71
-
72
- Depending on which database management system you wish to use, you must separately download the respective gem:
73
-
74
- **SQLite**: `$ gem install sqlite3`
75
- **MySQL**: `$ gem install mysqlplus`
76
- **PostgreSQL**: `$ gem install pg`
77
-
78
- All releases can be obtained in either Git, Tar/GZ, or Zip format from the [official releases page](http://syndi.syndiproj.org/releases.html).
79
-
80
- Compile the source code:
81
-
82
- $ rake compile
83
-
84
- To test Syndi (and you must have installed the testing dependencies), invoke:
85
-
86
- $ rake test