diff --git a/Dockerfile b/Dockerfile index 27c3111d..9e04a4c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,15 @@ -FROM crystallang/crystal:1.8.0 - -ARG sqlite_version=3110000 -ARG sqlite_version_year=2016 +FROM 84codes/crystal:latest-ubuntu-jammy # Install deps -RUN apt-get update -qq && apt-get install -y --no-install-recommends libpq-dev libmysqlclient-dev libsqlite3-dev wget unzip lib32z1 +RUN apt-get update -qq && apt-get install -y --no-install-recommends libpq-dev libmysqlclient-dev libsqlite3-dev WORKDIR /app/user -COPY shard.yml ./ +COPY shard.yml /app/user +COPY shard.lock /app/user RUN shards install -COPY . /app/user +COPY src /app/user/src +COPY spec /app/user/spec -RUN wget -O sqlite.zip https://www.sqlite.org/$sqlite_version_year/sqlite-tools-linux-x86-$sqlite_version.zip && unzip -d /usr/bin/ -j sqlite.zip && rm sqlite.zip +ENTRYPOINT [] diff --git a/docker/docker-compose.sqlite.yml b/docker/docker-compose.sqlite.yml index 97d5af5f..ca6e70df 100644 --- a/docker/docker-compose.sqlite.yml +++ b/docker/docker-compose.sqlite.yml @@ -1,14 +1,10 @@ version: '2' services: spec: - command: 'bash -c "cd /app/user && bin/ameba && crystal tool format --check && sqlite3 --version && crystal spec"' extends: file: ../docker-compose.yml service: spec build: context: ../ - args: - sqlite_version: ${SQLITE_VERSION} - sqlite_version_year: ${SQLITE_VERSION_YEAR} environment: CURRENT_ADAPTER: sqlite diff --git a/src/granite/querying.cr b/src/granite/querying.cr index 7185a14f..d508d46a 100644 --- a/src/granite/querying.cr +++ b/src/granite/querying.cr @@ -166,7 +166,7 @@ module Granite::Querying # ``` def reload {% if !@top_level.has_constant? "Spec" %} - raise "#reload is a convenience method for testing only, please use #find in your application code" + raise "#reload is a convenience method for testing only, please use #find in your application code" {% end %} self.class.find!(primary_key_value) end