Skip to content

Commit

Permalink
Release 3.7.0 (#1766)
Browse files Browse the repository at this point in the history
* Fixing markdown field size bug

* Set up Ushahidi\App namespace and move the simple classes

Migrating the easy, non kohana related stuff into a namespace

* Format for PSR2

* Disable slack notifications from travis

* Adding survey editor update (#1662)

* Adding survey editor update

* Field locking fully working, next fix broken tests

* Fixing tests

* Update Vagrantfile

* Remove extra files

* Updating counts

* Adding entity fields

* Removing unneeded include, simplifying function

* Adding task restriction

* Adding form stage and attribute restriction

* Fixed stage tests

* Updated attribute filitering and added tests

* Fixed linting

* Fixing base data set

* Fixing tests

* removing extraneous char

* Docs: Add more details on use case internals

* 1511 field level locking (#1690)

* Adding survey editor update

* Field locking fully working, next fix broken tests

* Fixing tests

* Update Vagrantfile

* Remove extra files

* Updating counts

* Adding entity fields

* Removing unneeded include, simplifying function

* Adding task restriction

* Adding form stage and attribute restriction

* Fixed stage tests

* Updated attribute filitering and added tests

* Fixed linting

* Fixing base data set

* Fixing tests

* removing extraneous char

* Fixing access permissions

* Fixing test

* Improve categories (#1670)

* adding forms-tags-table #1397

* adding helper-functions for updating forms-tags-relations #1397

* updating forms_tags-table when updating a tag #1397

* updating forms_tags-table when updating/creating an attribute #1397

* adding search-fields for tags #1397

* adding tags to form #1397

* updating forms_tags-table when adding a new survey #1397

* changing naming to tags #1397

* removing updating form_tags when saving an attribute, had got the relation wrong #1397

* lint

* not returning all posts when search->tags is empty #1397

* updating form_attributes when tag is deleted #1397

* updating forms-tags relation when form is updated #1397

* removing old forgotten debug-logging

* resetting post-category-filtering to normal #1397

* adding child-tag-ids to tag #1397

* adding migrations for tags #1397

* fixing failing test #1397

* linting + fix comment from review #1397

* adding migration to move post-tag-values to post_varchar #1397

* Adds language to user (#1659)

* adding language to user #1651

* fixing linting and removing comment #1651

* lint #1651

* Fix from QA (#1705)

* adding forms-tags-table #1397

* adding helper-functions for updating forms-tags-relations #1397

* updating forms_tags-table when updating a tag #1397

* updating forms_tags-table when updating/creating an attribute #1397

* adding search-fields for tags #1397

* adding tags to form #1397

* updating forms_tags-table when adding a new survey #1397

* changing naming to tags #1397

* removing updating form_tags when saving an attribute, had got the relation wrong #1397

* lint

* not returning all posts when search->tags is empty #1397

* updating form_attributes when tag is deleted #1397

* updating forms-tags relation when form is updated #1397

* removing old forgotten debug-logging

* resetting post-category-filtering to normal #1397

* adding child-tag-ids to tag #1397

* adding migrations for tags #1397

* fixing failing test #1397

* linting + fix comment from review #1397

* adding migration to move post-tag-values to post_varchar #1397

* fixing id-error when updating a survey #1397

* Release v3.6.4 (#1707)

**New Features**
- Added Field Level Locking to Surveys
- Improved Survey UX
- Added Task Level Visibility
- Added Webhook Support
- Added Webhook UX
- Added Webhook events fro Create, Update of Post
- Added Survey Duplication 
- Added Task Duplication
- Added Support for OSS deployment with Ushahidi Mobile
- Added Deeplinking for iOS and Android
- Added Banner ads for iOS and Android
- Adding Location Search Picker for Maps in Posts
- Added reply to twitter via Post feature
- Added support for hierarchical categories
- Added Category field type to Survey
- Added Markdown field type to Survey
- Add tags dynamically directly from Posts
- Added language switching for all users


**Minor improvements and fixes**
- Adding uglify-friendly code to colors
- Confirming on delete for unsaved surveys, tasks and fields
- Upgrade node to v6
- Resolved twitter duplication bug
- Display number of unmapped posts to timeline
- Moved Savedsearches to Modal
- Moved Filter to Modal

* Update composer dependencies (#1666)

* Rearranging tests out of application/ into tests/

* Update composer packages to recent versions

- Update PHPUnit
- Update Behat
- Update PHPSpec
- Update aura/di to remove custom fork
- Switch flysystem to 1.0 not 1.1 dev
- Update phinx
- Update phpunit tests for new version
- Update behat tests for new version

* Fix DI to work without auto resolving enabled

* Run codeship builds on PHP 5.6

* Fix travis builds

* Remove bin/tests

* Fix phpunit tests failing while trying to backup globals

Tests were failing with "Serialization of 'Closure' is not allowed"

* Ignore tests/ for linting

* fixup lint

* Fix PHPUnit code coverage, and fix some bugs too

* Don't inject Signer into webhook command

Signer is just overwritten anyway, no need to inject it.
Injection was broken because we didn't pass an auth token

* Fix bin/ushahidi for new symfony/console version

* Fixup coverage reporting from travis

* Try to fix sending files to coveralls

* Add PHP 7.1 to travis builds

* Exclude php 7.1+coverage build

* Add laravel/homestead box and remove puppet scripts

* Update ohanzee/database to our fork, and select only aggregates when counting

Mysql 5.7 doesn't like selecting both grouped and non grouped info in
the same query. So we're not resetting the select fields before adding
aggregates (ie. count) to the query

* Remove posts?current_stage filter as its not working, and fails hard in mysql 5.7

* Set mysql strict mode in travis

* Reset order by clause when fetching count queries too

* Fix posts stats to work with mysql only_full_group_by mode

* Output mysql version from travis builds

* Use MAX() instead of ANY_VALUE() in queries

ANY_VALUE only exists in mysql 5.7+

* Merging Develop into Master (#1730)

* Fixing markdown field size bug

* Set up Ushahidi\App namespace and move the simple classes

Migrating the easy, non kohana related stuff into a namespace

* Format for PSR2

* Disable slack notifications from travis

* Adding survey editor update (#1662)

* Adding survey editor update

* Field locking fully working, next fix broken tests

* Fixing tests

* Update Vagrantfile

* Remove extra files

* Updating counts

* Adding entity fields

* Removing unneeded include, simplifying function

* Adding task restriction

* Adding form stage and attribute restriction

* Fixed stage tests

* Updated attribute filitering and added tests

* Fixed linting

* Fixing base data set

* Fixing tests

* removing extraneous char

* Docs: Add more details on use case internals

* 1511 field level locking (#1690)

* Adding survey editor update

* Field locking fully working, next fix broken tests

* Fixing tests

* Update Vagrantfile

* Remove extra files

* Updating counts

* Adding entity fields

* Removing unneeded include, simplifying function

* Adding task restriction

* Adding form stage and attribute restriction

* Fixed stage tests

* Updated attribute filitering and added tests

* Fixed linting

* Fixing base data set

* Fixing tests

* removing extraneous char

* Fixing access permissions

* Fixing test

* Improve categories (#1670)

* adding forms-tags-table #1397

* adding helper-functions for updating forms-tags-relations #1397

* updating forms_tags-table when updating a tag #1397

* updating forms_tags-table when updating/creating an attribute #1397

* adding search-fields for tags #1397

* adding tags to form #1397

* updating forms_tags-table when adding a new survey #1397

* changing naming to tags #1397

* removing updating form_tags when saving an attribute, had got the relation wrong #1397

* lint

* not returning all posts when search->tags is empty #1397

* updating form_attributes when tag is deleted #1397

* updating forms-tags relation when form is updated #1397

* removing old forgotten debug-logging

* resetting post-category-filtering to normal #1397

* adding child-tag-ids to tag #1397

* adding migrations for tags #1397

* fixing failing test #1397

* linting + fix comment from review #1397

* adding migration to move post-tag-values to post_varchar #1397

* Adds language to user (#1659)

* adding language to user #1651

* fixing linting and removing comment #1651

* lint #1651

* Fix from QA (#1705)

* adding forms-tags-table #1397

* adding helper-functions for updating forms-tags-relations #1397

* updating forms_tags-table when updating a tag #1397

* updating forms_tags-table when updating/creating an attribute #1397

* adding search-fields for tags #1397

* adding tags to form #1397

* updating forms_tags-table when adding a new survey #1397

* changing naming to tags #1397

* removing updating form_tags when saving an attribute, had got the relation wrong #1397

* lint

* not returning all posts when search->tags is empty #1397

* updating form_attributes when tag is deleted #1397

* updating forms-tags relation when form is updated #1397

* removing old forgotten debug-logging

* resetting post-category-filtering to normal #1397

* adding child-tag-ids to tag #1397

* adding migrations for tags #1397

* fixing failing test #1397

* linting + fix comment from review #1397

* adding migration to move post-tag-values to post_varchar #1397

* fixing id-error when updating a survey #1397

* Update composer dependencies (#1666)

* Rearranging tests out of application/ into tests/

* Update composer packages to recent versions

- Update PHPUnit
- Update Behat
- Update PHPSpec
- Update aura/di to remove custom fork
- Switch flysystem to 1.0 not 1.1 dev
- Update phinx
- Update phpunit tests for new version
- Update behat tests for new version

* Fix DI to work without auto resolving enabled

* Run codeship builds on PHP 5.6

* Fix travis builds

* Remove bin/tests

* Fix phpunit tests failing while trying to backup globals

Tests were failing with "Serialization of 'Closure' is not allowed"

* Ignore tests/ for linting

* fixup lint

* Fix PHPUnit code coverage, and fix some bugs too

* Don't inject Signer into webhook command

Signer is just overwritten anyway, no need to inject it.
Injection was broken because we didn't pass an auth token

* Fix bin/ushahidi for new symfony/console version

* Fixup coverage reporting from travis

* Try to fix sending files to coveralls

* Add PHP 7.1 to travis builds

* Exclude php 7.1+coverage build

* Add laravel/homestead box and remove puppet scripts

* Update ohanzee/database to our fork, and select only aggregates when counting

Mysql 5.7 doesn't like selecting both grouped and non grouped info in
the same query. So we're not resetting the select fields before adding
aggregates (ie. count) to the query

* Remove posts?current_stage filter as its not working, and fails hard in mysql 5.7

* Set mysql strict mode in travis

* Reset order by clause when fetching count queries too

* Fix posts stats to work with mysql only_full_group_by mode

* Output mysql version from travis builds

* Use MAX() instead of ANY_VALUE() in queries

ANY_VALUE only exists in mysql 5.7+

* Fix io scheduled job errors (#1748)

* handle error in twitter dataprovider connection

* empty filters are reverted to the default, if provided (helps avoid invalid SQL such as "IN ()")

* Release 3.7.0 (#1764)

* 1595 intercom (#1718)

* adding intercom listener to capture user events

* Adding additional intercom events

* Adding first login

* Fixing bracket

* Adding intercom lib

* Updating listener

* Add laravel/homestead box and remove puppet scripts (#1722)

* Updating composer

* Updating composer.lock from fresh file

* Fixing tests

* Update users.feature

* Remove redundant file

* Fixed var name

* Fix default for existing tasks

* adding new migration to show_when_published (#1731)

* Changing column default for task visibility

* Repair linting

* Fix Waffle badge

Extra space was breaking markdown.

* Adding total to geojson collection (#1739)

* Adding total to geojson collection

* Adding explanatory note about geojson addition

* Adjusting unmapped request to incorporate it into stats (#1738)

* Adjusting unmapped request to incorporate it into stats and changing the way in which unmapped is caluclated

* Fixing failing test

* Fixing get total count

* Geojson chunking (#1744)

* Adding total to geojson collection

* Adding explanatory note about geojson addition

* Removing unneeded logging

* Fixed issue when no posts returned by search

* Update linting setup and fix any new lint errors (#1742)

* Update phpcs
* Add ruleset for src/
* Fix linting on src/
* Lint tests
* Make tests PSR4 compliant
* Split Kohana bootstrap out of Feature Context so we can ignore it for CS
* Fix spec ruleset
* Fix linting on migrations

* Fixing missing db config for unmapped query

* Enable clustering by default

* Only add `tags` type attributes to the "post fields" not tasks.

* Remove category fields from tasks

* Turn posts_tags into a full post value table, and avoid duplicating info

- Add extra field to posts_tags
- Remove tags from post_varchar
- Add Post/Tags validator
- Add Post/Tags repo

* Don't allow making tags attributes private

* Handle legacy tags values and save into first tags attribute.

This isn't 100% compatible, but we at least save tags *if* the
form has a tags attribute

* Make forms tests work in isolation

* Stop limiting tags by form, just limit tags per attribute

- Stop using forms_tags table
- Just use form_attribute.options instead

* Rename tags to categories in error messages

* Format form tags and tag children as relations, remove tag forms formatter

* Remove tags?formId filter from Tag repo

We've removed the relevant table, so lets remove the code too!

* Fix validating tags when saving a post

Typo when injecting tags_repo was breaking it

* Fix validating tags when saving a post

Typo when injecting tags_repo was breaking it

* Add TagRepository interface to use in Post/Tags Validator

- Use tag field to set tags in test
- Add TagRepository Interface
- Implement interface in Tag Repo

* Ignore form.tags if passed when saving Form entities

Ignore computed attributes on form

* Add test for removing tag from attribute options when deleted

* Test that form.tags value is ignored during form update

* Make child tags top level when parent is deleted, don't delete them

Update foreign key to ON DELETE SET NULL, not CASCADE

* Reset fixtures before testing removing a tag

Fix to c55dbfe

* Parse tag names when set as post value (not just post.tags)

Parse tags as name or id when sent in post.values. We already do this
with post.tags

* Update to use checklist for testing

* Fixing error message for tag (#1760)

* Fixing error message for tag
* adding name to error-message when importing posts with categories
* removing children from tag-object before updating
* removing tags from form-object before saving form

* Incorrect length requirement
  • Loading branch information
willdoran authored May 31, 2017
1 parent 6ebb18e commit 2328782
Show file tree
Hide file tree
Showing 214 changed files with 6,240 additions and 4,235 deletions.
5 changes: 5 additions & 0 deletions .env.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DB_TYPE=MySQLi
DB_HOST=127.0.0.1
DB_NAME=ushahidi
DB_PASS=
DB_USER=travis
34 changes: 19 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
sudo: false
notifications:
hipchat:
rooms:
secure: fb2eYR4DVBestPl/DSG7lnUWT46Rmr9BfRsZFe4dhrS3ZetkZ1XZueF6SCtB4yukaJoDlA7y98FgQ7eGx6OGToc4ALnPpwd3BdfJ5RV/PK/6LG7u5Mp4+DfB4lG1q9IjuHF7dhBPSk2sRd8ewtwV5JR4SHKYfHxSR9Ekwmn1Xyo=
template:
- '<a href="%{build_url}">%{repository}#%{build_number}</a> (%{branch} - <a href="%{compare_url}">%{commit}</a>
: %{author}): %{message}'
format: html
notify: true
slack:
secure: NxhzhKGYnZYZiWVZM4w1PlZpTy9bbmNlvbqjL+9d4PvK4hFzPwQU12CchhBPeXNGLWBHg/ti6Scn/t5XIS3YJrkk4ydWmJBht5UId8uFZ1A7GCUnNNPTt2RG55lbJJdZSj01rOGZjEQbE5RyckEjgRzhZjdZ+HsjoPaRzWIBrvE=
#notifications:
# slack:
# secure: NxhzhKGYnZYZiWVZM4w1PlZpTy9bbmNlvbqjL+9d4PvK4hFzPwQU12CchhBPeXNGLWBHg/ti6Scn/t5XIS3YJrkk4ydWmJBht5UId8uFZ1A7GCUnNNPTt2RG55lbJJdZSj01rOGZjEQbE5RyckEjgRzhZjdZ+HsjoPaRzWIBrvE=
language: php
php:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
env:
- coverage="--coverage"
- coverage=""
matrix:
exclude:
- php: '5.5'
- php: '7.0'
env: coverage="--coverage"
- php: '7.1'
env: coverage="--coverage"
allow_failures:
- env: coverage="--coverage"
- php: '7.1'
fast_finish: true
cache:
directories:
- "$HOME/.composer/cache"
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE ushahidi;'
- mysql -e "select version();"
- mysql -e "SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"
- cp .env.travis .env
install:
- composer install --no-interaction
before_script:
- "./bin/tests install"
- composer pre-test
- if [ "${coverage}" == "" ]; then php -S localhost:8000 -t httpdocs httpdocs/index.php & fi
- if [ "${coverage}" != "" ]; then php -S localhost:8000 -t httpdocs httpdocs/coverage.php & fi
- mysql -e 'SET @@GLOBAL.wait_timeout=1800'
script:
- "./bin/tests run --no-install $coverage"
- if [ "${coverage}" == "" ]; then composer test; fi
- if [ "${coverage}" != "" ]; then composer run coverage --timeout=0; fi
- composer lint
after_success:
- if [ "${coverage}" != "" ]; then travis_retry bin/coveralls -v; fi
Expand Down
27 changes: 27 additions & 0 deletions Homestead.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ip: 192.168.33.110
memory: 1024
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
-
map: "./"
to: /vagrant
type: "nfs"
-
map: "./"
to: /home/vagrant/Code/platform-api
type: "nfs"
sites:
-
map: api.ushahidi.app
to: /home/vagrant/Code/platform-api/httpdocs
-
map: ushv3.dev
to: /home/vagrant/Code/platform-api/httpdocs
databases:
- ushahidi
name: platform-api
hostname: platform-api
4 changes: 2 additions & 2 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This pull request makes the following changes:
-

Test these changes by:
-
Test checklist:
- [ ]

Fixes ushahidi/platform# .

Expand Down
6 changes: 0 additions & 6 deletions Puppetfile

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ushahidi 3
============

[![Build Status](https://travis-ci.org/ushahidi/platform.png)](https://travis-ci.org/ushahidi/platform)
[![Stories up next](https://badge.waffle.io/ushahidi/platform.png?label=Stage: Backlog&title=Backlog)](https://waffle.io/ushahidi/platform)
[![Stories up next](https://badge.waffle.io/ushahidi/platform.png?label=Stage:Backlog&title=Backlog)](https://waffle.io/ushahidi/platform)
[![Coverage Status](https://coveralls.io/repos/github/ushahidi/platform/badge.svg)](https://coveralls.io/github/ushahidi/platform)

[Download][download]
Expand All @@ -26,7 +26,7 @@ Ushahidi is an open source web application for information collection, visualiza

### I'm a developer, should I contribute to Ushahidi v3?

Yes! Development moves pretty quickly but the tech stack is getting more and more stable. If you're keen to help build something awesome, [Jump on board..][getin]
Yes! Development moves pretty quickly but the tech stack is getting more and more stable. If you're keen to help build something awesome, [jump on board..][getin]

## Using the Platform

Expand Down
76 changes: 43 additions & 33 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
# Basic apache dev box complete with phpunit
# ready to go for ushahidi dev
Vagrant.configure("2") do |config|
config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet" # vagrantcloud
config.vm.hostname = "ushahidi-platform.dev"
config.vm.network "private_network", ip: "192.168.33.110"
config.vm.synced_folder "./", "/var/www", id: "vagrant-root", :nfs => true
config.vm.network "forwarded_port", guest: 22, host: 2210
config.ssh.port = 2210

config.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--name", "ushahidi-platform"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--memory", "512"]
virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end

config.vm.provision :shell do |shell|
# upgrade all packages (including puppet) before using the puppet provisioner.
# this excludes grub-pc since the hard drive id changes between VMs and will cause
# an interactive prompt to appear and then error out, breaking the provisioning step.
shell.inline = "DEBIAN_FRONTEND=noninteractive apt-mark hold grub-pc && apt-get update -y && apt-get upgrade -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'"
end

config.vm.provision :puppet do |puppet|
puppet.environment_path = "puppet/"
puppet.environment = "platform"
puppet.options = ["--verbose"]
puppet.facter = {
# Optionally pass in a github oauth token through an environment variable
"github_token" => ENV.fetch('github_token', '')
}
end
# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))

homesteadYamlPath = File.expand_path("Homestead.yaml", File.dirname(__FILE__))
homesteadJsonPath = File.expand_path("Homestead.json", File.dirname(__FILE__))
afterScriptPath = "after.sh"
aliasesPath = "aliases"

require File.expand_path(confDir + '/scripts/homestead.rb')

Vagrant.require_version '>= 1.9.0'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
config.vm.provision "shell" do |s|
s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases"
end
end

if File.exist? homesteadYamlPath then
settings = YAML::load(File.read(homesteadYamlPath))
elsif File.exist? homesteadJsonPath then
settings = JSON.parse(File.read(homesteadJsonPath))
else
abort "Homestead settings file not found in #{confDir}"
end

Homestead.configure(config, settings)

if File.exist? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath, privileged: false
end

if defined? VagrantPlugins::HostsUpdater
config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
end
end
22 changes: 0 additions & 22 deletions application/classes/ORM.php

This file was deleted.

60 changes: 0 additions & 60 deletions application/classes/Unittest/Database/TestCase.php

This file was deleted.

8 changes: 1 addition & 7 deletions application/classes/Ushahidi/Console/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class Ushahidi_Console_Webhook extends Command
private $postRepository;
private $webhookRepository;
private $webhookJobRepository;
private $signer;
private $client;

public function setDatabase(Database $db)
Expand All @@ -48,11 +47,6 @@ public function setPostRepo(PostRepository $repo)
$this->postRepository = $repo;
}

public function setSigner(Signer $signer)
{
$this->signer = $signer;
}

public function setWebhookJobRepo(WebhookJobRepository $repo)
{
$this->webhookJobRepository = $repo;
Expand Down Expand Up @@ -126,7 +120,7 @@ private function generateRequest($webhook_request)

// This is an asynchronous request, we don't expect a result
// this can be extended to allow for handling of the returned promise
$promise = $this->client->requestAsync('POST', $webhook->url, [
$promise = $this->client->request('POST', $webhook->url, [
'headers' => [
'X-Platform-Signature' => $signature,
'Accept' => 'application/json'
Expand Down
Loading

0 comments on commit 2328782

Please sign in to comment.