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 +4 -4
- data/.github/workflows/build.yml +21 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/dartsclone.gemspec +1 -0
- data/ext/dartsclone/dartscloneext.hpp +22 -4
- data/lib/dartsclone/version.rb +1 -1
- metadata +5 -4
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f885b4746eda49bbcdf7dd447acf1f5249f41fd3f259b9b5a0c4aefdb166a53
|
4
|
+
data.tar.gz: 1526d141d3e0671be8b7bf80ea192477a6f2795fbfc627050a1a7edb9e37f7f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Darts-clone.rb
|
2
2
|
|
3
|
-
[![Build Status](https://
|
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
|
|
data/dartsclone.gemspec
CHANGED
@@ -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
|
12
|
+
return TypedData_Wrap_Struct(self, &double_array_type, ptr);
|
13
13
|
};
|
14
14
|
|
15
|
-
static void double_array_free(
|
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
|
-
|
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 */
|
data/lib/dartsclone/version.rb
CHANGED
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.
|
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-
|
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.
|
61
|
+
rubygems_version: 3.1.4
|
61
62
|
signing_key:
|
62
63
|
specification_version: 4
|
63
64
|
summary: Ruby binding for the Darts-clone.
|