This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d8f6278
Showing
21 changed files
with
1,335 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
lib/**/*.rb | ||
bin/* | ||
- | ||
ChangeLog.md | ||
COPYING.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
doc | ||
pkg | ||
vendor/cache | ||
Gemfile.lock | ||
.bundle | ||
.DS_Store | ||
.yardoc | ||
*.db | ||
*.log | ||
*.swp | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--colour --format documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--markup markdown --title 'Ronin UI IRC Documentation' --protected |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### 0.1.0 / 2012-02-20 | ||
|
||
* Initial release: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
source 'https://rubygems.org' | ||
|
||
RONIN_URI = 'http://github.com/ronin-ruby' | ||
|
||
gemspec | ||
|
||
# gem 'ronin-support', '~> 0.4.0', :git => "#{RONIN_URI}/ronin-support.git" | ||
# gem 'ronin', '~> 1.4.0', :git => "#{RONIN_URI}/ronin.git" | ||
|
||
group :development do | ||
gem 'rake', '~> 0.8' | ||
gem 'kramdown', '~> 0.12' | ||
|
||
gem 'ore-tasks', '~> 0.4' | ||
gem 'rspec', '~> 2.4' | ||
end | ||
|
||
# | ||
# To enable additional DataMapper adapters for development work or for | ||
# testing purposes, simple set the ADAPTER or ADAPTERS environment | ||
# variable: | ||
# | ||
# export ADAPTER="postgres" | ||
# bundle install | ||
# | ||
# ./bin/ronin --database postgres://ronin@localhost/ronin | ||
# | ||
require 'set' | ||
|
||
DM_ADAPTERS = Set['postgres', 'mysql', 'oracle', 'sqlserver'] | ||
|
||
adapters = (ENV['ADAPTER'] || ENV['ADAPTERS']).to_s | ||
adapters = Set.new(adapters.to_s.tr(',',' ').split) | ||
|
||
(DM_ADAPTERS & adapters).each do |adapter| | ||
gem "dm-#{adapter}-adapter", DM_VERSION #, :git => "#{DM_URI}/dm-#{adapter}-adapter.git" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Ronin UI IRC | ||
|
||
* [Source](http://github.com/ronin-ruby/ronin-ui-irc) | ||
* [Issues](http://github.com/ronin-ruby/ronin-ui-irc/issues) | ||
* [Documentation](http://rubydoc.info/gems/ronin-ui-irc/frames) | ||
* [Mailing List](http://groups.google.com/group/ronin-ruby) | ||
* [irc.freenode.net #ronin](http://webchat.freenode.net/?channels=ronin&uio=Mj10cnVldd) | ||
|
||
## Description | ||
|
||
Ronin UI IRC is an IRC bot for Ronin. | ||
|
||
## Features | ||
|
||
## Synopsis | ||
|
||
$ ronin irc | ||
|
||
## Examples | ||
|
||
## Requirements | ||
|
||
* [cinch](http://github.com/cinchrb/cinch#readme) ~> 1.1 | ||
* [ronin](http://github.com/ronin-ruby/ronin#readme) ~> 1.4 | ||
|
||
## Install | ||
|
||
$ gem install ronin-ui-irc | ||
|
||
## License | ||
|
||
Copyright (c) 2012 Hal Brodigan (postmodern.mod3 at gmail.com) | ||
|
||
This file is part of Ronin UI IRC. | ||
|
||
Ronin Ui Irc is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
Ronin Ui Irc is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with Ronin Ui Irc. If not, see <http://www.gnu.org/licenses/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require 'rubygems' | ||
|
||
begin | ||
require 'bundler' | ||
rescue LoadError => e | ||
warn e.message | ||
warn "Run `gem install bundler` to install Bundler." | ||
exit e.status_code | ||
end | ||
|
||
begin | ||
Bundler.setup(:development) | ||
rescue Bundler::BundlerError => e | ||
warn e.message | ||
warn "Run `bundle install` to install missing gems" | ||
exit e.status_code | ||
end | ||
|
||
require 'rake' | ||
|
||
require 'ore/tasks' | ||
Ore::Tasks.new | ||
|
||
require 'rspec/core/rake_task' | ||
RSpec::Core::RakeTask.new | ||
task :default => :spec | ||
|
||
require 'yard' | ||
YARD::Rake::YardocTask.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'rubygems' | ||
|
||
root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..')) | ||
if File.directory?(File.join(root_dir,'.git')) | ||
Dir.chdir(root_dir) do |path| | ||
require 'bundler' | ||
|
||
begin | ||
Bundler.setup(:default) | ||
rescue Bundler::BundlerError => e | ||
warn e.message | ||
warn "Run `bundle install` to install missing gems" | ||
exit e.status_code | ||
end | ||
end | ||
end | ||
|
||
lib_dir = File.join(root_dir,'lib') | ||
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir) | ||
|
||
require 'ronin/ui/cli/commands/irc' | ||
|
||
Ronin::UI::CLI::Commands::Irc.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'rubygems' | ||
|
||
root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..')) | ||
if File.directory?(File.join(root_dir,'.git')) | ||
Dir.chdir(root_dir) do |path| | ||
require 'bundler' | ||
|
||
begin | ||
Bundler.setup(:default) | ||
rescue Bundler::BundlerError => e | ||
warn e.message | ||
warn "Run `bundle install` to install missing gems" | ||
exit e.status_code | ||
end | ||
end | ||
end | ||
|
||
lib_dir = File.join(root_dir,'lib') | ||
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir) | ||
|
||
require 'ronin/ui/console' | ||
require 'ronin/ui/cli/commands/console' | ||
|
||
Ronin::UI::Console.auto_load << 'ronin/ui-irc' | ||
Ronin::UI::CLI::Commands::Console.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: ronin-ui-irc | ||
summary: An IRC bot for Ronin. | ||
description: | ||
Ronin UI IRC is an IRC bot for Ronin. | ||
|
||
license: GPL-3 | ||
authors: Postmodern | ||
email: postmodern.mod3@gmail.com | ||
homepage: http://ronin-ruby.github.com/ | ||
has_yard: true | ||
|
||
required_ruby_version: ">= 1.9.2" | ||
|
||
dependencies: | ||
cinch: ~> 1.1 | ||
ronin: ~> 1.4 | ||
|
||
development_dependencies: | ||
bundler: ~> 1.0 | ||
yard: ~> 0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# | ||
# Copyright (c) 2012 Hal Brodigan (postmodern.mod3 at gmail.com) | ||
# | ||
# This file is part of Ronin UI IRC. | ||
# | ||
# Ronin Ui Irc is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Ronin Ui Irc is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Ronin Ui Irc. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
require 'ronin/ui/irc/bot' | ||
require 'ronin/ui/cli/command' | ||
|
||
module Ronin | ||
module UI | ||
module CLI | ||
module Commands | ||
# | ||
# Starts the Ronin IRC bot | ||
# | ||
# ## Usage | ||
# | ||
# ronin irc [options] | ||
# | ||
# ## Options | ||
# | ||
# -v, --[no-]verbose Enable verbose output. | ||
# -q, --[no-]quiet Disable verbose output. | ||
# --[no-]silent Silence all output. | ||
# --[no-]color Enables color output. | ||
# -H, --host [HOST] Host to connect to. | ||
# -p, --port [NUM] Port to connect to. | ||
# -P, --password [PASSWORD] Server password. | ||
# -S, --[no-]ssl Specifies whether to use SSL. | ||
# -u, --user [USER] Username to login with. | ||
# Default: "ronin" | ||
# -n, --nick [NICK] Nickname to login with. | ||
# Default: "ronin-bot" | ||
# -c, --channels [CHANNELS [...]] Channel(s) to join. | ||
# | ||
class Irc < Command | ||
|
||
summary 'Starts the Ronin IRC bot' | ||
|
||
option :host, :type => String, | ||
:flag => '-H', | ||
:description => 'Host to connect to' | ||
|
||
option :port, :type => Integer, | ||
:flag => '-p', | ||
:description => 'Port to connect to' | ||
|
||
option :password, :type => String, | ||
:flag => '-P', | ||
:description => 'Server password' | ||
|
||
option :ssl, :type => true, | ||
:flag => '-S', | ||
:description => 'Specifies whether to use SSL' | ||
|
||
option :user, :type => String, | ||
:flag => '-u', | ||
:default => UI::IRC::Bot::DEFAULT_USER, | ||
:description => 'Username to login with' | ||
|
||
option :nick, :type => String, | ||
:flag => '-n', | ||
:default => UI::IRC::Bot::DEFAULT_NICK, | ||
:description => 'Nickname to login with' | ||
|
||
option :channels, :type => Array[String], | ||
:flag => '-c', | ||
:description => 'Channel(s) to join' | ||
|
||
def execute | ||
bot = UI::IRC::Bot.new( | ||
:host => @host, | ||
:port => @port, | ||
:password => @password, | ||
:ssl => @ssl, | ||
:user => @user, | ||
:nick => @nick, | ||
:channels => @channels | ||
) | ||
|
||
bot.start | ||
end | ||
|
||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Copyright (c) 2012 Hal Brodigan (postmodern.mod3 at gmail.com) | ||
# | ||
# This file is part of Ronin UI IRC. | ||
# | ||
# Ronin Ui Irc is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Ronin Ui Irc is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Ronin Ui Irc. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
require 'ronin/ui/irc/version' |
Oops, something went wrong.