-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1255 from zestedesavoir/master
copie sur la branche prod
- Loading branch information
Showing
152 changed files
with
3,603 additions
and
1,358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,58 @@ | ||
git: | ||
depth: 1 | ||
|
||
language: python | ||
|
||
python: | ||
- "2.7" | ||
- 2.7 | ||
|
||
notifications: | ||
irc: | ||
channels: | ||
- "irc.smoothirc.net#zds-dev" | ||
- irc.smoothirc.net#zds-dev | ||
skip_join: true | ||
|
||
cache: | ||
- apt | ||
- pip | ||
|
||
install: | ||
- "sudo apt-get update" | ||
- "sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections" | ||
- "sudo apt-get install ttf-mscorefonts-installer" | ||
- "sudo apt-get install texlive" | ||
- "sudo apt-get install texlive-xetex" | ||
- "sudo apt-get install texlive-lang-french" | ||
- "sudo apt-get install texlive-latex-extra" | ||
- "sudo mkdir -p ~/cabal/bin" | ||
- "sudo mkdir -p ~/.pandoc" | ||
- "sudo wget -P ~/cabal/bin https://dl.dropboxusercontent.com/u/18967337/pandoc" | ||
- "sudo wget -P ~/.pandoc/templates https://dl.dropboxusercontent.com/u/14517385/dev/default.epub" | ||
- "sudo wget -P ~/.pandoc/templates https://dl.dropboxusercontent.com/u/14517385/dev/default.html" | ||
- "sudo touch ~/.pandoc/epub.css" | ||
- "sudo touch ~/.pandoc/templates/epub.css" | ||
- "sudo chmod u+x,g+x,o+x ~/cabal/bin/pandoc" | ||
- "export PATH=$PATH:~/cabal/bin" | ||
- "sudo ~/cabal/bin/pandoc --version" | ||
- "sudo apt-get --reinstall install -qq language-pack-fr" | ||
- "pip install -r requirements.txt" | ||
- "pip install coveralls" | ||
# APT Stuff | ||
- sudo apt-get update | ||
- sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | ||
- sudo apt-get install ttf-mscorefonts-installer | ||
- sudo apt-get install texlive | ||
- sudo apt-get install texlive-xetex | ||
- sudo apt-get install texlive-lang-french | ||
- sudo apt-get install texlive-latex-extra | ||
|
||
# Cabal + Pandoc stuff | ||
- sudo mkdir -p ~/cabal/bin | ||
- sudo mkdir -p ~/.pandoc | ||
- sudo wget -P ~/cabal/bin https://dl.dropboxusercontent.com/u/18967337/pandoc | ||
- sudo wget -P ~/.pandoc/templates https://dl.dropboxusercontent.com/u/14517385/dev/default.epub | ||
- sudo wget -P ~/.pandoc/templates https://dl.dropboxusercontent.com/u/14517385/dev/default.html | ||
- sudo touch ~/.pandoc/epub.css | ||
- sudo touch ~/.pandoc/templates/epub.css | ||
- sudo chmod u+x,g+x,o+x ~/cabal/bin/pandoc | ||
- export PATH=$PATH:~/cabal/bin | ||
- sudo ~/cabal/bin/pandoc --version | ||
- sudo apt-get --reinstall install -qq language-pack-fr | ||
|
||
# Python dependencies | ||
- travis_retry pip install -r requirements.txt | ||
- travis_retry pip install coveralls | ||
|
||
# NodeJS + NPM stuff | ||
- "sudo add-apt-repository -y ppa:chris-lea/node.js" | ||
- "sudo apt-get -y update" | ||
- "sudo apt-get -y install nodejs" | ||
- "npm install -g bower gulp" | ||
- "npm install" | ||
- sudo add-apt-repository -y ppa:chris-lea/node.js | ||
- sudo apt-get -y update | ||
- sudo apt-get -y install nodejs | ||
- npm install -g bower gulp | ||
- npm install | ||
|
||
script: | ||
- npm run-script travis | ||
- coverage run --source='.' manage.py test | ||
|
||
after_success: | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,47 @@ | ||
(function(window, document, undefined) { | ||
// Google Analytics ID | ||
var gaProperty = "UA-27730868-1"; | ||
/* ===== Zeste de Savoir ==================================================== | ||
Manage tracking cookies message | ||
--------------------------------- | ||
Authors: Sandhose | ||
Alex-D / Alexandre Demode | ||
========================================================================== */ | ||
|
||
(function(document, undefined) { | ||
var $banner = $("#cookies-banner"); | ||
|
||
// Disable tracking if the opt-out cookie exists. | ||
var disableStr = "ga-disable-" + gaProperty; | ||
if(document.cookie.indexOf("hasconsent=true") > -1){ | ||
window[disableStr] = false; | ||
} else if(document.cookie.indexOf("hasconsent=false") > -1){ | ||
window[disableStr] = true; | ||
} else { | ||
$banner.show(); | ||
function checkHasConsent(){ | ||
if(document.cookie.indexOf("hasconsent=true") > -1){ | ||
$("#gtm").after( | ||
"<script>" + | ||
"dataLayer = [{'gaTrackingId': 'UA-27730868-1'}];" + | ||
"(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':" + | ||
"new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0]," + | ||
"j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=" + | ||
"'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);" + | ||
"})(window,document,'script','dataLayer','GTM-WH7642');" + | ||
"</script>" | ||
); | ||
} else if(document.cookie.indexOf("hasconsent=false") === -1){ | ||
// Accept for the next page | ||
setHasConsent(true); | ||
|
||
// Show the banner | ||
$banner.show(); | ||
} | ||
} | ||
checkHasConsent(); | ||
|
||
function sethasconsent(hasconsent){ | ||
|
||
function setHasConsent(hasconsent){ | ||
document.cookie = "hasconsent="+hasconsent+"; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/"; | ||
window[disableStr] = !hasconsent; | ||
$banner.slideUp(200); | ||
} | ||
|
||
$("#reject-cookies").on("click", function(){ | ||
sethasconsent(false); | ||
setHasConsent(false); | ||
$banner.slideUp(200); | ||
}); | ||
|
||
$("#accept-cookies").on("click", function(){ | ||
sethasconsent(true); | ||
checkHasConsent(); | ||
$banner.slideUp(200); | ||
}); | ||
})(window, document); | ||
})(document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.