<commit_before>require "serverspec"
require "docker-api"

describe "Dockerfile" do

  image = ::Docker::Image.build_from_dir( '.', 't' => 'hyperdev-base:latest') do |v|
    if (log = JSON.parse(v)) && log.has_key?("stream")
      $stdout.puts log["stream"]
    end
  end

  set :os, family: :debian
  set :backend, :docker
  set :docker_image, image.id

  it "Installs the correct OS release" do
    expect(file("/etc/lsb-release")).to contain("DISTRIB_ID=Ubuntu")
    expect(file("/etc/lsb-release")).to contain("DISTRIB_RELEASE=16.04")
  end

  it "Creates the app user" do
    expect(user("app")).to exist
  end

  it "Installs toolchain and libraries" do
    %w[
      autoconf
      automake
      binutils
      bison
      bzip2
      curl
      flex bison
      g++
      gcc
      git
      golang<commit_msg>Updated spec to use correct repository name<commit_after>require "serverspec"
require "docker-api"

describe "Dockerfile" do

  image = ::Docker::Image.build_from_dir( '.', 't' => 'fogcreek/hyperdev-base:latest') do |v|
    if (log = JSON.parse(v)) && log.has_key?("stream")
      $stdout.puts log["stream"]
    end
  end

  set :os, family: :debian
  set :backend, :docker
  set :docker_image, image.id

  it "Installs the correct OS release" do
    expect(file("/etc/lsb-release")).to contain("DISTRIB_ID=Ubuntu")
    expect(file("/etc/lsb-release")).to contain("DISTRIB_RELEASE=16.04")
  end

  it "Creates the app user" do
    expect(user("app")).to exist
  end

  it "Installs toolchain and libraries" do
    %w[
      autoconf
      automake
      binutils
      bison
      bzip2
      curl
      flex bison
      g++
      gcc
      git
      golang
{'fraction_non_alphanumeric': 0.1319402985074627, 'fraction_numerical': 0.005970149253731343, 'mean_word_length': 2.82648401826484, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4188352', 'n_tokens_mistral': 614, 'n_tokens_neox': 579, 'n_words': 147}