libddwaf 1.3.0.0.0 → 1.5.1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +33 -0
- data/.github/workflows/package.yml +32 -19
- data/.github/workflows/test.yml +9 -12
- data/CHANGELOG.md +79 -0
- data/README.md +118 -0
- data/Steepfile +22 -0
- data/lib/datadog/appsec/waf/version.rb +2 -2
- data/lib/datadog/appsec/waf.rb +345 -96
- data/libddwaf.gemspec +1 -1
- data/sig/datadog/appsec/waf/version.rbs +13 -0
- data/sig/datadog/appsec/waf.rbs +230 -0
- data/sig/libddwaf.rbs +0 -0
- data/vendor/rbs/ffi/0/ffi.rbs +62 -0
- data/vendor/rbs/gem/0/gem.rbs +7 -0
- data/vendor/rbs/jruby/0/jruby.rbs +3 -0
- metadata +12 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99c7eacaabd1402caa1dfe588cde91cb3b8999bfaf0ee4a9edf2fb640ce3497a
|
4
|
+
data.tar.gz: 75c8f2ce68fabb48b931ce3fcaad2b9b6c1309d35585e7940e3e94f87e80c805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c49aaccb9d5ab4b8e9ab386233db336b2235649b2b03a430ad9623970313ad659f4b9e3e92ef93792d23550c48a28c0e0c53f99459372d9f7a22f4409e0c75a3
|
7
|
+
data.tar.gz: 607212389e499b3a79aeb12c88de8220184d668247e0508b1816adbfb2e3d2f1e06de875f25d0ef6e403cd127657240c75a052ad29ecddd63a419bc9d81225df
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Lint
|
2
|
+
on:
|
3
|
+
- push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
style-check:
|
7
|
+
name: Style check
|
8
|
+
runs-on: ubuntu-20.04
|
9
|
+
container:
|
10
|
+
image: ruby:3.1
|
11
|
+
steps:
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v2
|
14
|
+
- name: Bundle
|
15
|
+
run: |
|
16
|
+
bundle install
|
17
|
+
- name: Run Rubocop
|
18
|
+
run: |
|
19
|
+
bundle exec rubocop -D
|
20
|
+
type-check:
|
21
|
+
name: Type check
|
22
|
+
runs-on: ubuntu-20.04
|
23
|
+
container:
|
24
|
+
image: ruby:3.1
|
25
|
+
steps:
|
26
|
+
- name: Checkout
|
27
|
+
uses: actions/checkout@v2
|
28
|
+
- name: Bundle
|
29
|
+
run: |
|
30
|
+
bundle install
|
31
|
+
- name: Run Steep
|
32
|
+
run: |
|
33
|
+
bundle exec steep check
|
@@ -22,7 +22,7 @@ jobs:
|
|
22
22
|
- name: Bundle
|
23
23
|
run: |
|
24
24
|
bundle install
|
25
|
-
- name: Build
|
25
|
+
- name: Build gem
|
26
26
|
run: |
|
27
27
|
bundle exec rake build
|
28
28
|
- name: Upload gem
|
@@ -37,16 +37,24 @@ jobs:
|
|
37
37
|
include:
|
38
38
|
- os: ubuntu-20.04
|
39
39
|
cpu: x86_64
|
40
|
-
platform: x86_64-linux
|
40
|
+
platform: x86_64-linux:llvm
|
41
|
+
artifact: x86_64-linux-llvm
|
41
42
|
- os: ubuntu-20.04
|
42
43
|
cpu: aarch64
|
43
|
-
platform: aarch64-linux
|
44
|
-
|
44
|
+
platform: aarch64-linux:llvm
|
45
|
+
artifact: aarch64-linux-llvm
|
46
|
+
- os: ubuntu-20.04
|
47
|
+
cpu: universal
|
48
|
+
platform: java
|
49
|
+
artifact: java
|
50
|
+
- os: macos-12
|
45
51
|
cpu: x86_64
|
46
52
|
platform: x86_64-darwin
|
47
|
-
|
53
|
+
artifact: x86_64-darwin
|
54
|
+
- os: macos-12
|
48
55
|
cpu: arm64
|
49
56
|
platform: arm64-darwin
|
57
|
+
artifact: arm64-darwin
|
50
58
|
name: Build package (${{ matrix.platform }})
|
51
59
|
runs-on: ${{ matrix.os }}
|
52
60
|
steps:
|
@@ -58,19 +66,13 @@ jobs:
|
|
58
66
|
- name: Bundle
|
59
67
|
run: |
|
60
68
|
bundle install
|
61
|
-
- name:
|
62
|
-
run: |
|
63
|
-
bundle exec rake fetch[${{ matrix.platform }}]
|
64
|
-
- name: Extract binary library
|
65
|
-
run: |
|
66
|
-
bundle exec rake extract[${{ matrix.platform }}]
|
67
|
-
- name: Build package
|
69
|
+
- name: Build binary gem
|
68
70
|
run: |
|
69
71
|
bundle exec rake binary[${{ matrix.platform }}]
|
70
72
|
- name: Upload gem
|
71
73
|
uses: actions/upload-artifact@v2
|
72
74
|
with:
|
73
|
-
name: libddwaf-${{ matrix.
|
75
|
+
name: libddwaf-${{ matrix.artifact }}-${{ github.run_id }}-${{ github.sha }}
|
74
76
|
path: pkg
|
75
77
|
test-ruby:
|
76
78
|
needs: package-ruby
|
@@ -121,28 +123,39 @@ jobs:
|
|
121
123
|
- os: ubuntu-20.04
|
122
124
|
cpu: x86_64
|
123
125
|
platform: x86_64-linux
|
126
|
+
artifact: x86_64-linux-llvm
|
124
127
|
image: ruby:2.6
|
125
128
|
qemu: amd64
|
126
129
|
libc: gnu
|
127
130
|
- os: ubuntu-20.04
|
128
131
|
cpu: aarch64
|
129
132
|
platform: aarch64-linux
|
133
|
+
artifact: aarch64-linux-llvm
|
130
134
|
image: ruby:2.6
|
131
135
|
qemu: aarch64
|
132
136
|
libc: gnu
|
133
137
|
- os: ubuntu-20.04
|
134
138
|
cpu: x86_64
|
135
139
|
platform: x86_64-linux
|
140
|
+
artifact: x86_64-linux-llvm
|
136
141
|
image: ruby:2.6-alpine
|
137
142
|
qemu: amd64
|
138
143
|
libc: musl
|
139
144
|
- os: ubuntu-20.04
|
140
145
|
cpu: aarch64
|
141
146
|
platform: aarch64-linux
|
147
|
+
artifact: aarch64-linux-llvm
|
142
148
|
image: ruby:2.6-alpine
|
143
149
|
qemu: aarch64
|
144
150
|
libc: musl
|
145
|
-
|
151
|
+
- os: ubuntu-20.04
|
152
|
+
cpu: x86_64
|
153
|
+
platform: java
|
154
|
+
artifact: java
|
155
|
+
image: jruby:9.3.0.0
|
156
|
+
qemu: amd64
|
157
|
+
libc: gnu
|
158
|
+
name: Test package (${{ matrix.platform }}, ${{ matrix.libc }}, ${{ matrix.cpu }})
|
146
159
|
runs-on: ${{ matrix.os }}
|
147
160
|
steps:
|
148
161
|
- name: Enable ${{ matrix.qemu }} platform
|
@@ -160,7 +173,7 @@ jobs:
|
|
160
173
|
echo "::set-output name=id::$(cat container_id)"
|
161
174
|
- uses: actions/download-artifact@v2
|
162
175
|
with:
|
163
|
-
name: libddwaf-${{ matrix.
|
176
|
+
name: libddwaf-${{ matrix.artifact }}-${{ github.run_id }}-${{ github.sha }}
|
164
177
|
path: pkg
|
165
178
|
- name: List artifact files
|
166
179
|
run: find .
|
@@ -172,17 +185,17 @@ jobs:
|
|
172
185
|
run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} gem install --verbose pkg/*.gem
|
173
186
|
- name: Run smoke test
|
174
187
|
run: |
|
175
|
-
docker exec -w "${PWD}" ${{ steps.container.outputs.id }} ruby -r 'libddwaf' -e '
|
188
|
+
docker exec -w "${PWD}" ${{ steps.container.outputs.id }} ruby -r 'libddwaf' -e 'p Datadog::AppSec::WAF::LibDDWAF.ddwaf_get_version'
|
176
189
|
test-darwin:
|
177
190
|
needs: package-binary
|
178
191
|
strategy:
|
179
192
|
fail-fast: false
|
180
193
|
matrix:
|
181
194
|
include:
|
182
|
-
- os: macos-
|
195
|
+
- os: macos-12
|
183
196
|
cpu: x86_64
|
184
197
|
platform: x86_64-darwin
|
185
|
-
# - os: macos-
|
198
|
+
# - os: macos-12
|
186
199
|
# cpu: arm64
|
187
200
|
# platform: arm64-darwin
|
188
201
|
name: Test package (${{ matrix.platform }})
|
@@ -199,4 +212,4 @@ jobs:
|
|
199
212
|
run: gem install --verbose pkg/*.gem
|
200
213
|
- name: Run smoke test
|
201
214
|
run: |
|
202
|
-
ruby -r 'libddwaf' -e '
|
215
|
+
ruby -r 'libddwaf' -e 'p Datadog::AppSec::WAF::LibDDWAF.ddwaf_get_version'
|
data/.github/workflows/test.yml
CHANGED
@@ -137,21 +137,21 @@ jobs:
|
|
137
137
|
# TODO: jruby images have no sudo so apt-get can't get a lock
|
138
138
|
# - os: ubuntu-20.04
|
139
139
|
# cpu: x86_64
|
140
|
-
# platform: x86_64-linux
|
141
|
-
# image: jruby:9.3
|
140
|
+
# platform: x86_64-linux-gnu
|
141
|
+
# image: jruby:9.3.0.0
|
142
142
|
# qemu: amd64
|
143
143
|
# libc: gnu
|
144
144
|
# - os: ubuntu-20.04
|
145
145
|
# cpu: x86_64
|
146
|
-
# platform: x86_64-linux
|
147
|
-
# image: jruby:9.2
|
146
|
+
# platform: x86_64-linux-gnu
|
147
|
+
# image: jruby:9.2.8.0
|
148
148
|
# qemu: amd64
|
149
149
|
# libc: gnu
|
150
150
|
# - os: ubuntu-20.04
|
151
151
|
# cpu: x86_64
|
152
|
-
# platform:
|
153
|
-
# image: jruby:9.
|
154
|
-
# qemu:
|
152
|
+
# platform: aarch64-linux-gnu
|
153
|
+
# image: jruby:9.3.4.0
|
154
|
+
# qemu: arm64
|
155
155
|
# libc: gnu
|
156
156
|
name: Test (${{ matrix.image }}, ${{ matrix.cpu }})
|
157
157
|
runs-on: ${{ matrix.os }}
|
@@ -196,13 +196,10 @@ jobs:
|
|
196
196
|
fail-fast: false
|
197
197
|
matrix:
|
198
198
|
include:
|
199
|
-
- os: macos-
|
200
|
-
cpu: x86_64
|
201
|
-
platform: x86_64-darwin
|
202
|
-
- os: macos-11.0
|
199
|
+
- os: macos-12
|
203
200
|
cpu: x86_64
|
204
201
|
platform: x86_64-darwin
|
205
|
-
# - os: macos-
|
202
|
+
# - os: macos-12
|
206
203
|
# cpu: arm64
|
207
204
|
# platform: arm64-darwin
|
208
205
|
name: Test (${{ matrix.os }} ${{ matrix.cpu }})
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# 2023-02-01 v1.5.1.0.1
|
2
|
+
|
3
|
+
- Fix incorrect size in input string limit
|
4
|
+
- Fix object freeing on `update_rule_data` and `toggle_rules`
|
5
|
+
|
6
|
+
# 2022-10-04 v1.5.1.0.0
|
7
|
+
|
8
|
+
- Update to libddwaf 1.5.1
|
9
|
+
- Add live rule data update API
|
10
|
+
- Add live rule toggle API
|
11
|
+
- Add libddwaf boolean type support
|
12
|
+
- Add Ruby to libddwaf object conversion limits
|
13
|
+
- Add Ruby to libddwaf object converter optional coercion of scalars to string
|
14
|
+
- Add static type checking via RBS+Steep
|
15
|
+
- Change version to return a string
|
16
|
+
- Change free function to be passed as config instead of context init argument
|
17
|
+
- Change result to include action list
|
18
|
+
- Change return code from action to status
|
19
|
+
- Change handle and context freeing model from GC-based to explicit
|
20
|
+
- Fix double-free upon finalization of retained C objects
|
21
|
+
- Fix context crash by retaining necessary C objects
|
22
|
+
|
23
|
+
# 2022-05-20 v1.3.0.2.0
|
24
|
+
|
25
|
+
- Fix multibyte string handling
|
26
|
+
- Support JRuby
|
27
|
+
|
28
|
+
# 2022-04-29 v1.3.0.1.0
|
29
|
+
|
30
|
+
Promotion of v1.3.0.1.0.beta1 to stable
|
31
|
+
|
32
|
+
# 2022-04-25 v1.3.0.1.0.beta1
|
33
|
+
|
34
|
+
- Add obfuscator configuration
|
35
|
+
- Add nested object limit configuration
|
36
|
+
- Add report ruleset information
|
37
|
+
|
38
|
+
# 2022-04-29 v1.3.0.0.0
|
39
|
+
|
40
|
+
- Promote v1.3.0.0.0.beta1 to stable
|
41
|
+
|
42
|
+
# 2022-04-20 v1.3.0.0.0.beta1
|
43
|
+
|
44
|
+
- Update to libddwaf 1.3.0
|
45
|
+
|
46
|
+
# 2022-03-18 v1.2.1.0.0.beta1
|
47
|
+
|
48
|
+
- Update to libddwaf 1.2.1
|
49
|
+
- Fix incorrect types for a few binding functions
|
50
|
+
|
51
|
+
# 2022-03-04 v1.0.14.2.1.beta1
|
52
|
+
|
53
|
+
- Fix incorrect return code
|
54
|
+
- Fix passing nil in libddwaf object containers
|
55
|
+
|
56
|
+
# 2022-02-07 v1.0.14.2.0.beta1
|
57
|
+
|
58
|
+
- Change Datadog::Security to Datadog::AppSec
|
59
|
+
|
60
|
+
# 2022-02-01 v1.0.14.1.0.beta2
|
61
|
+
|
62
|
+
- Add support for Ruby 3.1
|
63
|
+
|
64
|
+
# 2021-12-14 v1.0.14.1.0.beta1
|
65
|
+
|
66
|
+
- Fix sequential runs on a single context by retaining C input data objects
|
67
|
+
|
68
|
+
# 2021-11-24 v1.0.14.0.0.beta1
|
69
|
+
|
70
|
+
- Update to libddwaf 1.0.14
|
71
|
+
|
72
|
+
# 2021-11-24 v1.0.13.0.0.beta1
|
73
|
+
|
74
|
+
- Add ruby platform fallback for unsupported platforms
|
75
|
+
- Update to libddwaf 1.0.13
|
76
|
+
|
77
|
+
# 2021-10-13 v1.0.12.0.0.beta1
|
78
|
+
|
79
|
+
- Initial release
|
data/README.md
CHANGED
@@ -4,3 +4,121 @@
|
|
4
4
|
|
5
5
|
For the libddwaf implementation, see this repository:
|
6
6
|
- [``libddwaf``: libddwaf](https://github.com/DataDog/libddwaf.git)
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
## Rake tasks
|
11
|
+
|
12
|
+
### Outline
|
13
|
+
|
14
|
+
A typical workflow is as follows:
|
15
|
+
|
16
|
+
```
|
17
|
+
rake fetch # fetch prebuilt libddwaf binaries tarball in vendor/libddwaf
|
18
|
+
rake extract # extract downloaded tarball in vendor/libddwaf
|
19
|
+
rake spec # run rspec
|
20
|
+
rake binary # build the gem
|
21
|
+
```
|
22
|
+
|
23
|
+
Note that each depends on the previous one, but `fetch` and `extract` are lazy, which proves useful to produce manual builds.
|
24
|
+
|
25
|
+
### Platform selection
|
26
|
+
|
27
|
+
By default the above will automatically use the local Ruby platform.
|
28
|
+
|
29
|
+
Since libddwaf binary builds are available upstream, it's possible to build gems for any platform on any other platform. To that end `fetch`, `extract`, and `binary` can take an argument to specify the Ruby platform for which these operations should apply:
|
30
|
+
|
31
|
+
```
|
32
|
+
rake fetch[x86_64-linux-musl]
|
33
|
+
rake extract[x86_64-linux-musl]
|
34
|
+
rake binary[x86_64-linux-musl]
|
35
|
+
```
|
36
|
+
|
37
|
+
Of course you can't force the platform for `rspec` since that requires running code; see the Docker section below for ways to achieve that.
|
38
|
+
|
39
|
+
Note that zsh gives special meaning to brackets, therefore you may need to quote the argument:
|
40
|
+
|
41
|
+
```
|
42
|
+
rake 'fetch[x86_64-linux-musl]'
|
43
|
+
```
|
44
|
+
|
45
|
+
Available platforms are:
|
46
|
+
|
47
|
+
```
|
48
|
+
x86_64-linux-musl # Alpine build: targets musl-based Linux
|
49
|
+
x86_64-linux-gnu # Debian build: targets glibc-based Linux
|
50
|
+
x86_64-linux # Portable build: targets multiple linux libc
|
51
|
+
x86_64-darwin # Darwin build: targets macOS
|
52
|
+
aarch64-linux-musl # Same as above, for ARMv8
|
53
|
+
aarch64-linux-gnu # Same as above, for ARMv8
|
54
|
+
aarch64-linux # Same as above, for ARMv8
|
55
|
+
arm64-darwin # Same as above, for Apple Silicon
|
56
|
+
java # JRuby build, universal
|
57
|
+
```
|
58
|
+
|
59
|
+
Note: since it is not (yet) possible to package gems for the `java` Ruby platform any other way than `java`, it has to package all the native architectures.
|
60
|
+
|
61
|
+
In addition, options can be specified for the portable build:
|
62
|
+
|
63
|
+
```
|
64
|
+
rake binary[x86_64-linux:gnu+musl] # Combined build: combine musl and glibc builds, selecting one at runtime
|
65
|
+
rake binary[x86_64-linux:llvm] # Hybrid build: linked to llvm static libs and built against a musl sysroot
|
66
|
+
```
|
67
|
+
|
68
|
+
See upstream libddwaf for details about the [hybrid portable build](https://github.com/DataDog/libddwaf/blob/master/docker/libddwaf/README.md).
|
69
|
+
|
70
|
+
## Testing with Docker
|
71
|
+
|
72
|
+
Unless using Docker for Mac, remember to enable foreign CPU emulation via QEMU:
|
73
|
+
|
74
|
+
```
|
75
|
+
# aarch64 on x86_64 hardware
|
76
|
+
docker run --privileged --rm tonistiigi/binfmt --install arm64
|
77
|
+
# x86_64 on aarch64 hardware
|
78
|
+
docker run --privileged --rm tonistiigi/binfmt --install amd64
|
79
|
+
```
|
80
|
+
|
81
|
+
Then you can substitute e.g `--platform linux/x86_64` with `--platform linux/aarch64` below.
|
82
|
+
|
83
|
+
### GNU (Debian)
|
84
|
+
|
85
|
+
```
|
86
|
+
# this is too old for aarch64
|
87
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.1 sh -c 'rm -fv Gemfile.lock && gem install bundler -v "~> 1.17" && bundle install && bundle exec rake spec'
|
88
|
+
# these are fine for aarch64
|
89
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.2 sh -c 'rm -fv Gemfile.lock && gem install bundler -v "~> 1.17" && bundle install && bundle exec rake spec'
|
90
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.3 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
91
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.4 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
92
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.5 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
93
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.6 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
94
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.7 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
95
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:3.0 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
96
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:3.1 sh -c 'rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
97
|
+
```
|
98
|
+
|
99
|
+
### musl (Alpine)
|
100
|
+
|
101
|
+
```
|
102
|
+
# these are too old for aarch64
|
103
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.1-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler -v "~> 1.17" && bundle install && bundle exec rake spec'
|
104
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.2-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler -v "~> 1.17" && bundle install && bundle exec rake spec'
|
105
|
+
# these are fine for aarch64
|
106
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.3-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
107
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.4-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
108
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.5-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
109
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.6-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
110
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:2.7-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
111
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:3.0-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
112
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:3.1-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
113
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" ruby:3.1-alpine sh -c 'apk update && apk add build-base git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
114
|
+
```
|
115
|
+
|
116
|
+
### JRuby
|
117
|
+
|
118
|
+
```
|
119
|
+
# these are too old for aarch64
|
120
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" jruby:9.2.8.0 sh -c 'apt-get update && apt-get install -y build-essential git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
121
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" jruby:9.3.0.0 sh -c 'apt-get update && apt-get install -y build-essential git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
122
|
+
# this is fine for aarch64
|
123
|
+
docker run --rm -it --platform linux/x86_64 -v "${PWD}":"${PWD}" -w "${PWD}" jruby:9.3.4.0 sh -c 'apt-get update && apt-get install -y build-essential git && rm -fv Gemfile.lock && gem install bundler:2.2.22 && bundle install && bundle exec rake spec'
|
124
|
+
```
|
data/Steepfile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# D = Steep::Diagnostic
|
2
|
+
|
3
|
+
target :lib do
|
4
|
+
signature "sig"
|
5
|
+
|
6
|
+
check "lib"
|
7
|
+
library "rubygems"
|
8
|
+
library "logger"
|
9
|
+
library "monitor" # needed by logger
|
10
|
+
library "json"
|
11
|
+
|
12
|
+
repo_path "vendor/rbs"
|
13
|
+
library "ffi"
|
14
|
+
library "jruby"
|
15
|
+
library "gem"
|
16
|
+
|
17
|
+
# # configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
|
18
|
+
# # configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
|
19
|
+
# # configure_code_diagnostics do |hash| # You can setup everything yourself
|
20
|
+
# # hash[D::Ruby::NoMethod] = :information
|
21
|
+
# # end
|
22
|
+
end
|