Skip to content

Commit

Permalink
Merge pull request #130 from ushahidi/release-prep
Browse files Browse the repository at this point in the history
Release prep
  • Loading branch information
rjmackay committed Oct 29, 2013
2 parents f5df60e + 58b4bba commit 0a6ea79
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 1 deletion.
31 changes: 31 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

### v3.0.0-alpha.2

* UI - create post
* Detailed LICENSE.md
* Added Changelog.md

### v3.0.0-alpha.1

* Initial development release
* REST API
* Posts endpoint
* Forms, groups, and attributes endpoints
* Media endpoint
* Tags endpoint
* Users endpoint
* Posts revisions and translations support
* GeoJSON support on Posts endpoint
* Supports OAuth2 for authentication
* UI
* Backbone Marionette based JS frontend
* Post listing, detail and delete
* Map views
* UI Wireframes (in app but not powered by real data)
* Sets listing, detail, create
* Login, Register
* Edit post
* Unit tests
* Build process
* Vagrant setup
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,49 @@ You can add per-environment config overrides in ```application/config/environmen
Routes are configured in ```application/routes/default.php```. Additional routes can be added in per-environment routing files ie. ```application/routes/development.php```.
Release Notes
-------------
### What to expect in the Developer Release (aka v3.0.0-alpha.1)
We've built a working API and a basic JS powered UI, however there are still a lot of rough edges you should know about.
#### What's working:
* Post listings - listings work and load real data. They're page-able and sort-able, but not search-able yet.
* Post detail pages - these work and load real data. However they don't render custom form data yet, and the images are faked.
* Post create form - well kind of. It should mostly work, but there are definitely still bugs with this.
* Posts delete
#### What's not working:
* Searching posts
* Workspace menu - the menu is there, but none of the links do anything
* Login
* Register
* Related posts - always shows the most recent 3 posts
* Media - We're just using fake images at the moment, there's no way to upload new ones
* Custom forms - these exist in the API, but there's no UI for managing them.
#### Looks like it works, but doesn't
There are a bunch of views built into that app that are really just design
prototypes. They look real, but they're not powered by real data.
* Sets listing
* Set details
* Editing posts
* Adding posts to sets
#### Authorization (aka. why does it keep asking me to 'Authorize This Request'?)
Our authorization is currently a quick hack. The JS app hits the API directly,
and this means it has to use a standard OAuth authorization flow. At the moment
thats a plain unstyled bit of UI: the ugly 'Authorize This Request' screen.
On top of that the default token time out is only an hour - so you'll often
hit the authorize screen quite a few times while developing.
This is temporary, we're working on a real solution, but for now please bear
with us.
Extras
------
Expand All @@ -145,4 +188,4 @@ Create a behat config file by copying ```application/tests/behat.template``` to
Run the tests as follows:
```
./bin/behat --config application/tests/behat.yml
./bin/phpunit -c application/tests/phpunit.xml
./bin/phpunit -c application/tests/phpunit.xml
73 changes: 73 additions & 0 deletions application/migrations/3-0/20131028221729.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php defined('SYSPATH') OR die('No direct script access.');

class Migration_3_0_20131028221729 extends Minion_Migration_Base {

/**
* Run queries needed to apply this migration
*
* @param Kohana_Database $db Database connection
*/
public function up(Kohana_Database $db)
{
list($form_id, $affected_rows) = DB::query(DATABASE::INSERT, "
INSERT INTO `forms` (`parent_id`, `name`, `description`, `type`, `created`, `updated`)
VALUES
(0,'Post','Post form','report',0,0);
")->execute($db);

list($group_id, $affected_rows) = DB::query(DATABASE::INSERT, "
INSERT INTO `form_groups` (`form_id`, `label`, `priority`)
VALUES
(:form_id,'Main',99);
")->bind(':form_id', $form_id)
->execute($db);

list($field_id, $affected_rows) = DB::query(DATABASE::INSERT, "
INSERT INTO `form_attributes` (`key`, `label`, `input`, `type`, `required`, `default`, `priority`, `options`, `cardinality`)
VALUES
('location','Location','location','point',0,NULL,2,'',1)
")->execute($db);

DB::query(DATABASE::INSERT, "
INSERT INTO `form_groups_form_attributes` (`form_group_id`, `form_attribute_id`)
VALUES
(:group,:field)
")->bind(':group', $group_id)
->bind(':field', $field_id)
->execute($db);

list($post_id, $affected_rows) = DB::query(DATABASE::INSERT, "
INSERT INTO `posts` (`form_id`, `type`, `title`, `content`, `status`)
VALUES
(:form_id, 'report', 'First post', 'Delete this post and add your own!', 'published')
")->bind(':form_id', $form_id)
->execute($db);

DB::query(DATABASE::INSERT, "
INSERT INTO `post_point` (`post_id`, `form_attribute_id`, `value`)
VALUES
(:post, :field_id, GeomFromText('POINT(174.78 -36.85)'))
")->bind(':field_id', $field_id)
->bind(':post', $post_id)
->execute($db);

DB::query(DATABASE::INSERT, "
INSERT INTO `tags` (`tag`, `slug`, `type`, `color`, `description`, `priority`)
VALUES
('example1', 'example1', 'category', 'ff0000', 'Example Category', 0),
('example2', 'example2', 'category', '00ff00', 'Example Category', 0),
('example3', 'example3', 'category', '0000ff', 'Example Category', 0)
")->execute($db);
}

/**
* Run queries needed to remove this migration
*
* @param Kohana_Database $db Database connection
*/
public function down(Kohana_Database $db)
{
// $db->query(NULL, 'DROP TABLE ... ');
}

}

0 comments on commit 0a6ea79

Please sign in to comment.