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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 230de38a2734b474235db25f5d470783aeda36489e0a0f1fae42f25f360541ee
4
- data.tar.gz: ee656bc59c3569a1790dae2a1e46c7f2a7e21b675d728956183cf12ff126f774
3
+ metadata.gz: 55d7b1675bb1b47b285fc3520795b001f4cb23ac033e61c2977487589133afa1
4
+ data.tar.gz: c8d1db3a3e30a08cdf6cffbe18121e6839888f31026f5a8d310c15b93824df8d
5
5
  SHA512:
6
- metadata.gz: 6f3e0a1739be527f0a730ed3d908bc23807d49797e89ec62fda5227c3199f203021d853fd1776c1ea252b1b01ba9b6fbe5f0942c50f70bc4911bb927f1443846
7
- data.tar.gz: 855dce6c8e2a8aaea5dee11516ad60445a107811d76e99c7c86d4fd02dff87ed2f867ff1db5cad9aa740d6492ad34c659bf7d185500df814301e701299ef25de
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
  }
@@ -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/612777c764057c53988db3899d88adce6fe742a1',
12
+ url: 'https://github.com/ganmacs/chunkio/tarball/c0449b5bb59b8c7f56d49b61ebc9faf3e888cdbd',
13
13
  }
14
14
 
15
15
  class << recipe
@@ -4,16 +4,17 @@ require 'chunkio.so'
4
4
 
5
5
  module ChunkIO
6
6
  class ChunkIO
7
- def initialize(context_path:, stream_name:)
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
- c = ::ChunkIO::Chunk.new(@ctx, @stream, name)
15
- @chunks << c
16
- c
17
+ ::ChunkIO::Chunk.new(@ctx, @stream, name)
17
18
  end
18
19
  end
19
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChunkIO
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
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.5
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-13 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_portile2