frikandel 3.0.0 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/Dockerfile +31 -0
- data/.devcontainer/base.Dockerfile +43 -0
- data/.devcontainer/devcontainer.json +40 -0
- data/.github/workflows/ci.yml +19 -3
- data/README.md +3 -3
- data/frikandel.gemspec +2 -1
- data/gemfiles/rails-7.0.x.gemfile +7 -0
- data/lib/frikandel/version.rb +1 -1
- data/spec/dummy/log/test.log +822 -2286
- metadata +38 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d42d24cb0a06b01e6592564e93e11684c0b8c717e107764f77a01284379edaef
|
4
|
+
data.tar.gz: f54ad73ae3641f47847babb1ba397560422a05dfcf87243a4515db818fb28eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 867d39722958752513410306d7d4d7432f4985263cdfa45c84c92774ff8fcd029b3899afe6e52fffe348bdae69d58319299793d8ae6360e5d5752e86cd96d0c4
|
7
|
+
data.tar.gz: e4867b1f8dd9f3fd6c5d94a3e6ec925e2a9fd8db6f1fa3731e6c57d30f9f9fe9803e51e53f6240cda9817e05e67148db3d96a6072cb5790f0593c28f8b816312
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
|
2
|
+
ARG VARIANT=3-bullseye
|
3
|
+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
4
|
+
|
5
|
+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
6
|
+
ARG NODE_VERSION="none"
|
7
|
+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
8
|
+
|
9
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
10
|
+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
11
|
+
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
12
|
+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
13
|
+
&& apt-get -y install --no-install-recommends vim
|
14
|
+
|
15
|
+
# [Optional] Uncomment this line to install additional gems.
|
16
|
+
# RUN gem install <your-gem-names-here>
|
17
|
+
|
18
|
+
# [Optional] Uncomment this line to install global node packages.
|
19
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
20
|
+
|
21
|
+
# # Install exact ruby version and gems. NOTE: `rvm use` is necessary here, so
|
22
|
+
# # that the gems are detected as installed when using the VSCode Terminal later.
|
23
|
+
# # (Running `gem install` or `bundle install` without `rvm use` first, will
|
24
|
+
# # install the gems in a different directory than expected by rvm.)
|
25
|
+
# ARG EXACT_RUBY_VERSION=…
|
26
|
+
# RUN su vscode -c "source /usr/local/rvm/scripts/rvm && rvm install ruby ${EXACT_RUBY_VERSION}" 2>&1
|
27
|
+
# ARG BUNDLER_VERSION=…
|
28
|
+
# RUN su vscode -c "source /usr/local/rvm/scripts/rvm && rvm use ${EXACT_RUBY_VERSION} && gem install bundler:${BUNDLER_VERSION}" 2>&1
|
29
|
+
|
30
|
+
# NOTE: Set all the ARGs in `.devcontainer/devcontainer.json`, because some are
|
31
|
+
# already set that way.
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
|
2
|
+
ARG VARIANT=2-bullseye
|
3
|
+
FROM ruby:${VARIANT}
|
4
|
+
|
5
|
+
# Copy library scripts to execute
|
6
|
+
COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/
|
7
|
+
|
8
|
+
# [Option] Install zsh
|
9
|
+
ARG INSTALL_ZSH="true"
|
10
|
+
# [Option] Upgrade OS packages to their latest versions
|
11
|
+
ARG UPGRADE_PACKAGES="true"
|
12
|
+
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
|
13
|
+
ARG USERNAME=vscode
|
14
|
+
ARG USER_UID=1000
|
15
|
+
ARG USER_GID=$USER_UID
|
16
|
+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
17
|
+
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
|
18
|
+
&& apt-get purge -y imagemagick imagemagick-6-common \
|
19
|
+
# Install common packages, non-root user, rvm, core build tools
|
20
|
+
&& bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
|
21
|
+
&& bash /tmp/library-scripts/ruby-debian.sh "none" "${USERNAME}" "true" "true" \
|
22
|
+
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
23
|
+
|
24
|
+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
25
|
+
ARG NODE_VERSION="none"
|
26
|
+
ENV NVM_DIR=/usr/local/share/nvm
|
27
|
+
ENV NVM_SYMLINK_CURRENT=true \
|
28
|
+
PATH=${NVM_DIR}/current/bin:${PATH}
|
29
|
+
RUN bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${USERNAME}" \
|
30
|
+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
31
|
+
|
32
|
+
# Remove library scripts for final image
|
33
|
+
RUN rm -rf /tmp/library-scripts
|
34
|
+
|
35
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
36
|
+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
37
|
+
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
38
|
+
|
39
|
+
# [Optional] Uncomment this line to install additional gems.
|
40
|
+
# RUN gem install <your-gem-names-here>
|
41
|
+
|
42
|
+
# [Optional] Uncomment this line to install global node packages.
|
43
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/ruby
|
3
|
+
{
|
4
|
+
"name": "Ruby",
|
5
|
+
"build": {
|
6
|
+
"dockerfile": "Dockerfile",
|
7
|
+
"args": {
|
8
|
+
// Update 'VARIANT' to pick a Ruby version: 3, 3.1, 3.0, 2, 2.7, 2.6
|
9
|
+
// Append -bullseye or -buster to pin to an OS version.
|
10
|
+
// Use -bullseye variants on local on arm64/Apple Silicon.
|
11
|
+
"VARIANT": "3-bullseye",
|
12
|
+
// Options
|
13
|
+
"NODE_VERSION": "lts/*"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
|
17
|
+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/taktsoft/${localWorkspaceFolderBasename},type=bind,consistency=cached",
|
18
|
+
"workspaceFolder": "/workspaces/taktsoft/${localWorkspaceFolderBasename}",
|
19
|
+
|
20
|
+
// Set *default* container specific settings.json values on container create.
|
21
|
+
"settings": {},
|
22
|
+
|
23
|
+
// Add the IDs of extensions you want installed when the container is created.
|
24
|
+
"extensions": [
|
25
|
+
"rebornix.Ruby"
|
26
|
+
],
|
27
|
+
|
28
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
29
|
+
// "forwardPorts": [],
|
30
|
+
|
31
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
32
|
+
// "postCreateCommand": "ruby --version",
|
33
|
+
"postCreateCommand": "bundle install",
|
34
|
+
|
35
|
+
// NOTE: the safe.directory git config is needed with newer git versions and mounts in (dev)containers, cf. https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
|
36
|
+
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
|
37
|
+
|
38
|
+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
39
|
+
"remoteUser": "vscode"
|
40
|
+
}
|
data/.github/workflows/ci.yml
CHANGED
@@ -20,13 +20,29 @@ jobs:
|
|
20
20
|
|
21
21
|
runs-on: ubuntu-latest
|
22
22
|
strategy:
|
23
|
+
fail-fast: false
|
23
24
|
matrix:
|
24
|
-
ruby-version: ['2.6', '2.7', '3.0', jruby, truffleruby]
|
25
|
-
gemfile: [rails-5.2.x, rails-6.0.x, rails-6.1.x]
|
25
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1', jruby, truffleruby]
|
26
|
+
gemfile: [rails-5.2.x, rails-6.0.x, rails-6.1.x, rails-7.0.x]
|
26
27
|
exclude:
|
27
28
|
# ruby 3 is not compatible with rails < 6
|
28
29
|
- ruby-version: '3.0'
|
29
30
|
gemfile: rails-5.2.x
|
31
|
+
- ruby-version: 'truffleruby'
|
32
|
+
gemfile: rails-5.2.x
|
33
|
+
# ruby 3.1 is not compatible with rails < 7
|
34
|
+
- ruby-version: '3.1'
|
35
|
+
gemfile: rails-5.2.x
|
36
|
+
- ruby-version: '3.1'
|
37
|
+
gemfile: rails-6.0.x
|
38
|
+
- ruby-version: '3.1'
|
39
|
+
gemfile: rails-6.1.x
|
40
|
+
# ruby < 2.7 is not compatible with rails 7
|
41
|
+
- ruby-version: '2.6'
|
42
|
+
gemfile: rails-7.0.x
|
43
|
+
# jruby is not compatible with rails 7 (yet)
|
44
|
+
- ruby-version: 'jruby'
|
45
|
+
gemfile: rails-7.0.x
|
30
46
|
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
31
47
|
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
32
48
|
|
@@ -34,7 +50,7 @@ jobs:
|
|
34
50
|
|
35
51
|
steps:
|
36
52
|
- name: Checkout
|
37
|
-
uses: actions/checkout@
|
53
|
+
uses: actions/checkout@v3
|
38
54
|
- name: Set up Ruby
|
39
55
|
# Using ruby/setup-ruby@v1 will automatically get bug fixes and new Ruby
|
40
56
|
# versions for ruby/setup-ruby (see
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Frikandel
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/frikandel.png)](http://badge.fury.io/rb/frikandel)
|
3
3
|
[![Build Status](https://github.com/taktsoft/frikandel/actions/workflows/ci.yml/badge.svg)](https://github.com/taktsoft/frikandel/actions/workflows/ci.yml)
|
4
|
-
[![Code Climate](https://codeclimate.com/github/taktsoft/frikandel.png)](https://codeclimate.com/github/taktsoft/frikandel)
|
5
|
-
[![Dependency Status](https://gemnasium.com/taktsoft/frikandel.svg)](https://gemnasium.com/taktsoft/frikandel)
|
6
4
|
|
7
5
|
This gem aims to improve the security of your rails application. It allows you to add a TTL (Time To Live) to the session cookie and allows you to bind the session to an IP address.
|
8
6
|
|
@@ -18,7 +16,7 @@ By adding a TTL the attack window gets smaller. An stolen has to be used within
|
|
18
16
|
|
19
17
|
## Requirements
|
20
18
|
|
21
|
-
Rails 5.2 and 6.x are currently supported.
|
19
|
+
Rails 5.2 and 6.x and 7.0 are currently supported.
|
22
20
|
|
23
21
|
|
24
22
|
## Installation
|
@@ -93,6 +91,7 @@ end
|
|
93
91
|
|
94
92
|
## Changes
|
95
93
|
|
94
|
+
* v3.0.1 -- Add support for Rails v7.x
|
96
95
|
* v3.0.0 -- Drop support for Rails < v5.2, add support for Rails v6.1 and switch from TravisCI to GithubActions
|
97
96
|
* v2.3.0 -- Add support for Rails v5.1 and Rails v6.0 and fix TravisCI builds
|
98
97
|
* v2.2.0 -- Add support for Rails v5.0 and update to RSpec 3
|
@@ -106,6 +105,7 @@ To run the test suite with different rails version by selecting the correspondin
|
|
106
105
|
$ export BUNDLE_GEMFILE=gemfiles/rails-5.2.x.gemfile && bundle update && bundle exec rake spec
|
107
106
|
$ export BUNDLE_GEMFILE=gemfiles/rails-6.0.x.gemfile && bundle update && bundle exec rake spec
|
108
107
|
$ export BUNDLE_GEMFILE=gemfiles/rails-6.1.x.gemfile && bundle update && bundle exec rake spec
|
108
|
+
$ export BUNDLE_GEMFILE=gemfiles/rails-7.0.x.gemfile && bundle update && bundle exec rake spec
|
109
109
|
$ export BUNDLE_GEMFILE=gemfiles/rails-head.gemfile && bundle update && bundle exec rake spec
|
110
110
|
|
111
111
|
## Contributing
|
data/frikandel.gemspec
CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = spec.summary
|
13
13
|
spec.homepage = "https://github.com/taktsoft/frikandel"
|
14
14
|
spec.license = "MIT"
|
15
|
+
spec.metadata = { "rubygems_mfa_required" => "true" }
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0")
|
17
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -31,5 +32,5 @@ Gem::Specification.new do |spec|
|
|
31
32
|
spec.add_development_dependency "pry"
|
32
33
|
spec.add_development_dependency "test-unit"
|
33
34
|
|
34
|
-
spec.add_dependency "rails", ">= 5.2.0", "<
|
35
|
+
spec.add_dependency "rails", ">= 5.2.0", "< 8.0.0"
|
35
36
|
end
|
data/lib/frikandel/version.rb
CHANGED