Bundled rake as part of managed ruby dependencies of website.

While rake is available from the package manager on some flavors of
Linux, on e.g., macOS seems to currently only be available as a gem.
In order to provide a working website environment with minimal extra
configuration, bundle rake with bundler as well.

We also update the existing website tooling to use the now bundled
version of rake.

Review: https://reviews.apache.org/r/60652/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b153cb95
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b153cb95
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b153cb95

Branch: refs/heads/master
Commit: b153cb95d8911d88411953c5679ea8a1963d4fe9
Parents: 80b0571
Author: Benjamin Bannier <benjamin.bann...@mesosphere.io>
Authored: Wed Jul 5 15:25:57 2017 -0700
Committer: Vinod Kone <vinodk...@gmail.com>
Committed: Wed Jul 5 15:25:57 2017 -0700

----------------------------------------------------------------------
 site/Dockerfile   | 2 +-
 site/Gemfile      | 8 +++++---
 site/Gemfile.lock | 2 ++
 site/build.sh     | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b153cb95/site/Dockerfile
----------------------------------------------------------------------
diff --git a/site/Dockerfile b/site/Dockerfile
index 8ba0be0..230cfc7 100644
--- a/site/Dockerfile
+++ b/site/Dockerfile
@@ -3,7 +3,7 @@ MAINTAINER "d...@mesos.apache.org"
 
 LABEL Description="This image is used for generating Mesos web site from local 
sources and serving it on port 4567 (livereload on port 35729)."
 
-RUN yum install -y gcc-c++ make ruby ruby-devel rake doxygen 
java-1.7.0-openjdk-devel
+RUN yum install -y gcc-c++ make ruby ruby-devel doxygen 
java-1.7.0-openjdk-devel
 RUN gem install bundler
 
 ENV LANG en_US.UTF-8

http://git-wip-us.apache.org/repos/asf/mesos/blob/b153cb95/site/Gemfile
----------------------------------------------------------------------
diff --git a/site/Gemfile b/site/Gemfile
index 4dcd0a5..877fe91 100644
--- a/site/Gemfile
+++ b/site/Gemfile
@@ -5,8 +5,10 @@ gem 'middleman-livereload', '3.1.0'
 gem 'middleman-syntax', '1.2.1'
 gem 'middleman-blog', '3.5.1'
 
-gem "rdiscount", '2.1.7'
+gem 'rdiscount', '2.1.7'
 
-gem "htmlentities"
+gem 'htmlentities'
 
-gem "therubyracer"
\ No newline at end of file
+gem 'therubyracer'
+
+gem 'rake'

http://git-wip-us.apache.org/repos/asf/mesos/blob/b153cb95/site/Gemfile.lock
----------------------------------------------------------------------
diff --git a/site/Gemfile.lock b/site/Gemfile.lock
index fcfff00..909f3f3 100644
--- a/site/Gemfile.lock
+++ b/site/Gemfile.lock
@@ -84,6 +84,7 @@ GEM
       rack
     rack-test (0.6.3)
       rack (>= 1.0)
+    rake (12.0.0)
     rb-fsevent (0.10.2)
     rb-inotify (0.9.10)
       ffi (>= 0.5.0, < 2)
@@ -126,6 +127,7 @@ DEPENDENCIES
   middleman-blog (= 3.5.1)
   middleman-livereload (= 3.1.0)
   middleman-syntax (= 1.2.1)
+  rake
   rdiscount (= 2.1.7)
   therubyracer
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b153cb95/site/build.sh
----------------------------------------------------------------------
diff --git a/site/build.sh b/site/build.sh
index 11f15e1..06b1b32 100755
--- a/site/build.sh
+++ b/site/build.sh
@@ -20,9 +20,9 @@
 
 function exit_hook {
   # Remove generated documents when exit.
-  rake clean_docs
+  bundle exec rake clean_docs
 }
 
 trap exit_hook EXIT
 
-bundle install && rake && rake dev
\ No newline at end of file
+bundle install && bundle exec rake && bundle exec rake dev

Reply via email to