Code Monkey home page Code Monkey logo

metal.pl's Introduction

metal.pl's People

Contributors

n7st avatar

Watchers

 avatar  avatar  avatar

metal.pl's Issues

Modularise test schema

From t/30-schema/Channel.t:

my $module = 'Metal::Schema';

use_ok($module);

# TODO - for the next database test, move this to a module usable by other
# scripts
$module->connection('dbi:SQLite:dbname=:memory:', '', '') 
    || BAIL_OUT("Failed to create a test database schema in memory");
$module->load_namespaces();
$module->deploy();

This should be moved to a module so it can be included in other tests.

Travis build failure

Travis appears not to be able to find Dist::Zilla or cpanm.

travis_time:end:0b03ed94:start=1491841818680395789,finish=1491843242793399959,duration=1424113004170
�[0K
�[31;1mThe command "dzil listdeps   --author --missing | grep -vP '[^\w:]' | cpanm --verbose" failed and exited with 1 during .�[0m

Your build has been stopped.

"First time" set up - configuration wizard

  • Move from a YAML-based config file containing API keys etc to using a database table for everything except the database connection information.
  • Wizard to get "initial" config values such as nick, server, etc...
  • Config settable by users with available permission through IRC.

Twitter

Module for individual channels to follow tweets from specific accounts.

Database migrations

  • Implement DBIx::Class::Migration (tutorial)
  • Reconsider subclassing for modification dates and rows belonging to users (these columns are common to almost all tables)

Date maths on Stats prevents recreation of a removed stat

The included datetime parser appears not to take into account hours/minutes/seconds.

sub user_stat_today {
    my $self    = shift;
    my $handle  = shift;
    my $user_id = shift;

    my $dtf       = $self->result_source->schema->storage->datetime_parser;
    my $yesterday = DateTime->now->subtract(days => 1);
    my $stats     = $self->search_rs({ name => $handle })->first;

    return 0 unless $stats;

    my $for_user = $stats->user_stats;

    return $for_user->search_rs({
        user_id      => $user_id,
        date_created => { '>=' => $dtf->format_datetime($yesterday) }, 
    })->count();
}

Role: split user_or_arg into separate methods

This role would make more sense with separate methods for finding a user from the current user's hostmask and finding one from a provided name if given and falling through to the current user otherwise.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.