Skip to content

Commit 4265f86

Browse files
committed
Remove custom caching and use Bundle for gems.
1 parent dcc2b8a commit 4265f86

12 files changed

+65
-348
lines changed

.travis.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1+
sudo: required
2+
dist: trusty
13
language: node_js
24
git:
35
depth: 10
46
node_js:
57
- "0.12"
68
before_install:
7-
- travis_retry sudo pip install -r test-infra/requirements.txt
8-
- rvm install 2.0.0
9-
- rvm use 2.0.0 --fuzzy
10-
- export GEMDIR=$(rvm gemdir)
11-
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION rouge=$ROUGE_VERSION" > pseudo_Gemfile.lock; fi
9+
# Remove ./node_modules/.bin from PATH so node-which doesn't replace Unix which and cause RVM to barf. See https://github.com/travis-ci/travis-ci/issues/5092
10+
- export PATH=$(python -c 'from sys import argv;from collections import OrderedDict as od;print(":".join(od((p,None) for p in argv[1].split(":") if p.startswith("/")).keys()))' "$PATH")
11+
- rvm install 2.2
12+
- rvm use 2.2 --fuzzy
1213
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
1314
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true
1415
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
1516
- if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then export TWBS_DO_VALIDATOR=0; fi
1617
install:
18+
- bundle install --deployment --jobs=1
19+
- cp grunt/npm-shrinkwrap.json ./
1720
- npm install -g grunt-cli
18-
- ./test-infra/s3_cache.py download npm-modules
19-
- if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py download rubygems; fi
20-
after_script:
21-
- if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ] && [ "$TWBS_TEST" = core ]; then ./test-infra/s3_cache.py upload npm-modules; fi
22-
- if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ] && [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py upload rubygems; fi
21+
- npm install
22+
cache:
23+
directories:
24+
- node_modules
25+
- vendor/bundle
2326
env:
2427
global:
25-
- JEKYLL_VERSION="3.0.0"
26-
- ROUGE_VERSION="1.10.1"
28+
- NPM_CONFIG_PROGRESS="false"
2729
- SAUCE_USERNAME="bootstrap"
2830
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
2931
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="

Gemfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://rubygems.org'
2+
3+
group :development, :test do
4+
gem 'jekyll', '~> 3.1.2'
5+
end

Gemfile.lock

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
colorator (0.1)
5+
ffi (1.9.10-x64-mingw32)
6+
jekyll (3.1.2)
7+
colorator (~> 0.1)
8+
jekyll-sass-converter (~> 1.0)
9+
jekyll-watch (~> 1.1)
10+
kramdown (~> 1.3)
11+
liquid (~> 3.0)
12+
mercenary (~> 0.3.3)
13+
rouge (~> 1.7)
14+
safe_yaml (~> 1.0)
15+
jekyll-sass-converter (1.4.0)
16+
sass (~> 3.4)
17+
jekyll-watch (1.3.1)
18+
listen (~> 3.0)
19+
kramdown (1.10.0)
20+
liquid (3.0.6)
21+
listen (3.0.6)
22+
rb-fsevent (>= 0.9.3)
23+
rb-inotify (>= 0.9.7)
24+
mercenary (0.3.5)
25+
rb-fsevent (0.9.7)
26+
rb-inotify (0.9.7)
27+
ffi (>= 0.5.0)
28+
rouge (1.10.1)
29+
safe_yaml (1.0.4)
30+
sass (3.4.21)
31+
32+
PLATFORMS
33+
x64-mingw32
34+
35+
DEPENDENCIES
36+
jekyll (~> 3.1.2)
37+
38+
BUNDLED WITH
39+
1.11.2

Gruntfile.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ module.exports = function (grunt) {
301301

302302
jekyll: {
303303
options: {
304-
config: '_config.yml'
304+
bundleExec: true,
305+
config: '_config.yml',
306+
incremental: false
305307
},
306308
docs: {},
307309
github: {
@@ -501,7 +503,7 @@ module.exports = function (grunt) {
501503
if (err) {
502504
grunt.fail.warn(err);
503505
}
504-
var dest = 'test-infra/npm-shrinkwrap.json';
506+
var dest = 'grunt/npm-shrinkwrap.json';
505507
fs.renameSync('npm-shrinkwrap.json', dest);
506508
grunt.log.writeln('File ' + dest.cyan + ' updated.');
507509
done();

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ Bootstrap's documentation, included in this repo in the root directory, is built
8080

8181
### Running documentation locally
8282

83-
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v3.0.x).
83+
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) and other Ruby dependencies with `bundle install`.
8484
**Note for Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
85-
2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
86-
3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
85+
2. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in the command line.
8786
4. Open `http://localhost:9001` in your browser, and voilà.
8887

8988
Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).

docs/_includes/getting-started/grunt.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h3><code>grunt test</code> (Run tests)</h3>
2525
<p>Runs <a href="http://jshint.com">JSHint</a> and runs the <a href="http://qunitjs.com">QUnit</a> tests headlessly in <a href="http://phantomjs.org">PhantomJS</a>.</p>
2626

2727
<h3><code>grunt docs</code> (Build &amp; test the docs assets)</h3>
28-
<p>Builds and tests CSS, JavaScript, and other assets which are used when running the documentation locally via <code>jekyll serve</code>.</p>
28+
<p>Builds and tests CSS, JavaScript, and other assets which are used when running the documentation locally via <code>bundle exec jekyll serve</code>.</p>
2929

3030
<h3><code>grunt</code> (Build absolutely everything and run tests)</h3>
3131
<p>Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator against the docs, regenerates the Customizer assets, and more. Requires <a href="http://jekyllrb.com/docs/installation/">Jekyll</a>. Usually only necessary if you're hacking on Bootstrap itself.</p>
File renamed without changes.

test-infra/README.md

-118
This file was deleted.

test-infra/S3Cachefile.json

-12
This file was deleted.

test-infra/requirements.txt

-1
This file was deleted.

0 commit comments

Comments
 (0)