diff --git a/Makefile b/Makefile index 7c48361..f736824 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -ci: run_tests prep_deployment_config +ci: build_docker_images run_tests + +build_docker_images: + docker build -t mojolingo/adam-snark-rabbit-basic-brain brain run_tests: - STANDALONE_DEPLOYMENT=true kitchen test + docker run -i mojolingo/adam-snark-rabbit-basic-brain /bin/bash -c "cd /app && bin/test" # Create chef solo config for deployment environments prep_deployment_config: diff --git a/Procfile b/Procfile index c8f3111..1c28e9d 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ memory: bin/memory -brain: bin/brain +brain: brain/bin/run diff --git a/bin/brain b/bin/brain deleted file mode 100755 index e922aae..0000000 --- a/bin/brain +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -cd brain && exec bundle exec ahn start . --no-console diff --git a/brain/.dockerignore b/brain/.dockerignore new file mode 100644 index 0000000..501e77d --- /dev/null +++ b/brain/.dockerignore @@ -0,0 +1 @@ +vendor/ruby diff --git a/brain/Dockerfile b/brain/Dockerfile new file mode 100644 index 0000000..45f03db --- /dev/null +++ b/brain/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:14.04 + +MAINTAINER Mojo Lingo LLC + +RUN apt-get update +RUN apt-get install -y software-properties-common +RUN apt-add-repository ppa:brightbox/ruby-ng +RUN apt-get update + +RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre3 libpcre3-dev libxml2 libxslt1-dev ruby2.1 ruby2.1-dev build-essential +RUN gem install bundler + +ADD . /app + +RUN cd /app && bundle install --deployment + +CMD /app/bin/run diff --git a/brain/bin/ahn b/brain/bin/ahn new file mode 100755 index 0000000..8c40526 --- /dev/null +++ b/brain/bin/ahn @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'ahn' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('adhearsion', 'ahn') diff --git a/brain/bin/autospec b/brain/bin/autospec new file mode 100755 index 0000000..64dcb9c --- /dev/null +++ b/brain/bin/autospec @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'autospec' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('rspec-core', 'autospec') diff --git a/brain/bin/coderay b/brain/bin/coderay new file mode 100755 index 0000000..5be1c00 --- /dev/null +++ b/brain/bin/coderay @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'coderay' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('coderay', 'coderay') diff --git a/brain/bin/guard b/brain/bin/guard new file mode 100755 index 0000000..0c1a532 --- /dev/null +++ b/brain/bin/guard @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'guard' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('guard', 'guard') diff --git a/brain/bin/htmldiff b/brain/bin/htmldiff new file mode 100755 index 0000000..c70e238 --- /dev/null +++ b/brain/bin/htmldiff @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'htmldiff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('diff-lcs', 'htmldiff') diff --git a/brain/bin/ldiff b/brain/bin/ldiff new file mode 100755 index 0000000..8e3524a --- /dev/null +++ b/brain/bin/ldiff @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'ldiff' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('diff-lcs', 'ldiff') diff --git a/brain/bin/nokogiri b/brain/bin/nokogiri new file mode 100755 index 0000000..d55f84b --- /dev/null +++ b/brain/bin/nokogiri @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'nokogiri' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('nokogiri', 'nokogiri') diff --git a/brain/bin/pry b/brain/bin/pry new file mode 100755 index 0000000..54678a3 --- /dev/null +++ b/brain/bin/pry @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'pry' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('pry', 'pry') diff --git a/brain/bin/rake b/brain/bin/rake new file mode 100755 index 0000000..26c7a2d --- /dev/null +++ b/brain/bin/rake @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'rake' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('rake', 'rake') diff --git a/brain/bin/rspec b/brain/bin/rspec new file mode 100755 index 0000000..0c86b5c --- /dev/null +++ b/brain/bin/rspec @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'rspec' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('rspec-core', 'rspec') diff --git a/brain/bin/run b/brain/bin/run new file mode 100755 index 0000000..d4502a3 --- /dev/null +++ b/brain/bin/run @@ -0,0 +1,2 @@ +#!/bin/bash +exec bin/ahn start . --no-console diff --git a/brain/bin/test b/brain/bin/test new file mode 100755 index 0000000..8ac9a2c --- /dev/null +++ b/brain/bin/test @@ -0,0 +1,2 @@ +#!/bin/bash +exec bin/rake diff --git a/brain/bin/thor b/brain/bin/thor new file mode 100755 index 0000000..8421e00 --- /dev/null +++ b/brain/bin/thor @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'thor' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('thor', 'thor')