chunkio 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/chunkio/chunkio_context.c +9 -0
- data/ext/chunkio/extconf.rb +1 -1
- data/lib/chunkio/chunkio.rb +6 -5
- data/lib/chunkio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55d7b1675bb1b47b285fc3520795b001f4cb23ac033e61c2977487589133afa1
|
4
|
+
data.tar.gz: c8d1db3a3e30a08cdf6cffbe18121e6839888f31026f5a8d310c15b93824df8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7847e42c1deb4b59488d3b9fce246574ca1f27a69400dd335dbb09546e207ba921228fb9b5fd2c4bb07ecc0c6fb9c952758daa7b87440c9d45cf312ae8153ae7
|
7
|
+
data.tar.gz: bf9e17ce10bc6e34bd93df997c9c511166afe995d4e7876fd03dc2b0a0f8c1f85de7aba3dac038cca45e789d946a7b11ae16c1e7a68239b92409c2560084b5bc
|
@@ -64,6 +64,14 @@ static VALUE chunkio_context_root_path(VALUE self)
|
|
64
64
|
return rb_str_new2(ctx->root_path);
|
65
65
|
}
|
66
66
|
|
67
|
+
static VALUE chunkio_context_max_chunks_assign(VALUE self, VALUE v)
|
68
|
+
{
|
69
|
+
struct cio_ctx *ctx;
|
70
|
+
TypedData_Get_Struct(self, struct cio_ctx, &chunkio_context_type, ctx);
|
71
|
+
|
72
|
+
cio_set_max_chunks_up(ctx, NUM2INT(v));
|
73
|
+
return self;
|
74
|
+
}
|
67
75
|
|
68
76
|
void Init_chunkio_context(VALUE mChunkIO)
|
69
77
|
{
|
@@ -72,4 +80,5 @@ void Init_chunkio_context(VALUE mChunkIO)
|
|
72
80
|
|
73
81
|
rb_define_method(cCIO_Context, "initialize", chunkio_context_initialize, 1);
|
74
82
|
rb_define_method(cCIO_Context, "root_path", chunkio_context_root_path, 0);
|
83
|
+
rb_define_method(cCIO_Context, "max_chunks=", chunkio_context_max_chunks_assign, 1);
|
75
84
|
}
|
data/ext/chunkio/extconf.rb
CHANGED
@@ -9,7 +9,7 @@ message "Building chunkio\n"
|
|
9
9
|
recipe = MiniPortileCMake.new('chunkio', 'v0.0.1')
|
10
10
|
|
11
11
|
recipe.files << {
|
12
|
-
url: 'https://github.com/ganmacs/chunkio/tarball/
|
12
|
+
url: 'https://github.com/ganmacs/chunkio/tarball/c0449b5bb59b8c7f56d49b61ebc9faf3e888cdbd',
|
13
13
|
}
|
14
14
|
|
15
15
|
class << recipe
|
data/lib/chunkio/chunkio.rb
CHANGED
@@ -4,16 +4,17 @@ require 'chunkio.so'
|
|
4
4
|
|
5
5
|
module ChunkIO
|
6
6
|
class ChunkIO
|
7
|
-
|
7
|
+
MAX_CHUNKS = 8196
|
8
|
+
|
9
|
+
def initialize(context_path:, stream_name:, max_chunks: MAX_CHUNKS)
|
8
10
|
@ctx = ::ChunkIO::Context.new(context_path)
|
11
|
+
@ctx.max_chunks = max_chunks
|
12
|
+
|
9
13
|
@stream = ::ChunkIO::Stream.new(@ctx, stream_name)
|
10
|
-
@chunks = []
|
11
14
|
end
|
12
15
|
|
13
16
|
def create_chunk(name:)
|
14
|
-
|
15
|
-
@chunks << c
|
16
|
-
c
|
17
|
+
::ChunkIO::Chunk.new(@ctx, @stream, name)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
data/lib/chunkio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chunkio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuta Iwama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_portile2
|