Skip to content

Commit

Permalink
utilisation de bundler pour dépendances ruby
Browse files Browse the repository at this point in the history
Permet d'être sur d'utiliser tous la même version de sass.
  • Loading branch information
agallou committed Feb 28, 2014
1 parent dc44614 commit 2b5c2d7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .build.yml
Expand Up @@ -7,11 +7,11 @@ build:
- apt-get install -y nodejs
- npm install -g grunt-cli
- npm install -g bower
- gem install sass
- composer install --no-interaction --ansi --no-progress
- php app/console doctrine:database:create
- php app/console doctrine:schema:update --force
- npm install
- bundle install
- bower install --allow-root
- php app/console doctrine:fixtures:load --fixtures=src/Afup/BarometreBundle/DataTest/ORM/ -n
- grunt
5 changes: 5 additions & 0 deletions Gemfile
@@ -0,0 +1,5 @@
source "https://rubygems.org"

ruby "1.9.3"

gem "sass"
10 changes: 10 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,10 @@
GEM
remote: https://rubygems.org/
specs:
sass (3.2.14)

PLATFORMS
ruby

DEPENDENCIES
sass
3 changes: 2 additions & 1 deletion Gruntfile.js
Expand Up @@ -37,7 +37,8 @@ module.exports = function(grunt) {
sass: {
dist{
options: {
style: 'expanded'
style: 'expanded',
bundleExec: true
},
src'src/Afup/BarometreBundle/Resources/assets/sass/main.scss',
dest : 'app/cache/grunt/main.css'
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -11,17 +11,17 @@ Ce site a pour vocation de présenter les résultats de cette enquête en permet
Dépendances
-----------

* [bower](http://bower.io/)
* [grunt](http://gruntjs.com/)
* [sass](http://sass-lang.com/)
* node / npm
* ruby > 1.9.3 / bundler

Installation
------------

```
php composer.phar install
bower install
npm install
bundle install
./node_modules/bower/bin/bower install
```

Build des assets
Expand Down
6 changes: 6 additions & 0 deletions app/config/deploy.rb
Expand Up @@ -10,6 +10,8 @@

set :model_manager, "doctrine"

set :bundler_bin, "/usr/local/bin/bundler"

set :use_sudo, false
set :keep_releases, 3
set :use_composer, true
Expand Down Expand Up @@ -43,6 +45,10 @@

namespace :barometre do
task :assets_build do
capifony_pretty_print "--> Installing Ruby dependencies"
invoke_command "cd #{latest_release} && {#bundler_bin} install", :via => run_method
capifony_puts_ok

capifony_pretty_print "--> Installing Node dependencies"
invoke_command "cd #{latest_release} && npm install", :via => run_method
capifony_puts_ok
Expand Down

0 comments on commit 2b5c2d7

Please sign in to comment.