<commit_before>FROM ubuntu:14.04
MAINTAINER <NAME> <<EMAIL>>

# Packages needed to install RVM and run Bundler gem commands
RUN apt-get update -qq \
  && apt-get -y install ca-certificates curl git-core --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Create guest user early (before rvm) so uid:gid are 1000:000
RUN useradd -m -s /bin/bash guest

# Temporarily install RVM as root - just for requirements
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys <KEY> \
  && curl -L get.rvm.io | bash -s stable \
  && bash -l -c 'rvm requirements 2.2.1' \
  && bash -l -c 'echo yes | rvm implode' \

# Fix locale
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg-reconfigure locales && locale-gen en_US.UTF-8 && /usr/sbin/update-locale LANG=en_US.UTF-8 \
   && echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8

USER guest
ENV HOME /home/guest
WORKDIR /home/guest

# Install RVM as guest
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys <KEY> \
  && /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" \
  && curl -L get.rvm.io | bash -s stable \
  && /bin/bash -l -c "rvm install 2.3.0 && rvm cleanup all" \
  && /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"

# Zsh (just for the sake of a handful of Cucumber scenarios)
RUN apt-get update -qq \
  && apt-get -y install zsh --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Python (just for the sake of a handful of Cucumber scenarios)
RUN apt-get update -qq \
  && apt-get -y install python --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Java (for javac - also for just a few Cucumber scenarios)
RUN apt-get update -qq \
  && apt-get -y install openjdk-7-jdk --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Cache needed gems - for faster test reruns
ADD Gemfile Gemfile.lock aruba.gemspec /home/guest/cache/aruba/
ADD lib/aruba/version.rb /home/guest/cache/aruba/lib/aruba/version.rb
RUN chown -R guest:guest /home/guest/cache
USER guest

# Actually download
RUN bash -l -c "cd cache/aruba && bundle install"

WORKDIR /home/guest/aruba<commit_msg>Change working directory via docker directive<commit_after>FROM ubuntu:14.04
MAINTAINER Aruba Maintainers <<EMAIL>>

# Packages needed to install RVM and run Bundler gem commands
RUN apt-get update -qq \
  && apt-get -y install ca-certificates curl git-core --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Create guest user early (before rvm) so uid:gid are 1000:000
RUN useradd -m -s /bin/bash guest

# Temporarily install RVM as root - just for requirements
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys <KEY> \
  && curl -L get.rvm.io | bash -s stable \
  && bash -l -c 'rvm requirements 2.2.1' \
  && bash -l -c 'echo yes | rvm implode' \

# Fix locale
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg-reconfigure locales && locale-gen en_US.UTF-8 && /usr/sbin/update-locale LANG=en_US.UTF-8 \
   && echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8

USER guest
ENV HOME /home/guest
WORKDIR /home/guest

# Install RVM as guest
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys <KEY> \
  && /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" \
  && curl -L get.rvm.io | bash -s stable \
  && /bin/bash -l -c "rvm install 2.3.0 && rvm cleanup all" \
  && /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"

# Zsh (just for the sake of a handful of Cucumber scenarios)
RUN apt-get update -qq \
  && apt-get -y install zsh --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Python (just for the sake of a handful of Cucumber scenarios)
RUN apt-get update -qq \
  && apt-get -y install python --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Java (for javac - also for just a few Cucumber scenarios)
RUN apt-get update -qq \
  && apt-get -y install openjdk-7-jdk --no-install-recommends \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin

# Cache needed gems - for faster test reruns
ADD Gemfile Gemfile.lock aruba.gemspec /home/guest/cache/aruba/
ADD lib/aruba/version.rb /home/guest/cache/aruba/lib/aruba/version.rb
RUN chown -R guest:guest /home/guest/cache
USER guest

# Download and install aruba + dependencies
WORKDIR /home/guest/cache
RUN bash -l -c "bundle install"

# Default working directory
WORKDIR /home/guest/aruba
{'fraction_non_alphanumeric': 0.15448275862068966, 'fraction_numerical': 0.009852216748768473, 'mean_word_length': 2.928792569659443, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6453011', 'n_tokens_mistral': 1988, 'n_tokens_neox': 1909, 'n_words': 543}