dartsclone 0.2.0 → 0.2.1

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: dce86b5df78cc6b62be497a33f5203a352def9f83767191840e2cd5f2bcae460
4
- data.tar.gz: da2b74859ccc9834583b33ac4c9628b976a6e329b9a8d77348b4947767503794
3
+ metadata.gz: 5f885b4746eda49bbcdf7dd447acf1f5249f41fd3f259b9b5a0c4aefdb166a53
4
+ data.tar.gz: 1526d141d3e0671be8b7bf80ea192477a6f2795fbfc627050a1a7edb9e37f7f7
5
5
  SHA512:
6
- metadata.gz: 074b992e52c7604970772c30976cbbe4cf8efd7f7cb6d26dcf62e8f3eb2998b4cb08dd615ab224809786cd1f65fc4759f80fe3d8ba53e4674a17afe25188b43d
7
- data.tar.gz: 0d136b219466c196dbb9616b02f01ab98b3225fef93831e6e80aefa049561aab621073fa6ac6589e3132b71e803eb65c0f0f1474a9047be62093e58ce426594a
6
+ metadata.gz: a3edde3163b959f31f61bed40d031bbeb6f86ca4774d9b110af4dd3d5e787210cef5fab01d87ba342def771ee52d28c133c643bd7179df8c42c6e2cc8e53c731
7
+ data.tar.gz: e292bcd0444398425b931a6bf92217b06cf1f45eedc85af841aeb82cbbcb4bd1caaab5f57f43e54aa8e59a5e8b833570c269d699c71a2bd0d7f4e15482197a62
@@ -0,0 +1,21 @@
1
+ name: build
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby: [ '2.5', '2.6', '2.7' ]
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Set up Ruby ${{ matrix.ruby }}
14
+ uses: actions/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+ - name: Build and test with Rake
18
+ run: |
19
+ gem install bundler
20
+ bundle install --jobs 4 --retry 3
21
+ bundle exec rake
data/.gitignore CHANGED
@@ -15,6 +15,7 @@ mkmf.log
15
15
  tags
16
16
  .DS_Store
17
17
  .ruby-version
18
+ spec/foo.dat
18
19
 
19
20
  # rspec failure tracking
20
21
  .rspec_status
@@ -1,3 +1,7 @@
1
+ ## 0.2.1
2
+ - Replace Data_ functions to TypedData_ functions.
3
+ - Fix some config files.
4
+
1
5
  ## 0.2.0
2
6
  - Add get_array and set_array methods to dump and load array data.
3
7
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Darts-clone.rb
2
2
 
3
- [![Build Status](https://travis-ci.org/yoshoku/darts-clone.rb.svg?branch=master)](https://travis-ci.org/yoshoku/darts-clone.rb)
3
+ [![Build Status](https://github.com/yoshoku/darts-clone.rb/workflows/build/badge.svg)](https://github.com/yoshoku/darts-clone.rb/actions?query=workflow%3Abuild)
4
4
  [![Gem Version](https://badge.fury.io/rb/dartsclone.svg)](https://badge.fury.io/rb/dartsclone)
5
5
  [![BSD 2-Clause License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://github.com/yoshoku/darts-clone.rb/blob/master/LICENSE.txt)
6
6
 
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.metadata['homepage_uri'] = spec.homepage
15
15
  spec.metadata['source_code_uri'] = spec.homepage
16
16
  spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/darts-clone.rb/blob/master/CHANGELOG.md'
17
+ spec.metadata['documentation_uri'] = 'https://github.com/yoshoku/darts-clone.rb#usage'
17
18
 
18
19
  # Specify which files should be added to the gem when it is released.
19
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -9,17 +9,21 @@ class RbDoubleArray
9
9
  public:
10
10
  static VALUE double_array_alloc(VALUE self) {
11
11
  Darts::DoubleArray* ptr = (Darts::DoubleArray*)ruby_xmalloc(sizeof(Darts::DoubleArray));
12
- return Data_Wrap_Struct(self, NULL, double_array_free, ptr);
12
+ return TypedData_Wrap_Struct(self, &double_array_type, ptr);
13
13
  };
14
14
 
15
- static void double_array_free(Darts::DoubleArray* ptr) {
16
- ptr->~DoubleArrayImpl();
15
+ static void double_array_free(void* ptr) {
16
+ ((Darts::DoubleArray*)ptr)->~DoubleArrayImpl();
17
17
  ruby_xfree(ptr);
18
18
  };
19
19
 
20
+ static size_t double_array_size(const void* ptr) {
21
+ return sizeof(*((Darts::DoubleArray*)ptr));
22
+ };
23
+
20
24
  static Darts::DoubleArray* get_double_array(VALUE self) {
21
25
  Darts::DoubleArray* ptr;
22
- Data_Get_Struct(self, Darts::DoubleArray, ptr);
26
+ TypedData_Get_Struct(self, Darts::DoubleArray, &double_array_type, ptr);
23
27
  return ptr;
24
28
  };
25
29
 
@@ -43,6 +47,8 @@ class RbDoubleArray
43
47
  };
44
48
 
45
49
  private:
50
+ static const rb_data_type_t double_array_type;
51
+
46
52
  static VALUE _double_array_init(VALUE self) {
47
53
  Darts::DoubleArray* ptr = get_double_array(self);
48
54
  new (ptr) Darts::DoubleArray();
@@ -242,4 +248,16 @@ class RbDoubleArray
242
248
  };
243
249
  };
244
250
 
251
+ const rb_data_type_t RbDoubleArray::double_array_type = {
252
+ "RbDoubleArray",
253
+ {
254
+ NULL,
255
+ RbDoubleArray::double_array_free,
256
+ RbDoubleArray::double_array_size
257
+ },
258
+ NULL,
259
+ NULL,
260
+ RUBY_TYPED_FREE_IMMEDIATELY
261
+ };
262
+
245
263
  #endif /* DARTSCLONEEXT_HPP */
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DartsClone
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  DARTS_CLONE_VERSION = '0.32'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dartsclone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-10 00:00:00.000000000 Z
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Darts-clone.rb is a Ruby binding for the Darts-clone.
14
14
  email:
@@ -18,9 +18,9 @@ extensions:
18
18
  - ext/dartsclone/extconf.rb
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - ".github/workflows/build.yml"
21
22
  - ".gitignore"
22
23
  - ".rspec"
23
- - ".travis.yml"
24
24
  - CHANGELOG.md
25
25
  - CODE_OF_CONDUCT.md
26
26
  - Gemfile
@@ -42,6 +42,7 @@ metadata:
42
42
  homepage_uri: https://github.com/yoshoku/darts-clone.rb
43
43
  source_code_uri: https://github.com/yoshoku/darts-clone.rb
44
44
  changelog_uri: https://github.com/yoshoku/darts-clone.rb/blob/master/CHANGELOG.md
45
+ documentation_uri: https://github.com/yoshoku/darts-clone.rb#usage
45
46
  post_install_message:
46
47
  rdoc_options: []
47
48
  require_paths:
@@ -57,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
58
  - !ruby/object:Gem::Version
58
59
  version: '0'
59
60
  requirements: []
60
- rubygems_version: 3.1.2
61
+ rubygems_version: 3.1.4
61
62
  signing_key:
62
63
  specification_version: 4
63
64
  summary: Ruby binding for the Darts-clone.
@@ -1,11 +0,0 @@
1
- ---
2
- os: linux
3
- dist: xenial
4
- language: ruby
5
- cache: bundler
6
- rvm:
7
- - '2.5'
8
- - '2.6'
9
- - '2.7'
10
-
11
- before_install: gem install bundler -v 2.1.2