Skip to content

Commit

Permalink
Merge branch 'master' into performance/show-map-option
Browse files Browse the repository at this point in the history
  • Loading branch information
Brice TEXIER committed Jul 31, 2017
2 parents 72d8383 + 9c053a9 commit b7cff03
Show file tree
Hide file tree
Showing 77 changed files with 1,232 additions and 1,089 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ bundler_args: "--full-index --without development"
cache: bundler
rvm:
- 2.2.7
- 2.3.4
env:
- TEST_SUITE=libs
- TEST_SUITE=models
- TEST_SUITE=controllers
- TEST_SUITE=frontend
#- TEST_SUITE=frontend
before_install: test/ci/before_install
before_script: test/ci/before_script
script: xvfb-run bundle exec rake test:$TEST_SUITE DRIVER=webkit
Expand All @@ -19,7 +18,3 @@ notifications:
email: false
slack:
secure: v1/ya/fyroy3BmW9FDMmKi3lwamnzY6ktQAU/vEJCg4AgvauY0QJthMsLXOBb3RnhFWao2Kj2H40XjI7VtH3z46VEq6DPLURBqmAc24c30ZMi/XIM9YqauYeEPHPhM0nDQY+s0ovU2uX/1w7uv/atNjy0n643An61Em+qPwIW5U=
addons:
apt:
packages:
- libqtwebkit-dev
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ GEM
cocoon (1.2.10)
codacy-coverage (1.1.6)
simplecov
code_analyzer (0.4.7)
code_analyzer (0.4.8)
sexp_processor
code_string (0.0.1)
coderay (1.1.1)
Expand Down Expand Up @@ -168,7 +168,7 @@ GEM
erubis (2.7.0)
et-orbi (1.0.5)
tzinfo
eventmachine (1.2.3)
eventmachine (1.2.5)
exception_notification (4.2.1)
actionmailer (>= 4.0, < 6)
activesupport (>= 4.0, < 6)
Expand All @@ -177,7 +177,7 @@ GEM
activesupport (>= 3.0.0)
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.11.0.1)
faraday_middleware (0.12.0)
faraday (>= 0.7.4, < 1.0)
feedjira (2.1.2)
faraday (>= 0.9)
Expand Down Expand Up @@ -313,7 +313,7 @@ GEM
paperclip-document (0.0.10)
burisu-docsplit (>= 0.7.9)
paperclip (>= 3.1, < 5.2)
parallel (1.11.2)
parallel (1.12.0)
parallel_tests (2.14.2)
parallel
parser (2.4.0.0)
Expand Down Expand Up @@ -363,9 +363,9 @@ GEM
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails_best_practices (1.18.1)
rails_best_practices (1.19.0)
activesupport
code_analyzer (>= 0.4.3)
code_analyzer (>= 0.4.8)
erubis
i18n
json
Expand Down
4 changes: 2 additions & 2 deletions config/locales/arb/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ arb:
new: "دفعة دفع جديدة"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
index: "كشوف"
new: "جديد قسيمة الدفع"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2943,7 +2943,7 @@ arb:
# backend/entity_links: "%{started_at}"
# backend/events: "%{name}"
# backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
# backend/interventions: "%{number}. %{name}"
# backend/interventions: "%{number}"
# backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
# backend/matters: "%{name} ‒ %{work_number}"
# backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/cmn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ cmn:
new: "新的支付费用"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
index: "工资单"
new: "新工资单"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2166,7 +2166,7 @@ cmn:
# backend/entity_links: "%{started_at}"
# backend/events: "%{name}"
# backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
# backend/interventions: "%{number}. %{name}"
# backend/interventions: "%{number}"
# backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
# backend/matters: "%{name} ‒ %{work_number}"
# backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/deu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ deu:
new: "Neue payslip Zahlung"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
# index: "Payslips"
new: "Neue Payslip"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2164,7 +2164,7 @@ deu:
# backend/entity_links: "%{started_at}"
# backend/events: "%{name}"
# backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
# backend/interventions: "%{number}. %{name}"
# backend/interventions: "%{number}"
# backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
# backend/matters: "%{name} ‒ %{work_number}"
# backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/eng/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ eng:
show: "Payslip payment: %{number}"
backend/payslips:
# correct: "Correct payslip: %{name}"
edit: "Edit payslip: %{name}"
edit: "Edit payslip: %{number}"
index: "Payslips"
# invoice: "Invoice payslip: %{name}"
new: "New payslip"
Expand Down Expand Up @@ -2434,7 +2434,7 @@ eng:
backend/entity_links: "%{started_at}"
backend/events: "%{name}"
backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
backend/interventions: "%{number}. %{name}"
backend/interventions: "%{number}"
backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
backend/matters: "%{name} ‒ %{work_number}"
backend/observations: "%{content}"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/fra/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ fra:
backend/entity_links: "%{started_at}"
backend/events: "%{name}"
backend/incoming_payments: "%{number}. %{mode_name} de %{payer_full_name} de %{amount} %{currency}"
backend/interventions: "%{number}. %{name}"
backend/interventions: "%{number}"
backend/journal_entry_items: "[%{entry_number}] %{name} (%{account_number}) D%{real_debit}/C%{real_credit} %{currency}"
backend/matters: "%{name} ‒ %{work_number}"
backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/ita/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ ita:
new: "Nuovo pagamento payslip"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
index: "Buste paga"
new: "Nuovo payslip"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2231,7 +2231,7 @@ ita:
# backend/entity_links: "%{started_at}"
# backend/events: "%{name}"
# backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
# backend/interventions: "%{number}. %{name}"
# backend/interventions: "%{number}"
# backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
# backend/matters: "%{name} ‒ %{work_number}"
# backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/jpn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ jpn:
new: "新しいペイチップの支払い"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
index: "ペイスリップス"
new: "新しいペイプルップ"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2241,7 +2241,7 @@ jpn:
# backend/entity_links: "%{started_at}"
# backend/events: "%{name}"
# backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
# backend/interventions: "%{number}. %{name}"
# backend/interventions: "%{number}"
# backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
# backend/matters: "%{name} ‒ %{work_number}"
# backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/por/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ por:
new: "Novo pagamento de salário"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
index: "Listas de pagamento"
new: "Novo salário"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2170,7 +2170,7 @@ por:
backend/entity_links: "%{started_at}"
backend/events: "%{name}"
backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} %{amount} %{currency}"
backend/interventions: "%{number}. %{name}"
backend/interventions: "%{number}"
backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
backend/matters: "%{name} ‒ %{work_number}"
backend/observations: "%{content}"
Expand Down
4 changes: 2 additions & 2 deletions config/locales/spa/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ spa:
new: "Nuevo pago de la nómina"
# show: "Payslip payment: %{number}"
backend/payslips:
# edit: "Edit payslip: %{name}"
# edit: "Edit payslip: %{number}"
index: "Papeletas"
new: "Nuevo salario"
# show: "Payslip: %{number}"
Expand Down Expand Up @@ -2458,7 +2458,7 @@ spa:
# backend/entity_links: "%{started_at}"
# backend/events: "%{name}"
# backend/incoming_payments: "%{number}. %{mode_name} from %{payer_full_name} of %{amount} %{currency}"
# backend/interventions: "%{number}. %{name}"
# backend/interventions: "%{number}"
# backend/journal_entry_items: "%{entry_number} %{name} %{account_number} D%{real_debit} C%{real_credit} %{currency}"
# backend/matters: "%{name} ‒ %{work_number}"
# backend/observations: "%{content}"
Expand Down
34 changes: 13 additions & 21 deletions test/ci/before_install
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
#!/bin/bash

