Group
Extension

Matches 9

Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/Bundle.pm ( view source; MetaCPAN )
ME

Hubot::Scripts::Bundle - optional scripts for hubot

=head1 SYNOPSIS

example F<hubot-scripts.json>

    [
        "redisBrain",
        "help",
        "ping",
        "uptime",
        "whisper"
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/bugzilla.pm ( view source; MetaCPAN )
illa;
{
  $Hubot::Scripts::bugzilla::VERSION = '0.1.0';
}
use utf8;
use strict;
use warnings;
use JSON::XS;

my %PRIORITY_MAP = (
    '---'   => '☆☆☆☆☆',
    Lowest  => '★☆☆☆☆',
  
★★☆',
    Highest => '★★★★★',
);

sub load {
    my $client = JSONRPC->new( { url => $ENV{HUBOT_BZ_JSONPRC_URL} } );

    my ( $class, $robot ) = @_;
    $robot->hear(
        qr/b(?:u
  );
        }
    );
}

sub speak_bug {
    my ( $msg, $body, $hdr ) = @_;
    my $data = decode_json($body);
    my $bug = @{ $data->{result}{bugs} ||= [] }[0];
    $msg->send(
        sprintf "#%s 
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/githubIssue.pm ( view source; MetaCPAN )
pts::githubIssue;
$Hubot::Scripts::githubIssue::VERSION = '0.1.10';
use strict;
use warnings;
use JSON;

sub load {
    my $github = githubot->new;
    my ( $class, $robot ) = @_;
    $robot->hear(
  
            return if ( !$body || $hdr->{Status} !~ /^2/ );
                    my $data = decode_json($body);
                    $issue_title = $data->{title};
                    my $base_url = $EN
      {
            Accept => 'application/vnd.github.'
                . $self->{apiVersion} . '+json',
            'User-Agent' => "p5-GitHubot"
        }
    );
    my $oauth_token = $self->{token}
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/jira.pm ( view source; MetaCPAN )
ecode_utf8/;
use JSON;

sub load {
    my ( $class, $robot ) = @_;
    $robot->httpd->reg_cb(
        '/hubot/jira' => sub {
            my ( $httpd, $req ) = @_;
            my $json = undef;

      
uery_param("room");
              $req_room=~s/^%23/#/;
            }

            eval { $json = decode_json( $req->{content} ); };
            if ($@) {
                $req->respond(
              
'Bad Request',
                        { content => 'text/json' },
                        "{ 'status': 'error', 'error': 'could not parse json' }"
                    ]
                );
           
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/redisBrain.pm ( view source; MetaCPAN )
}
use strict;
use warnings;
use Redis;
use JSON::XS;
use Encode qw/encode_utf8 decode_utf8/;

sub load {
    my ( $class, $robot ) = @_;
    my $coder = JSON::XS->new->convert_blessed;
    my $redis =
cted to redis-server\n" if $ENV{DEBUG};
    my $json = $redis->get('hubot:storage') || '{}';
    $robot->brain->mergeData( decode_json( decode_utf8($json) ) );
    $robot->brain->on(
        'save',
 
ub {
            my ( $e, $data ) = @_;
            my $json = $coder->encode($data);
            $redis->set( 'hubot:storage', encode_utf8($json) );
        }
    );
    $robot->brain->on( 'close', s
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/eval.pm ( view source; MetaCPAN )
bot::Scripts::eval;
{
  $Hubot::Scripts::eval::VERSION = '0.1.0';
}
use strict;
use warnings;
use JSON::XS;

sub load {
    my ( $class, $robot ) = @_;
    $robot->hear(
        qr/^eval:? on *$/i,
  
           return if ( !$body || $hdr->{Status} !~ m/^2/ );
                    my $data = decode_json($body);
                    $msg->send( split /\n/,
                        $data->{stdout} || $d
       return if ( !$body || $hdr->{Status} !~ m/^2/ );
                        my $data = decode_json($body);
                        $msg->send( split /\n/,
                            $data->{stdou
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/print.pm ( view source; MetaCPAN )
 Hubot::Scripts::print;
$Hubot::Scripts::print::VERSION = '0.1.10';
use strict;
use warnings;
use JSON::XS;

sub load {
    my ( $class, $robot ) = @_;
    $robot->hear(
        qr/^(?:print|say):? (.
           return if ( !$body || $hdr->{Status} !~ m/^2/ );
                    my $data = decode_json($body);
                    $msg->send( split /\n/,
                        $data->{stdout} || $d
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/sayhttpd.pm ( view source; MetaCPAN )
JSON;

sub load {
    my ( $class, $robot ) = @_;
    $robot->httpd->reg_cb(
        '/hubot/say' => sub {
            my ( $httpd, $req ) = @_;
            my $json = undef;

            eval { $json
 = decode_json( $req->{content} ); };
            if ($@) {
                $req->respond(
                    [
                        400,
                        'Bad Request',
                   
     { content => 'text/json' },
                        "{ 'status': 'error', 'error': 'could not parse json' }"
                    ]
                );
                return;
            }
       
Hubot-Scripts-Bundle ( A/AA/AANOAA/Hubot-Scripts-Bundle-0.1.0.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot-Scripts-Bundle/lib/Hubot/Scripts/googleImage.pm ( view source; MetaCPAN )
googleImage;
{
  $Hubot::Scripts::googleImage::VERSION = '0.1.0';
}
use strict;
use warnings;
use JSON::XS;

sub load {
    my ( $class, $robot ) = @_;
    $robot->respond(
        qr/(image|img)( me)
uery($q)->get(
        sub {
            my ( $body, $hdr ) = @_;
            my $images = decode_json($body);
            $images = $images->{responseData}{results};
            if (@$images) {
     

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.