File: integration

package info (click to toggle)
ruby-d3-rails 3.5.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 136 kB
  • ctags: 7
  • sloc: sh: 24; ruby: 13; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 457 bytes parent folder | download
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
#!/bin/sh

exec 2>&1

set -ex

cd $ADTTMP

rails new sampleapp

cd sampleapp

tee --append Gemfile <<EOF
gem "d3_rails"
EOF

bundle --local

tee app/assets/javascripts/application.js <<EOF
//= require d3
EOF

rails generate controller home index

tee config/routes.rb <<EOF
Rails.application.routes.draw do
  root 'home#index'
end
EOF

rails console <<EOF
File.open('status.txt', 'w') do |f|
  f.puts(app.get('/'))
end
EOF

test "$(cat status.txt)" -eq 200