Skip to content
Commits on Apr 27, 2011
  1. @theory

    s{pgz}{zip}g

    theory committed
Commits on Apr 21, 2011
  1. @theory

    Add missing config line.

    theory committed
Commits on Apr 12, 2011
  1. @theory
Commits on Apr 11, 2011
  1. @theory

    Add spec to the mirror root.

    theory committed
Commits on Apr 8, 2011
  1. @theory

    Add URL to tweet.

    theory committed
Commits on Apr 7, 2011
  1. @theory
Commits on Mar 27, 2011
  1. @theory

    Eliminate /by.

    theory committed
    The links are now just `/dist`, `/tag`, etc. The data returned by the database
    also no longer uses the "by-" prefix.
    
    Since it would otherwise cause duplication of template name, the old "dist"
    template has been renamed "download".
Commits on Mar 16, 2011
  1. @theory

    Switch to saner default URI templates.

    theory committed
    Use `{dist}/{version}` instead of `{dist}-{version}`. This allows versions to
    be more easily distinguished from extension names in URIs. The three changed
    templates are now:
    
                "dist":    "/dist/{dist}/{version}/{dist}-{version}.pgz",
                "readme":  "/dist/{dist}/{version}/README.txt",
                "meta":    "/dist/{dist}/{version}/META.json",
Commits on Mar 10, 2011
  1. @theory

    Resolve contradicting meanings of "owner".

    theory committed
    The term "owner" is now used only in the context of permissions: who owns or
    co-owns.a particular extension. The user who uploads a distribution is now
    recorded as the "creator" of that extension, and listed in the JSON metadata
    simply as the "user". The term "creator" is not used here because the user who
    created the distribution (that is, uploaded it) should not be confused the the
    person who created the code in the distribution.
    
    To enact this change in terminology, this commit makes these changes to the
    code and its outputs:
    
    * Rename the `distributions.owner` column to `distributions.creator`.
    * Rename the "owner" key in the distribution metadata file to "user".
    * Rename the "owner" attribute in PGXN::Manager::Distribution to "creator".
    * Move the `/by/owner/` metadata files to `/by/user/`.
    * Rename the `by_owner_json()` SQL function to `by_user_json()`.
    * Change the name of the URI template for the user JSON output by
      `add_distribution()` to `by-user`.
Commits on Mar 8, 2011
  1. @theory

    Add `mirrors` URI template.

    theory committed
Commits on Jan 5, 2011
  1. @theory

    Tweet new uploads.

    theory committed
    Add code to send a tweet on a successful upload.
    
    * Twitter OAuth configuration is now in the configuration file.
    * New utility, `bin/get_twitter_token`, makes Twitter OAuth configuration
      easier.
    * The new method `send_tweet` in PGXN::Manager handles the tweeting. No tweet
      is sent if the OAuth configuration is missing or incomplete. Sends an email
      to the admin on tweet failure.
    * New method `send_email` in PGXN::Manager is responsible for sending
      email. Abstracted from multiple instances in PGXN::Manager::Controller.
    
    In passing, add the exception error message to the stack trace in our stack
    trace "class" in PGXN::Manager::Router. It's a hack, but it works.
Commits on Oct 24, 2010
  1. @theory

    Fix alert email for dev build.

    theory committed
    Only to me for now.
