File: regen_fixtures.sh

package info (click to toggle)
ruby-rspec 3.12.0c0e1m1s0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,752 kB
  • sloc: ruby: 69,818; sh: 1,861; makefile: 99
file content (39 lines) | stat: -rwxr-xr-x 650 bytes parent folder | download | duplicates (6)
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
#!/bin/bash

# This script likely won't work as is for you, but is a good template for
# iterating over all rubies and regenerating HTML fixtures.

set -e

source /usr/local/share/chruby/chruby.sh

function switch_ruby() {
  chruby $1
}

function regen() {
  bundle check || bundle install
  GENERATE=1 bundle exec rspec ./spec/rspec/core/formatters/ || true
}

for ruby in \
  jruby-1.7.9 \
  1.9.3-p392 \
  2.0.0-p247 \
  2.1.0-p0 \
  rbx-2.2.3 \
  ree-1.8.7-2012.02;
do
  switch_ruby $ruby
  ruby -v
  if [ $(echo $ruby | grep jruby) ]
  then
    export JRUBY_OPTS=--1.8
    regen
    export JRUBY_OPTS=--1.9
    regen
  else
    regen
  fi
done