diff --git a/.travis.yml b/.travis.yml index e38afa9..4fa9c43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,26 @@ +language: ruby + sudo: required + +dist: buster + +rvm: + - 2.4.6 + services: - docker +cache: + directories: + - vendor/.bundle + install: - docker build . -t mapknitter-exporter:latest + - sudo ./scripts/install-deps.sh + - bundle install --path vendor/.bundle -script: - docker run mapknitter-exporter bundle exec rspec +jobs: + include: + - name: "Exporter Tests" + script: bundle exec rspec + - name: "Docker Build" + script: docker build . -t lib-mapknitter-exporter:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e0ba9e3..aa7a966 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,17 @@ FROM debian:buster MAINTAINER Sebastian Silva # Install the application. -RUN apt-get update -qq && apt-get install -y gdal-bin ruby imagemagick ruby-sinatra ruby-kramdown ruby-nokogiri bundler git python-gdal +RUN apt-get update -qq && \ + apt-get install -y \ + gdal-bin \ + ruby \ + zlib1g-dev \ + imagemagick \ + ruby-sinatra \ + ruby-kramdown \ + ruby-nokogiri \ + bundler \ + python-gdal # Configure ImageMagick COPY ./nolimit.xml /etc/ImageMagick-6/policy.xml diff --git a/Gemfile b/Gemfile index ee391f7..c0eeeff 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ # limitations under the License. -gem "sinatra" +gem "sinatra", "2.0.8.1" gem "sinatra-cors" gem "nokogiri" diff --git a/Gemfile.lock b/Gemfile.lock index 5b5e0b1..e4be2c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,13 +54,14 @@ GEM mini_portile2 (2.4.0) multi_json (1.13.1) multipart-post (2.0.0) - mustermann (1.0.3) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) nokogiri (1.10.0) mini_portile2 (~> 2.4.0) os (1.0.1) public_suffix (3.0.3) rack (2.0.7) - rack-protection (2.0.5) + rack-protection (2.0.8.1) rack rack-test (1.1.0) rack (>= 1.0, < 3) @@ -82,18 +83,19 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) + ruby2_keywords (0.0.2) signet (0.11.0) addressable (~> 2.3) faraday (~> 0.9) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - sinatra (2.0.5) + sinatra (2.0.8.1) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.5) + rack-protection (= 2.0.8.1) tilt (~> 2.0) sinatra-cors (1.1.0) - tilt (2.0.9) + tilt (2.0.10) uber (0.1.0) PLATFORMS @@ -106,7 +108,7 @@ DEPENDENCIES nokogiri rack-test rspec - sinatra + sinatra (= 2.0.8.1) sinatra-cors BUNDLED WITH diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh new file mode 100755 index 0000000..6de81ef --- /dev/null +++ b/scripts/install-deps.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +apt-get update -qq && \ +apt-get install -y \ + gdal-bin \ + python-gdal \ + ruby-kramdown \ + ruby-nokogiri \ + imagemagick