# Qt5: https://gist.github.com/jreese/6207161

echo ""
echo "--------------------------------------------------------------------------------"
echo "Configure PPA:"
sudo apt-get install python-software-properties
sudo apt-add-repository --yes ppa:sharpie/for-science
sudo apt-add-repository --yes ppa:sharpie/postgis-stable
sudo apt-add-repository --yes ppa:ubuntugis/ubuntugis-unstable
# sudo apt-add-repository --yes ppa:ubuntu-sdk-team/ppa
sudo apt-get update -qq

echo ""
echo "--------------------------------------------------------------------------------"
echo "List postgis related packages:"
sudo apt-cache search postgis

echo ""
echo "--------------------------------------------------------------------------------"
echo "Install packages:"
Expand All @@ -25,16 +10,23 @@ echo "Install packages:"
sudo /etc/init.d/postgresql stop

# Install needed packages including PostgreSQL
sudo apt-get remove postgresql-client-9.1 postgresql-client-9.2 postgresql-client-9.3 postgresql-client-9.4
sudo apt-get install -qq libgeos-dev libgeos++-dev libproj-dev postgresql-9.5-postgis-2.2 graphicsmagick tesseract-ocr tesseract-ocr-fra tesseract-ocr-eng tesseract-ocr-spa pdftk libreoffice poppler-utils poppler-data ghostscript postgresql-contrib-9.5 postgresql-client-9.5
# sudo apt-get install -qq qtbase5-dev qtdeclarative5-dev qt5-default qt5-qmake libqt5webkit5-dev libxcb-glx0-dev
echo "Removing old Postgres versions."
sudo apt-get remove postgresql-client-9.1 postgresql-client-9.2 postgresql-client-9.3 postgresql-client-9.4 postgresql-client-9.5
echo""
echo "Dependencies install..."
echo""
sudo apt-get install -f -qq postgresql-9.6-postgis-2.3 graphicsmagick tesseract-ocr tesseract-ocr-fra tesseract-ocr-eng tesseract-ocr-spa pdftk libreoffice poppler-utils poppler-data qt5-default libqt5webkit5-dev gstreamer1.0-x gstreamer1.0-tools gstreamer1.0-plugins-base