Commits on Oct 22, 2010
  1. @theory

    Improve error handling.

    theory committed
    Users must configure these middleware:
    
            ["ErrorDocument", 500, "/error", "subrequest", 1],
            ["HTTPExceptions"],
            ["StackTrace", "no_print_errors", 1]
    
    StackTrace generates the stacktrace. Hopefully my [pull
    request](http://github.com/miyagawa/Plack/pull/144) will be accepted so that
    the other middleware can easily access it.
    
    HTTPExceptions catches the exception and turns it into a 500 response.
    
    ErrorDocument then sends a subrequest to /error. The controller for this URI
    sends an email with information about the failed request, including a copy of
    the environment and the stack trace (depending on that pull request, of
    course). Then it sends a friendly 500 error page to the user.
Commits on Oct 20, 2010
  1. @theory

    Add `auth_uri_for()`.

    theory committed
    Should only be called from the public site, and all URIs are treated as
    relative to `auth_uri`. Required some reworking of `auth_uri` when not from
    the config file. Seems good now. Will apply it in some more places tomorrow,
    and move the password reset stuff to the auth URI, too.
  2. @theory

    Rename `login_uri` to `auth_uri`.

    theory committed
    More soon.
  3. @theory
Commits on Oct 18, 2010
  1. @theory

    Send email to admins on user registration.

    theory committed
    So that admins can quickly moderate. Requires a new configuration
    line, "alert_email," and email address to which alerts are sent.
Commits on Oct 16, 2010
  1. @theory

    Use some sample config files instead of `prod.json`.

    theory committed
    Record in the `README` how to copy it and edit it. Will help prevent
    conflicts for `git pull`, too.
    
    Will add notes on running a proxy server once I'm successfully doing so
    myself.
  2. @theory

    Add "login_uri" config key.

    theory committed
    Used by the new `Request->login_uri` method. Returns a relative URI for
    `/auth/` by default, but users can override it in the configuration file,
    which is useful if a proxy server is proxying / to /auth/. Which I'm going to
    do for manager.pgxn.org, of course.
Commits on Oct 15, 2010
  1. @theory

    Add `uri_script_name_key` configuration directive.

    theory committed
    This is used by `Request->uri_for()` to determine the script name. The reason
    for this is so that a proxy server can set a header for a different script
    name that represents the proxy's root, rather than the app's root. It has to
    be enabled by someone who is setting the header on the server, of course.
Commits on Oct 12, 2010
  1. @theory
Commits on Oct 8, 2010
  1. @theory

    Document installation and configuration in `README.md`.

    theory committed
    There will be a lot more coming as things get going, I expect, but this should
    do as a start to get it off the ground -- or to be able to hack on
    PGXN::Manager.
    
    Some tweaks added as I did my first install and discovered issues:
    
    * Add missing dependency on Plack::Middleware::Session to `Build.PL`.
    * Add `prod.json`. I think it will be pretty standardish, and is easier
      for folks to edit than to create something from scratch.
Commits on Oct 5, 2010
  1. @theory

    Add password reset submit form.

    theory committed
    Sends an email with a reset token URL. Redirects to the home page with a "success"
    message -- even if it fails.
    
    While at it, also changed some URLs:
    
    * /register is now /account/register
    * /reset    is now /account/forgotten
    * /thanks   is now /account/thanks
    
    The reset link URL is /account/reset/$token.
    
    Tests forthcoming.
  2. @theory

    Send email on moderation.

    theory committed
    Using Email::MIME and Email::Sender on RBJS's recommendation. Configuration is
    in the config file, so an appropriate transport can be selected (or none, thus
    the default).
Commits on Oct 1, 2010
  1. @theory

    Add distribution view.

    theory committed
    Redirect to it on successful upload.
    
    Need to add tests next.
Commits on Sep 29, 2010
  1. @theory

    Change moderation buttons to POST forms.

    theory committed
    This is to avoid GET as an injection vector. It's also more RESTful. Thanks
    to Aristotle for the pointers.
  2. @theory

    Remove stage and prod configs.

    theory committed
    Should be created when deployed.
Commits on Sep 9, 2010
  1. @theory
Commits on Sep 8, 2010
  1. @theory

    Add middleware options and proper db username to config.

    theory committed
    This is in the JSON configuration files. All of them should connect with the
    "pgxn" user. To build the database, we use the `--db_super_user` option to
    `Build.PL` or `./Build db`.
    
    The configurable middleware is also in these files. Test loads `StackTrace`,
    staging and prod load `ErrorDocument`, and dev loads `StackTrace`, `Debug`,
    and `Lint`.
Commits on Aug 18, 2010
  1. @theory

    Start the database and tests.

    theory committed
Something went wrong with that request. Please try again.