forked from kojiwakayama/box-nodejs-ruby-sass
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwercker-box.yml
More file actions
116 lines (107 loc) · 2.86 KB
/
wercker-box.yml
File metadata and controls
116 lines (107 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name : nodejs-ruby-sass
version : 0.0.9
inherits : wercker/ubuntu12.04-nodejs0.10@1.5.0
type : main
platform : ubuntu@12.04
packages :
- nodejs@0.12.2
- ruby@2.2.2
keywords:
- ruby
- nodejs
- sass
- scss-lint
script: |
#nodejs
export NODEVERSION=0.12.4
sudo apt-get update
sudo apt-get install wget build-essential
cd $HOME
mkdir nodeinstall
cd nodeinstall
wget http://nodejs.org/dist/v$NODEVERSION/node-v$NODEVERSION.tar.gz
# wget http://nodejs.org/dist/node-latest.tar.gz # latest version of node.
tar xzf node-v$NODEVERSION.tar.gz
cd node-v$NODEVERSION
./configure
make
sudo make install
cd $HOME
rm -fr nodeinstall
node -v
# Ruby
export RUBYVERSION=2.2.2
sudo apt-get update
sudo apt-get install git zlib1g-dev libreadline-dev libqtwebkit-dev
sudo apt-get remove ruby1.9.1
cd $HOME
mkdir rubyinstall
cd rubyinstall
wget ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-$RUBYVERSION.tar.gz
tar xzvf ruby-$RUBYVERSION.tar.gz
cd ruby-$RUBYVERSION
./configure --with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/include/openssl
make
make test
sudo make install
cd $HOME
rm -fr rubyinstall
echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc
# GraphicsMagick
cd $HOME
mkdir gminstall
export GMVERSION=1.3.21
cd gminstall
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-$GMVERSION.tar.gz
tar xzvf GraphicsMagick-$GMVERSION.tar.gz
cd GraphicsMagick-$GMVERSION
./configure
make
sudo make install
cd $HOME
rm -fr gminstall
gm version
# Bundler
sudo gem install bundler -v "1.9.9"
# Sass
sudo gem install sass -v "3.4.13"
# Scss-lint
sudo gem install scss-lint -v "0.24.1"
echo "RACK_ENV=test" | sudo tee -a /etc/environment
box-detect:
priority : 150
version :
detect:
- inFiles:
- Gemfile : ruby "2.2.2"
default-build:
ruby:
priority : 50
detect:
- default: true
text-to-append: |
# Build definition
build:
# The steps that will be executed on build
# See the Ruby section on the wercker devcenter:
# http://devcenter.wercker.com/articles/languages/ruby.html
steps:
# A step that executes `bundle install` command
- bundle-install
- npm install
- npm test
- script:
name: install bower
code: sudo npm install bower -g
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: echo ruby information
code: |
echo "ruby version $(ruby --version) running"
echo "from location $(which ruby)"
echo -p "gem list: $(gem list)"
# Add more steps here:
#- script:
# name: rspec
# code: bundle exec rspec