@nilslice nilslice released this Jan 15, 2018

Assets 2

Ponzu's ACME implementation to integrate with Let's Encrypt needed to be updated (based on the acme/autocert package) to meet the required "http-01" challenge. For more background, read: https://community.letsencrypt.org/t/2018-01-11-update-regarding-acme-tls-sni-and-shared-hosting-infrastructure/50188

Assets 2

woah

In celebration of the 3,000 stars (!) Ponzu has received to-date, we're releasing v0.9.3 ...we are far past due for a release. Lots has happened since releasing v0.9.2, including:

  1. @martint17r's fantastic refactoring of our CLI, now using the legendary cobra package by @spf13. This will make it much easier for others to contribute to the CLI, not to mention the organizational benefits it offers. Huge thank you to @martint17r for taking the lead on this.

  2. @torniker's fix for some really pesky bugs that would occur when using multiple selects or repeaters - this one saved me a huge headache on a real project, and I imagine tons of others. Additionally, @torniker fixed a number of bugs in the approve handlers when merging externally created content. Thank you @torniker for your work on these!

  3. @guycalledseven fixed the system and database initialization steps which had a conflict when Ponzu users implemented the search.Searchable interface on their content types and were using UI-enabled addons. This was really tricky and took a lot of work.. especially in undocumented territory - so thank you, @guycalledseven! More to come from us on the addon user and developer experience, so keep an eye out.

  4. @tom-f responded to my issue / feature request to add a crucial search index backup routine in the same vain as the system / analytics / uploads backups via HTTP. This included a nice abstraction of file system archival which is now available in the system/backup package. Big thank you to @tom-f for helping on this!

  5. A handy CSV export feature from the admin UI. Just implement the CSVFormattable interface and you get a nice export / download button for your admins to use. This is part of the new family of Format interfaces which can be extended to add various export formats.

There were many more contributions (listed below) made by community members and all of them are truly appreciated - thank you all!

This release includes contributions from: @torniker, @tom-f, @bradleyfalzon, @guycalledseven, @ivanov, @martint17r, @nilslice


Everything new in v0.9.3:

Breaking Changes:

type Pushable interface {
    // the values contained in []string fields returned by Push must be URL paths
    Push(http.ResponseWriter, *http.Request) ([]string, error)
}
type Omittable interface {
    Omit(http.ResponseWriter, *http.Request) ([]string, error)
}

With these changes, you can now intercept the request/response from within your implementation and act accordingly. For example, you may want to omit a field only if the request contains certain data.

Assets 2

It's been a busy few weeks with lots of great stuff added and fixed. We've had some fantastic contributions from the community for features ranging from core enhancements to HTTP backup efficiency to Docker support.

I'm excited to announce the official Ponzu documentation site: https://docs.ponzu-cms.org (Source)

Thank you to everyone who helped by contributing code, comments, thoughts and participated in the discussions on the issue tracker.

