--- a/.hgignore Thu Nov 10 02:01:46 2016 +0100
+++ b/.hgignore Thu Nov 10 14:07:02 2016 +0100
@@ -54,7 +54,7 @@
^build/\.vagrant
^build/root
^build/root_puppet
-^build/dist/.*\.rpm
+^build/dist/.*
^dev2/
^common/corpus-common-addon/dist
^common/corpus-common-addon/tmp
--- a/build/build_rpm.sh Thu Nov 10 02:01:46 2016 +0100
+++ b/build/build_rpm.sh Thu Nov 10 14:07:02 2016 +0100
@@ -43,6 +43,7 @@
--rpm-user apache \
--rpm-group apache \
--directories /var/www/corpusdelaparole \
+ --before-install /vagrant/pre_install.sh \
--after-install /vagrant/post_install.sh \
--after-remove /vagrant/post_uninstall.sh \
--after-upgrade /vagrant/post_upgrade.sh \
--- a/build/post_install.sh Thu Nov 10 02:01:46 2016 +0100
+++ b/build/post_install.sh Thu Nov 10 14:07:02 2016 +0100
@@ -1,13 +1,36 @@
#!/usr/bin/env sh
+if [ -x /usr/local/bin/drush ]; then
+ echo "Reactivate corpus module"
+ /usr/local/bin/drush -r /var/www/corpusdelaparole/drupal pm-enable -y corpus
+ echo "Clear drupal cache"
+ /usr/local/bin/drush -r /var/www/corpusdelaparole/drupal cc all
+fi
+
+
if [ -d /var/www/corpusdelaparole/corpus-back/ ]; then
- pushd /var/www/corpusdelaparole/corpus-back/
+ pushd /var/www/corpusdelaparole/corpus-back/ > /dev/null
echo "Correcting file permissions for back office"
chgrp -R apache storage bootstrap/cache
chmod -R ug+rwx storage bootstrap/cache
- popd
+ echo "Migrating back office database"
+ php artisan migrate -n --force
+
+ echo "Optimizing framework"
+ php artisan optimize
+ php artisan config:cache
+ php artisan route:cache
+
+ echo "Correcting file permissions for back office"
+ chgrp -R apache storage bootstrap/cache
+ chmod -R ug+rwx storage bootstrap/cache
+
+ echo "Put back application in production"
+ php artisan up
+
+ popd > /dev/null
fi
--- a/build/pre_upgrade.sh Thu Nov 10 02:01:46 2016 +0100
+++ b/build/pre_upgrade.sh Thu Nov 10 14:07:02 2016 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
PATH=/opt/remi/php56/root/usr/bin/:$PATH
-if [ -d /var/www/corpusdelaparole/corpus-back/ ]; then
+if [ -f /var/www/corpusdelaparole/corpus-back/artisan ]; then
pushd /var/www/corpusdelaparole/corpus-back/ > /dev/null
echo "Put back application in maintenance"
--- a/cms/app-client/app/routes/tabs/chrono.js Thu Nov 10 02:01:46 2016 +0100
+++ b/cms/app-client/app/routes/tabs/chrono.js Thu Nov 10 14:07:02 2016 +0100
@@ -7,7 +7,6 @@
filter: Ember.inject.service(),
model: function() {
- console.log('model chrono', this.get('filter').get('queryParamsValues'));
return RSVP.hash({
range: [1948, 2015], // TODO: make it dynamic
datestats: this.get('store').query('datestat', this.get('filter').get('queryParamsValues'))
--- a/cms/app-client/app/templates/components/playlist-component.hbs Thu Nov 10 02:01:46 2016 +0100
+++ b/cms/app-client/app/templates/components/playlist-component.hbs Thu Nov 10 14:07:02 2016 +0100
@@ -2,7 +2,7 @@
<h2>Résultat <span class="count">({{ model.meta.total }})</span>{{#if isLoading}}<span class="document-spinner"><i class="fa fa-circle-o-notch fa-spin"></i></span>{{/if}}</h2>
<div class="pagination">
<i class="fa fa-step-backward{{if (eq model.meta.prev_page_url null) ' disabled'}}" {{action 'previous'}}></i>
- <span>{{page}} sur {{model.meta.last_page}}</span>
+ <span>page {{page}} sur {{model.meta.last_page}}</span>
<i class="fa fa-step-forward{{if (eq model.meta.next_page_url null) ' disabled'}}" {{action 'next'}}></i>
</div>
</div>
@@ -17,14 +17,14 @@
{{#if (ifAnd (eq player.playing true) (eq player.item document.id))}}
<i title="Pause" class="fa fa-pause" {{ action 'pause' bubbles=false }}>Pause</i>
{{else}}
- <i title="Play" class="fa fa-play" {{ action 'play' document.id bubbles=false }}>Play</i>
+ <i title="Lecture" class="fa fa-play" {{ action 'play' document.id bubbles=false }}>Lecture</i>
{{/if}}
</div>
<div>
<button title="Notice" {{action 'displayNotice' document.id bubbles=false}} class="notice{{if (ifAnd (eq player.window 'notice') (eq player.item document.id)) ' active'}}">
Notice
</button>
- <i title="Share notice" class="fa fa-share-alt playlist-share-button">Share notice</i>
+ <i title="Partage notice" class="fa fa-share-alt playlist-share-button">Partage notice</i>
</div>
</div>
<div class="meta">
--- a/dev/Vagrantfile Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/Vagrantfile Thu Nov 10 14:07:02 2016 +0100
@@ -75,7 +75,7 @@
# vb.memory = "1024"
# end
config.vm.provider "virtualbox" do |v|
- v.memory = 2048
+ v.memory = 1536
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
--- a/dev/provisioning/custom.yaml.tmpl Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/custom.yaml.tmpl Thu Nov 10 14:07:02 2016 +0100
@@ -1,6 +1,6 @@
---
# install handle
-sysconfig::params::install_handle : true
+sysconfig::params::install_handle : false
# Serveur hostname (ex: the first ip of the server : %{ipaddress_eth0})
sysconfig::params::vhost : "int.corpusdelaparole.huma-num.fr"
@@ -52,7 +52,7 @@
sysconfig::params::tomcat_open_port : false
# corpus application key 32 character random string (Array.new(32){"abcdefghijklmnopqrstuvwxyz0123456789!@#\$%^&*(-_=+)".split("").sample}.join )
-sysconfig::params::corpus_app_key :
+sysconfig::params::corpus_app_key : tiLahriethohd2Ceratheeb7Jai0xoog
# geonames user (c.f. http://www.geonames.org/login)
sysconfig::params::geonames_username : demo
--- a/dev/provisioning/default.pp Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/default.pp Thu Nov 10 14:07:02 2016 +0100
@@ -15,14 +15,15 @@
# install apache
class { 'sysconfig::apache': }
-# install php
-class { 'sysconfig::php': }
# install handle
if(hiera('sysconfig::params::install_handle', true)) {
class { 'sysconfig::handle': }
}
+# install php
+class { 'sysconfig::php': }->
+
# install drupal
class { 'sysconfig::drupal': }
--- a/dev/provisioning/modules/drush/manifests/cacheclear.pp Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/modules/drush/manifests/cacheclear.pp Thu Nov 10 14:07:02 2016 +0100
@@ -9,6 +9,7 @@
# Clear drush cache on demand.
exec { 'drush-cc-drush':
command => "${drush::drush_exe_default} cc drush",
+ environment => ["DRUSH_PHP=${drush::drush_php}"],
require => File[$drush::drush_exe_default],
refreshonly => true,
}
--- a/dev/provisioning/modules/drush/manifests/init.pp Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/modules/drush/manifests/init.pp Thu Nov 10 14:07:02 2016 +0100
@@ -80,6 +80,11 @@
$install_base_path = '/opt/drush'
$drush_exe_default = '/usr/local/bin/drush'
+ if($php_path) {
+ $drush_php = $php_path
+ } else {
+ $drush_php = "/usr/bin/php"
+ }
class{'drush::setup': } ->
class{'drush::config': } ~>
--- a/dev/provisioning/modules/sysconfig/files/rdf4j/console_commands.txt Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/modules/sysconfig/files/rdf4j/console_commands.txt Thu Nov 10 14:07:02 2016 +0100
@@ -4,16 +4,19 @@
Corpus repo
+
create native
corpus_raw
Corpus raw repo
+
create native
lexvo
Lexvo
+
open lexvo
load file:///tmp/lexvo/lexvo.rdf
quit
--- a/dev/provisioning/modules/sysconfig/manifests/elasticsearch.pp Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/modules/sysconfig/manifests/elasticsearch.pp Thu Nov 10 14:07:02 2016 +0100
@@ -8,7 +8,12 @@
exec { "systemd_restart_${es_instance}":
- command => '/bin/systemctl restart elasticsearch-${es_instance}',
+ command => "/bin/systemctl start elasticsearch-${es_instance}",
+ refreshonly => true,
+ }
+
+ exec { "systemd_enable_${es_instance}":
+ command => "/bin/systemctl enable elasticsearch-${es_instance}",
refreshonly => true,
}
@@ -16,6 +21,7 @@
manage_repo => true,
autoupgrade => true,
repo_version => '5.x',
+ status => 'unmanaged',
}->
elasticsearch::instance { $es_instance: }->
file { '$es_instance jvm.options':
@@ -50,6 +56,6 @@
owner => 'root',
group => 'root',
mode => '0750',
- notify => [Exec['systemctl-daemon-reload'], Exec["systemd_restart_${es_instance}"]]
+ notify => [Exec['systemctl-daemon-reload'], Exec["systemd_enable_${es_instance}"], Exec["systemd_restart_${es_instance}"]]
}
}
--- a/dev/provisioning/modules/sysconfig/manifests/rdf4j.pp Thu Nov 10 02:01:46 2016 +0100
+++ b/dev/provisioning/modules/sysconfig/manifests/rdf4j.pp Thu Nov 10 14:07:02 2016 +0100
@@ -46,6 +46,9 @@
file { "/tmp/rdf4j":
ensure => directory,
}->
+ package { "unzip":
+ ensure => present
+ }->
archive { 'rdf4j-2.1.1':
ensure => present,
url => "http://www.eclipse.org/downloads/download.php?file=/rdf4j/eclipse-rdf4j-2.1.1-sdk.zip&r=1",
@@ -79,7 +82,7 @@
notify => Service['tomcat']
}->
exec { "undeploy-rdf4j-tomcat":
- command => "/usr/bin/rm -f /var/lib/tomcat/webapps/openrdf-*.war && /bin/sleep 10",
+ command => "/usr/bin/rm -f /var/lib/tomcat/webapps/{openrdf,rdf4j}-*.war && /bin/sleep 10",
notify => Service['tomcat'],
path => "/usr/bin:/bin"
}->
--- a/server/src/app/Console/Commands/ImportCocoonRDF.php Thu Nov 10 02:01:46 2016 +0100
+++ b/server/src/app/Console/Commands/ImportCocoonRDF.php Thu Nov 10 14:07:02 2016 +0100
@@ -101,7 +101,8 @@
foreach ($recs as $item) {
$item->registerXPathNamespace('oai', "http://www.openarchives.org/OAI/2.0/");
- $identifier = (string) $item->xpath('/oai:record/oai:header/oai:identifier')[0];
+ $identifier = (string) $item->xpath('oai:header/oai:identifier')[0];
+
$docRdfUrl = Config::get('corpusparole.cocoon_rdf_base_uri').substr($identifier, strlen(Config::get('corpusparole.cocoon_doc_id_base')));
$message = "$identifier : $docRdfUrl";
if($recs->getNumRetrieved() <= $skip) {