isomorfeus-iodine 0.7.45 → 0.7.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +40 -40
- data/.github/workflows/ruby.yml +3 -2
- data/.gitlab-ci.yml +8 -0
- data/Gemfile +0 -1
- data/bin/console +0 -4
- data/bitbucket-pipelines.yml +9 -0
- data/ext/iodine/extconf.rb +16 -2
- data/ext/iodine/fio_tmpfile.h +50 -50
- data/ext/iodine/fiobj_hash.c +409 -409
- data/ext/iodine/fiobj_numbers.c +344 -344
- data/ext/iodine/fiobj_str.c +433 -433
- data/ext/iodine/iodine_caller.c +4 -6
- data/ext/iodine/iodine_caller.h +26 -27
- data/ext/iodine/iodine_connection.c +1 -1
- data/ext/iodine/iodine_helpers.c +282 -282
- data/ext/iodine/iodine_http.c +2 -1
- data/ext/iodine/iodine_mustache.c +1 -1
- data/ext/iodine/iodine_rack_io.c +277 -281
- data/ext/iodine/iodine_store.c +142 -142
- data/ext/iodine/iodine_tls.c +1 -1
- data/isomorfeus-iodine.gemspec +8 -4
- data/lib/iodine/version.rb +3 -3
- data/lib/iodine.rb +2 -2
- metadata +13 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b1237f665549395076af86532ffc564f4cef05add3014a5e9818cd674497602
|
4
|
+
data.tar.gz: e9e27c61cc6caa7ec67a56006681d7fe19850a88adcbcf4a14a4941dd8c3dd50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5296052972dc777a0bf1bb1d900d1fc2f94a2ce2c5667543fd1331cd915c883ac36ca4fc1dd584845a96ce80ec5e77604577851bc7289b4b4a01497c6235fade
|
7
|
+
data.tar.gz: 27a99318353419d531fd07538f63d6ce1fae88fc6cc55a23fb87950f861511cc257cea71edd7d8bdd06c184c7142f34a3d644b52931c6f1eb4cea2d7f7753a06
|
@@ -1,40 +1,40 @@
|
|
1
|
-
---
|
2
|
-
name: Bug report
|
3
|
-
about: Create a report to help us improve
|
4
|
-
title: ''
|
5
|
-
labels: ''
|
6
|
-
assignees: ''
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
### System Information
|
11
|
-
|
12
|
-
- **OS**: [e.g. macOS 10.15.4]
|
13
|
-
- **Ruby**: [e.g. 2.7.0]
|
14
|
-
- **Version**: [e.g. 0.7.38]
|
15
|
-
- **OpenSSL**: [OpenSSL 1.1.1f 20 Mar 2020]
|
16
|
-
|
17
|
-
### Description
|
18
|
-
|
19
|
-
A clear and concise description of what the bug is.
|
20
|
-
|
21
|
-
### Rack App to Reproduce
|
22
|
-
|
23
|
-
```ruby
|
24
|
-
APP = {|env| [200, {}, "Hello World"] }
|
25
|
-
run APP
|
26
|
-
```
|
27
|
-
|
28
|
-
### Testing code
|
29
|
-
|
30
|
-
```sh
|
31
|
-
curl http://localhost:3000/
|
32
|
-
```
|
33
|
-
|
34
|
-
### Expected behavior
|
35
|
-
|
36
|
-
A clear and concise description of what you expected to happen.
|
37
|
-
|
38
|
-
### Actual behavior
|
39
|
-
|
40
|
-
A clear and concise description of what actually happened.
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
### System Information
|
11
|
+
|
12
|
+
- **OS**: [e.g. macOS 10.15.4]
|
13
|
+
- **Ruby**: [e.g. 2.7.0]
|
14
|
+
- **Version**: [e.g. 0.7.38]
|
15
|
+
- **OpenSSL**: [OpenSSL 1.1.1f 20 Mar 2020]
|
16
|
+
|
17
|
+
### Description
|
18
|
+
|
19
|
+
A clear and concise description of what the bug is.
|
20
|
+
|
21
|
+
### Rack App to Reproduce
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
APP = {|env| [200, {}, "Hello World"] }
|
25
|
+
run APP
|
26
|
+
```
|
27
|
+
|
28
|
+
### Testing code
|
29
|
+
|
30
|
+
```sh
|
31
|
+
curl http://localhost:3000/
|
32
|
+
```
|
33
|
+
|
34
|
+
### Expected behavior
|
35
|
+
|
36
|
+
A clear and concise description of what you expected to happen.
|
37
|
+
|
38
|
+
### Actual behavior
|
39
|
+
|
40
|
+
A clear and concise description of what actually happened.
|
data/.github/workflows/ruby.yml
CHANGED
@@ -9,15 +9,16 @@ on:
|
|
9
9
|
jobs:
|
10
10
|
specs:
|
11
11
|
strategy:
|
12
|
+
fail-fast: false
|
12
13
|
matrix:
|
13
14
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
14
15
|
runs-on: ${{ matrix.os }}
|
15
16
|
steps:
|
16
17
|
- uses: actions/checkout@v2
|
17
|
-
- name: Set up Ruby 3.
|
18
|
+
- name: Set up Ruby 3.1
|
18
19
|
uses: ruby/setup-ruby@v1
|
19
20
|
with:
|
20
|
-
ruby-version: 3.
|
21
|
+
ruby-version: 3.1
|
21
22
|
bundler-cache: true
|
22
23
|
- name: Build and test with Rake
|
23
24
|
run: |
|
data/.gitlab-ci.yml
ADDED
data/Gemfile
CHANGED
data/bin/console
CHANGED
@@ -14,9 +14,5 @@ require "iodine"
|
|
14
14
|
# You can add fixtures and/or initialization code here to make experimenting
|
15
15
|
# with your gem easier. You can also use a different console, if you like.
|
16
16
|
|
17
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
18
|
-
# require "pry"
|
19
|
-
# Pry.start
|
20
|
-
|
21
17
|
require "irb"
|
22
18
|
IRB.start
|
data/ext/iodine/extconf.rb
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
|
3
|
+
WIN_PATTERNS = [
|
4
|
+
/bccwin/i,
|
5
|
+
/cygwin/i,
|
6
|
+
/djgpp/i,
|
7
|
+
/mingw/i,
|
8
|
+
/mswin/i,
|
9
|
+
/wince/i,
|
10
|
+
].freeze
|
11
|
+
|
12
|
+
def win_platform?
|
13
|
+
ruby_platform = RbConfig::CONFIG['host_os']
|
14
|
+
!!WIN_PATTERNS.find {|r| ruby_platform =~ r }
|
15
|
+
end
|
16
|
+
|
3
17
|
# Test polling
|
4
18
|
def iodine_test_polling_support
|
5
19
|
iodine_poll_test_kqueue = <<EOS
|
@@ -36,7 +50,7 @@ int main(void) {
|
|
36
50
|
EOS
|
37
51
|
|
38
52
|
# Test for manual selection and then TRY_COMPILE with each polling engine
|
39
|
-
if
|
53
|
+
if win_platform?
|
40
54
|
puts "skipping polling tests, using WSAPOLL on Windows"
|
41
55
|
$defs << "-DFIO_ENGINE_WSAPOLL"
|
42
56
|
elsif ENV['FIO_POLL']
|
@@ -67,7 +81,7 @@ end
|
|
67
81
|
|
68
82
|
iodine_test_polling_support()
|
69
83
|
|
70
|
-
unless
|
84
|
+
unless win_platform?
|
71
85
|
# Test for OpenSSL version equal to 1.0.0 or greater.
|
72
86
|
unless ENV['NO_SSL'] || ENV['NO_TLS'] || ENV["DISABLE_SSL"]
|
73
87
|
OPENSSL_TEST_CODE = <<EOS
|
data/ext/iodine/fio_tmpfile.h
CHANGED
@@ -1,50 +1,50 @@
|
|
1
|
-
/*
|
2
|
-
Copyright: Boaz Segev, 2018-2019
|
3
|
-
License: MIT
|
4
|
-
*/
|
5
|
-
#ifndef H_FIO_TMPFILE_H
|
6
|
-
/** a simple helper to create temporary files and file names */
|
7
|
-
#define H_FIO_TMPFILE_H
|
8
|
-
|
9
|
-
#ifndef _GNU_SOURCE
|
10
|
-
#define _GNU_SOURCE
|
11
|
-
#endif
|
12
|
-
|
13
|
-
#include <stdio.h>
|
14
|
-
#include <stdlib.h>
|
15
|
-
|
16
|
-
#include <fcntl.h>
|
17
|
-
#include <sys/stat.h>
|
18
|
-
#include <sys/types.h>
|
19
|
-
#include <unistd.h>
|
20
|
-
|
21
|
-
#ifdef __MINGW32__
|
22
|
-
#include <fileapi.h>
|
23
|
-
#endif
|
24
|
-
|
25
|
-
static inline int fio_tmpfile(void) {
|
26
|
-
// create a temporary file to contain the data.
|
27
|
-
int fd = 0;
|
28
|
-
#ifdef __MINGW32__
|
29
|
-
char name_template[] = "fio";
|
30
|
-
TCHAR temp_path[(MAX_PATH-14)];
|
31
|
-
TCHAR temp_filename[MAX_PATH];
|
32
|
-
GetTempPath(MAX_PATH - 14, temp_path);
|
33
|
-
GetTempFileNameA(temp_path, name_template, 0, temp_filename);
|
34
|
-
fd = _open(temp_filename, _O_CREAT | _O_RDWR);
|
35
|
-
_chmod(temp_filename, _S_IREAD | _S_IWRITE);
|
36
|
-
#elif defined(P_tmpdir)
|
37
|
-
if (P_tmpdir[sizeof(P_tmpdir) - 1] == '/') {
|
38
|
-
char name_template[] = P_tmpdir "facil_io_tmpfile_XXXXXXXX";
|
39
|
-
fd = mkstemp(name_template);
|
40
|
-
} else {
|
41
|
-
char name_template[] = P_tmpdir "/facil_io_tmpfile_XXXXXXXX";
|
42
|
-
fd = mkstemp(name_template);
|
43
|
-
}
|
44
|
-
#else
|
45
|
-
char name_template[] = "/tmp/facil_io_tmpfile_XXXXXXXX";
|
46
|
-
fd = mkstemp(name_template);
|
47
|
-
#endif
|
48
|
-
return fd;
|
49
|
-
}
|
50
|
-
#endif
|
1
|
+
/*
|
2
|
+
Copyright: Boaz Segev, 2018-2019
|
3
|
+
License: MIT
|
4
|
+
*/
|
5
|
+
#ifndef H_FIO_TMPFILE_H
|
6
|
+
/** a simple helper to create temporary files and file names */
|
7
|
+
#define H_FIO_TMPFILE_H
|
8
|
+
|
9
|
+
#ifndef _GNU_SOURCE
|
10
|
+
#define _GNU_SOURCE
|
11
|
+
#endif
|
12
|
+
|
13
|
+
#include <stdio.h>
|
14
|
+
#include <stdlib.h>
|
15
|
+
|
16
|
+
#include <fcntl.h>
|
17
|
+
#include <sys/stat.h>
|
18
|
+
#include <sys/types.h>
|
19
|
+
#include <unistd.h>
|
20
|
+
|
21
|
+
#ifdef __MINGW32__
|
22
|
+
#include <fileapi.h>
|
23
|
+
#endif
|
24
|
+
|
25
|
+
static inline int fio_tmpfile(void) {
|
26
|
+
// create a temporary file to contain the data.
|
27
|
+
int fd = 0;
|
28
|
+
#ifdef __MINGW32__
|
29
|
+
char name_template[] = "fio";
|
30
|
+
TCHAR temp_path[(MAX_PATH-14)];
|
31
|
+
TCHAR temp_filename[MAX_PATH];
|
32
|
+
GetTempPath(MAX_PATH - 14, temp_path);
|
33
|
+
GetTempFileNameA(temp_path, name_template, 0, temp_filename);
|
34
|
+
fd = _open(temp_filename, _O_CREAT | _O_RDWR);
|
35
|
+
_chmod(temp_filename, _S_IREAD | _S_IWRITE);
|
36
|
+
#elif defined(P_tmpdir)
|
37
|
+
if (P_tmpdir[sizeof(P_tmpdir) - 1] == '/') {
|
38
|
+
char name_template[] = P_tmpdir "facil_io_tmpfile_XXXXXXXX";
|
39
|
+
fd = mkstemp(name_template);
|
40
|
+
} else {
|
41
|
+
char name_template[] = P_tmpdir "/facil_io_tmpfile_XXXXXXXX";
|
42
|
+
fd = mkstemp(name_template);
|
43
|
+
}
|
44
|
+
#else
|
45
|
+
char name_template[] = "/tmp/facil_io_tmpfile_XXXXXXXX";
|
46
|
+
fd = mkstemp(name_template);
|
47
|
+
#endif
|
48
|
+
return fd;
|
49
|
+
}
|
50
|
+
#endif
|