New in 0.9.2:

  • [#140] Generate content references from the CLI
  • [#138] More hooks added to item.Hookable:
    • Admin triggered by CMS actions: {Before|After}Admin{Create|Update|Delete}
    • Addon triggered by status change: {Before|After}Addon{Enable|Disable}
      • allows addons to do setup/teardown during runtime
  • [#137] File Metadata API
  • [#132] Context Cancellation for backup routines (by @eticzon)
  • [#131] Race condition fix in configCache map (thank you @golang race detector!)
  • [#126] Reserved names fix in CLI (bug reported by @gedw99)
  • [#123] Performance improvement to sort and storage (by @kkeuning)
  • [#116] Full-text search using Bleve for any content type (disabled by default, single-method to enable)
  • [#115] Dockerfile and example app (by @krismeister)
  • [#107] Add optional input view specifier in CLI for each field

@nilslice nilslice released this Mar 20, 2017 · 250 commits to master since this release

Assets 2

This is a minor release to fix a bug in the CMS editor - which would ignore changes made to content if a field was not present in the POST request (such as unchecking a checkbox), but there was intent to overwrite the value in the database.

In this release, we have separated the functionality of merging data (such as in the Update method in the Updatedable interface), into it's own exported function within the system/db package: UpdateContent(target string, data url.Values) (int, error). It is now solely responsible for merging fields into existing data in the database, whereas SetContent(target string, data url.Values) (int, error) will exclusively insert or replace data into the database.

This way Ponzu developers have access to both of these individually to use as needed, rather than hiding them inside the HTTP handlers.

To get the latest version:

$ go get -u github.com/ponzu-cms/ponzu/...
$ cd $PROJ
$ ponzu upgrade
Assets 2

This is an important release! v0.9.0 is introducing some breaking changes. If you have been using the api.Externalable interface to accept content from external clients, you will need to update a couple methods and change some client code for API endpoints.

  1. Huge thanks to @kkeuning for his work on the api.Updateable interface, enabling outside clients to update content via the Content API. This allows Ponzu systems to handle POST requests to /api/content/update?type=<Type>&id=<id> and will merge in updated fields to the database.

  2. A new api.Deleteable interface is available, with a single method: Delete(http.ResponseWriter, *http.Request) error - this enables external clients to delete content from the database via the Content API endpoint: /api/content/delete?type=<Type>&id=<id>

    Note: along with both of the additions above come item.Hookable methods so Ponzu users can hook into the req/res lifecycle and do validation, logging, trigger notifications, modify data etc.

  3. BREAKING CHANGE: api.Externalable and its method Accept(http.ResponseWriter, *http.Request) error have been renamed to follow the convention set with Updateable and Deleteable, and are now api.Createable and Create(http.ResponseWriter, *http.Request) error

    This also means that the Content API endpoint for creating content from external clients is now /api/content/create?type=<Type> instead of /api/content/external?type=<Type>

I apologize for any inconvenience this brings, and for making breaking changes, but the clarity and consistency this adds are nicer to work with. I believe it will set a precedence for naming patterns that will keep the codebase cleaner and easier to pick up down the line.

From here, we have only a bit of clean-up, a Filterable interface (#86) proposed by @olliephillips which acts as a stored procedure of sorts, and optimizations to the db.SortContent function which is causing issues when large amounts of external content is created at once. Unless there are other suggestions that would change the overall Ponzu API, completion of these items and more testing should allow us to hit the v1.0.0 mark!

To get the latest release:

$ go get -u github.com/ponzu-cms/ponzu/...
$ cd $PROJ
$ ponzu upgrade

@nilslice nilslice released this Mar 1, 2017 · 295 commits to master since this release

Assets 2

This release is made possible by several contributions from @Sirikon, @olliephillips, @rohanpai

#78
adds better Windows support & fixes an issue with the CLI

#87
includes a new CLI command $ponzu add <import path> to go get & copy addon packages into a Ponzu project

Additionally, there was a bug in the internal omit func called during the contentsHandler of the content API. This is now fixed, and we advise everyone to upgrade your projects to v0.8.5 after updating your ponzu package.

To get the latest release:

$ go get -u github.com/ponzu-cms/ponzu/...
$ cd $PROJ
$ ponzu upgrade
Assets 2

With a new system/item package interface, item.Omittable, Ponzu content API responses can now be told to keep arbitrary struct fields from being exposed. The Omit method implements this interface by returning a []string containing the names of the JSON struct tags for the type whose fields you want omitted.

type Omittable interface {
    Omit() []string
}

As usual, upgrade by:

$ go get -u github.com/ponzu-cms/ponzu/...
$ cd $PROJ && ponzu upgrade

@nilslice nilslice released this Feb 6, 2017 · 359 commits to master since this release

Assets 2

v0.8.3 introduces support for custom user-definable indexes through a simple API in the system/db package.

func Index(namespace, key string) ([]byte, error) {}  // getter
func SetIndex(namespace, key string, value interface{}) error {} // setter
func DeleteIndex(namespace, key string) error {} // delete key in index
func DropIndex(namespace string) error {} // remove index and all key/values

To get the latest version:

$ go1.8rc3 get -u github.com/ponzu-cms/ponzu/...
$ cd $PROJ && ponzu upgrade

@nilslice nilslice released this Jan 30, 2017 · 363 commits to master since this release

Assets 2

#55 (feature) - types that implement api.Externalable now return responses if data was sent and saved successfully. This will help apps/clients to use data to build UI or confirm to users that requests were successful or redirect a user to their content.

Example response to a POST /api/content/external?type=Review which also implements api.Trustable

{
  "data": [
    {
        "id": "6", // will be omitted if status is pending
        "type": "Review",
        "status": "public"
    }
  ]
}

@nilslice nilslice released this Jan 26, 2017 · 364 commits to master since this release

Assets 2

Ponzu developers now have more control over the request/response lifecycle inside the content types through many of the interface methods provided in packages such as api and item.

#47 (feature)
#45 (bugfix)