diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 73143937..4ceda594 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -22,17 +22,17 @@ jobs: - uses: actions/checkout@v1 - run: bash -x script/cibuild 2.7 mysql - test26postgres: + test27postgres: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.6 postgres + - run: bash -x script/cibuild 2.7 postgres - test26sqlite: + test27sqlite: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.6 sqlite + - run: bash -x script/cibuild 2.7 sqlite # - run: bash -x script/cibuild 2.5 postgres # - run: bash -x script/cibuild 2.7 postgres diff --git a/Dockerfile b/Dockerfile index bf82d720..303b86b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6 +FROM ruby:2.7.1 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 diff --git a/Dockerfile-2.5 b/Dockerfile-2.5 index a3fb50a1..f453241e 100644 --- a/Dockerfile-2.5 +++ b/Dockerfile-2.5 @@ -1,4 +1,4 @@ -FROM ruby:2.5 +FROM ruby:2.5.7 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 @@ -7,14 +7,14 @@ WORKDIR /app RUN touch /etc/app-env -COPY Gemfile* /app/ -RUN gem install bundler -RUN bundle install --jobs 4 - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN apt-get update && apt-get install -y yarn +COPY Gemfile* /app/ +RUN gem install bundler +RUN bundle install --jobs 4 + RUN mkdir /app/log COPY . /app/ diff --git a/Dockerfile-2.7 b/Dockerfile-2.6 similarity index 97% rename from Dockerfile-2.7 rename to Dockerfile-2.6 index a68b373d..0bef7e0e 100644 --- a/Dockerfile-2.7 +++ b/Dockerfile-2.6 @@ -1,4 +1,4 @@ -FROM ruby:2.7 +FROM ruby:2.6.5 # throw errors if Gemfile has been modified since Gemfile.lock RUN bundle config --global frozen 1 @@ -7,14 +7,14 @@ WORKDIR /app RUN touch /etc/app-env -COPY Gemfile* /app/ -RUN gem install bundler -RUN bundle install --jobs 4 - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN apt-get update && apt-get install -y yarn +COPY Gemfile* /app/ +RUN gem install bundler +RUN bundle install --jobs 4 + RUN mkdir /app/log COPY . /app/ diff --git a/Gemfile.lock b/Gemfile.lock index b43051bb..ed10b406 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,7 +76,7 @@ GEM acts_as_list (1.0.2) activerecord (>= 4.2) ast (2.4.1) - autoprefixer-rails (10.0.1.0) + autoprefixer-rails (10.1.0.0) execjs backport (1.1.2) bcrypt (3.1.16) @@ -105,7 +105,7 @@ GEM diff-lcs (1.4.4) docile (1.3.2) e2mmap (0.1.0) - erubi (1.9.0) + erubi (1.10.0) execjs (2.7.0) factory_bot (6.1.0) activesupport (>= 5.0.0) @@ -142,7 +142,7 @@ GEM listen (3.3.3) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.7.0) + loofah (2.8.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -153,7 +153,7 @@ GEM method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2020.0512) + mime-types-data (3.2020.1104) mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.4.0) @@ -164,7 +164,7 @@ GEM nio4r (2.5.4) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - nokogumbo (2.0.2) + nokogumbo (2.0.4) nokogiri (~> 1.8, >= 1.8.4) paperclip (6.1.0) activemodel (>= 4.2.0) @@ -172,11 +172,11 @@ GEM mime-types mimemagic (~> 0.3.0) terrapin (~> 0.6.0) - parallel (1.19.2) + parallel (1.20.1) parser (2.7.2.0) ast (~> 2.4.1) pg (1.2.3) - puma (5.1.0) + puma (5.1.1) nio4r (~> 2.0) rack (2.2.3) rack-mini-profiler (2.2.0) @@ -224,7 +224,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) ref (2.0.0) - regexp_parser (1.8.2) + regexp_parser (2.0.0) reverse_markdown (2.0.0) nokogiri rexml (3.2.4) @@ -241,7 +241,7 @@ GEM rubocop-ast (>= 0.6.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.8.0) + rubocop-ast (1.3.0) parser (>= 2.7.1.5) ruby-progressbar (1.10.1) safe_yaml (1.0.5) @@ -286,7 +286,7 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - terminal-table (1.8.0) + terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) @@ -300,7 +300,7 @@ GEM rails (>= 5.0) safe_yaml (>= 0.8.6) sassc - tzinfo (1.2.7) + tzinfo (1.2.8) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) @@ -311,7 +311,7 @@ GEM websocket-extensions (0.1.5) will_paginate (3.3.0) yard (0.9.25) - zeitwerk (2.4.1) + zeitwerk (2.4.2) PLATFORMS ruby diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 863086a0..57090b8f 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -907,7 +907,7 @@ end def find_todos_with_tag_expr(tag_expr) # optimize for the common case: selecting only one tag if @single_tag - tag = Tag.where(:name => @tag_name).first + tag = current_user.tags.where(:name => @tag_name).first tag_id = tag.nil? ? -1 : tag.id return current_user.todos.with_tag(tag_id) end diff --git a/test-envs/docker-compose-2.6-mysql.yml b/test-envs/docker-compose-2.6-mysql.yml index 67e67f17..8af77f50 100644 --- a/test-envs/docker-compose-2.6-mysql.yml +++ b/test-envs/docker-compose-2.6-mysql.yml @@ -10,7 +10,7 @@ services: web: build: context: .. - dockerfile: Dockerfile + dockerfile: Dockerfile-2.6 environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-2.7-mysql.yml b/test-envs/docker-compose-2.7-mysql.yml index 58e433ff..67e67f17 100644 --- a/test-envs/docker-compose-2.7-mysql.yml +++ b/test-envs/docker-compose-2.7-mysql.yml @@ -10,7 +10,7 @@ services: web: build: context: .. - dockerfile: Dockerfile-2.7 + dockerfile: Dockerfile environment: # These are set in script/ci-build, so we need to pass-thru them. RAILS_ENV: $RAILS_ENV diff --git a/test-envs/docker-compose-2.6-postgres.yml b/test-envs/docker-compose-2.7-postgres.yml similarity index 100% rename from test-envs/docker-compose-2.6-postgres.yml rename to test-envs/docker-compose-2.7-postgres.yml diff --git a/test-envs/docker-compose-2.6-sqlite.yml b/test-envs/docker-compose-2.7-sqlite.yml similarity index 100% rename from test-envs/docker-compose-2.6-sqlite.yml rename to test-envs/docker-compose-2.7-sqlite.yml