echo ""
echo "Dependencies installed!"
echo ""

# Configure PostgreSQL port to 5432
sudo sed -i -r 's/port\s*=\s*[0-9]+/port = 5432/g' /etc/postgresql/9.5/main/postgresql.conf
sudo sed -i -r 's/port\s*=\s*[0-9]+/port = 5432/g' /etc/postgresql/9.6/main/postgresql.conf

# Grant access to all
sudo sed -i '1i local all all trust' /etc/postgresql/9.5/main/pg_hba.conf
sudo sed -i '1i local all all trust' /etc/postgresql/9.6/main/pg_hba.conf

# Force PostgreSQL restart
sudo /etc/init.d/postgresql stop
sudo /etc/init.d/postgresql start 9.5
sudo /etc/init.d/postgresql start 9.6
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ class InterventionParticipationsControllerTest < ActionController::TestCase
assert_equal original_count, new_count
end

test 'ignores working periods that already exist' do
add_auth_header
payload = repeating_payload
response = JSON(post(:create, payload).body)
part_id = response['id']
original_count = InterventionParticipation.find(part_id).working_periods.count
# TODO: Re-activate the following test

assert_equal 2, original_count
# test 'ignores working periods that already exist' do
# add_auth_header
# payload = repeating_payload
# response = JSON(post(:create, payload).body)
# part_id = response['id']
# original_count = InterventionParticipation.find(part_id).working_periods.count

part_id = JSON(post(:create, payload).body)['id']
new_count = InterventionParticipation.find(part_id).working_periods.count
# part_id = JSON(post(:create, payload).body)['id']
# new_count = InterventionParticipation.find(part_id).working_periods.count

assert_equal original_count, new_count
end
# assert_equal original_count, new_count
# end

test 'ignores overlapping working periods' do
add_auth_header
Expand Down
Loading

0 comments on commit b7cff03

Please sign in to comment.