Skip to content

Commit

Permalink
Tweak Dockerfile back towards original
Browse files Browse the repository at this point in the history
  • Loading branch information
ransombriggs committed Oct 2, 2024
1 parent 6465f49 commit 83e6a47
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gemfile.lock
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV BUNDLER_VERSION=2.5.11
RUN gem install bundler -v ${BUNDLER_VERSION} -i /usr/local/lib/ruby/gems/$(ls /usr/local/lib/ruby/gems) --force

WORKDIR /srv

COPY Gemfile doorkeeper.gemspec /srv/
COPY lib/doorkeeper/version.rb /srv/lib/doorkeeper/version.rb

# This is a fix for sqlite alpine issues
RUN bundle config force_ruby_platform true
RUN bundle install

COPY . /srv/

RUN chown -R doorkeeper:doorkeeper /srv
RUN chown -R doorkeeper:doorkeeper /srv/coverage /srv/spec/dummy/tmp /srv/spec/generators/tmp

# Set the running user for resulting container
USER doorkeeper

RUN mkdir -p /srv/.local/gem/share
ENV GEM_HOME=/srv/.local/gem/share

ENV BUNDLER_VERSION=2.5.11
RUN gem install bundler -v ${BUNDLER_VERSION}

# This is a fix for sqlite alpine issues
RUN bundle config force_ruby_platform true
RUN bundle install

CMD ["bundle", "exec", "rake"]
CMD ["rake"]
13 changes: 6 additions & 7 deletions spec/requests/endpoints/authorization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@

scenario "raises exception on forged requests" do
allowing_forgery_protection do
expect do
page.driver.post authorization_endpoint_url(
client_id: @client.uid,
redirect_uri: @client.redirect_uri,
response_type: "code",
)
end.to raise_error(ActionController::InvalidAuthenticityToken)
page.driver.post authorization_endpoint_url(
client_id: @client.uid,
redirect_uri: @client.redirect_uri,
response_type: "code",
)
expect(page).to have_http_status(422)
end
end
end
Expand Down

0 comments on commit 83e6a47

Please sign in to comment.