dartsclone 0.2.3 → 0.3.2

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: cb26ccf4db7270207b1243ba5d9ceb92ab0aafb9233474aa24f5aa22f89115eb
4
- data.tar.gz: 16aa57d9ae6af8056c410516647ef6753516ba06a9a6db36701386eb08409156
3
+ metadata.gz: e5c8c715224717189a3cdf3f81f8355a7a53be38600df89f36ca0494b5675ee1
4
+ data.tar.gz: b6494f6c74ae12099f355a9cbd255eb74cae9b53a49bff3dffa9b29f012943a0
5
5
  SHA512:
6
- metadata.gz: 1c3f7e648d54c76a72d8c1735cc1a1f623aeca0c04efff9386ff7ab1fc2607947e1308843d8480dcfeab283f695ca22f8bf1f07cfdf2f8c46854c235ed454587
7
- data.tar.gz: 963c8b038ba62948ab3b77f1ded8b16ce21ea2663194ba6320008c85a2151d460230e93329ae8c2efa4d886e88dae4450860237afde242ae2ba8ec6124558bf1
6
+ metadata.gz: 99670d66df938b290560c45ab0df6b2d527631a0be6048dacc888ecca3a3952829e6ee0a539517bbebc598860234d5b38096bb05720185957b0ae9bdab9b6dbb
7
+ data.tar.gz: c81deeea74a982f6e6fc13ef8eaf5f0cf6e030a542f4db320d5c9c792e404b1ea2e0183ddfcde52a520065ab103d15f8af0a80ec8bccc1dfeeead72d5425ad6d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.3.2
2
+ - Refactor codes and configs with RuboCop.
3
+
4
+ ## 0.3.1
5
+ - Add dummy constructor call at memory allocation of binding class to prevent occuring segment fault on GC when initialize method is failed.
6
+
7
+ ## 0.3.0
8
+ - Add type declaration file: sig/dartsclone.rbs
9
+
1
10
  ## 0.2.3
2
11
  - Fix some codes and configulation files.
3
12
 
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020-2021 Atsushi Tatsuma
1
+ Copyright (c) 2020-2022 Atsushi Tatsuma
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -4,7 +4,7 @@
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/main/LICENSE.txt)
6
6
 
7
- Darts-clone.rb is a Ruby binding for the [Darts-clone](https://github.com/s-yata/darts-clone).
7
+ Darts-clone.rb provides Ruby bindings for the [Darts-clone](https://github.com/s-yata/darts-clone).
8
8
 
9
9
  ## Installation
10
10
 
@@ -51,14 +51,11 @@ da.open('foo.dat')
51
51
  ## Contributing
52
52
 
53
53
  Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/darts-clone.rb.
54
- This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/darts-clone.rb/blob/main/CODE_OF_CONDUCT.md).
54
+ This project is intended to be a safe, welcoming space for collaboration,
55
+ and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
55
56
 
56
57
  ## License
57
58
 
58
59
  The gem is available as open source under the terms of the [BSD 2-clause License](https://opensource.org/licenses/BSD-2-Clause).
59
60
  Moreover, the gem includes the source code of Darts-clone.
60
61
  The License of Darts-clone can be found in [COPYING.md](https://github.com/yoshoku/darts-clone.rb/blob/main/ext/dartsclone/src/COPYING.md).
61
-
62
- ## Code of Conduct
63
-
64
- Everyone interacting in the Darts project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/darts-clone.rb/blob/main/CODE_OF_CONDUCT.md).
@@ -11,6 +11,7 @@ class RbDoubleArray
11
11
  public:
12
12
  static VALUE double_array_alloc(VALUE self) {
13
13
  Darts::DoubleArray* ptr = (Darts::DoubleArray*)ruby_xmalloc(sizeof(Darts::DoubleArray));
14
+ new (ptr) Darts::DoubleArray(); // dummy call to constructor for GC.
14
15
  return TypedData_Wrap_Struct(self, &double_array_type, ptr);
15
16
  };
16
17
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DartsClone
4
- VERSION = '0.2.3'
4
+ VERSION = '0.3.2'
5
5
  DARTS_CLONE_VERSION = '0.32'
6
6
  end
@@ -0,0 +1,20 @@
1
+ module DartsClone
2
+ VERSION: String
3
+ DARTS_CLONE_VERSION: String
4
+
5
+ class DoubleArray
6
+ def initialize: () -> void
7
+ def build: (Array[String] keys, ?values: Array[Integer]? values) -> bool
8
+ def open: (String filename) -> bool
9
+ def save: (String filename, ?mode: String mode, ?offset: Integer offset) -> bool
10
+ def get_array: () -> String
11
+ def set_array: (String str) -> nil
12
+ def exact_match_search: (String key, ?length: Integer length, ?node_pos: Integer node_pos) -> Integer
13
+ def common_prefix_search: (String key, ?max_num_results: Integer? max_num_results, ?length: Integer length, ?node_pos: Integer node_pos) -> [Array[String], Array[Integer]]
14
+ def traverse: (String key, ?node_pos: Integer? node_pos, ?key_pos: Integer? key_pos, ?length: Integer? length) -> { value: Integer, node_pos: Integer, key_pos: Integer }
15
+ def unit_size: () -> Integer
16
+ def size: () -> Integer
17
+ def total_size: () -> Integer
18
+ def clear: () -> nil
19
+ end
20
+ end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dartsclone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-03 00:00:00.000000000 Z
11
+ date: 2022-06-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Darts-clone.rb is a Ruby binding for the Darts-clone.
13
+ description: Darts-clone.rb provides Ruby bindings for the Darts-clone.
14
14
  email:
15
15
  - yoshoku@outlook.com
16
16
  executables: []
@@ -18,16 +18,9 @@ extensions:
18
18
  - ext/dartsclone/extconf.rb
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - ".github/workflows/build.yml"
22
- - ".gitignore"
23
- - ".rspec"
24
21
  - CHANGELOG.md
25
- - CODE_OF_CONDUCT.md
26
- - Gemfile
27
22
  - LICENSE.txt
28
23
  - README.md
29
- - Rakefile
30
- - dartsclone.gemspec
31
24
  - ext/dartsclone/dartscloneext.cpp
32
25
  - ext/dartsclone/dartscloneext.hpp
33
26
  - ext/dartsclone/extconf.rb
@@ -35,6 +28,7 @@ files:
35
28
  - ext/dartsclone/src/darts.h
36
29
  - lib/dartsclone.rb
37
30
  - lib/dartsclone/version.rb
31
+ - sig/dartsclone.rbs
38
32
  homepage: https://github.com/yoshoku/darts-clone.rb
39
33
  licenses:
40
34
  - BSD-2-Clause
@@ -43,6 +37,7 @@ metadata:
43
37
  source_code_uri: https://github.com/yoshoku/darts-clone.rb
44
38
  changelog_uri: https://github.com/yoshoku/darts-clone.rb/blob/master/CHANGELOG.md
45
39
  documentation_uri: https://github.com/yoshoku/darts-clone.rb#usage
40
+ rubygems_mfa_required: 'true'
46
41
  post_install_message:
47
42
  rdoc_options: []
48
43
  require_paths:
@@ -58,8 +53,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
53
  - !ruby/object:Gem::Version
59
54
  version: '0'
60
55
  requirements: []
61
- rubygems_version: 3.2.7
56
+ rubygems_version: 3.2.33
62
57
  signing_key:
63
58
  specification_version: 4
64
- summary: Ruby binding for the Darts-clone.
59
+ summary: Ruby bindings for the Darts-clone.
65
60
  test_files: []
@@ -1,22 +0,0 @@
1
- name: build
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- strategy:
9
- fail-fast: false
10
- matrix:
11
- ruby: [ '2.5', '2.6', '2.7', '3.0' ]
12
- steps:
13
- - uses: actions/checkout@v2
14
- - name: Set up Ruby ${{ matrix.ruby }}
15
- uses: actions/setup-ruby@v1
16
- with:
17
- ruby-version: ${{ matrix.ruby }}
18
- - name: Build and test with Rake
19
- run: |
20
- gem install --no-document bundler
21
- bundle install --jobs 4 --retry 3
22
- bundle exec rake
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- *.bundle
10
- *.so
11
- *.o
12
- *.a
13
- *.swp
14
- mkmf.log
15
- tags
16
- .DS_Store
17
- .ruby-version
18
- spec/foo.dat
19
-
20
- # rspec failure tracking
21
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at yoshoku@outlook.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in darts.gemspec
4
- gemspec
5
-
6
- gem "rake", "~> 13.0"
7
- gem "rake-compiler"
8
- gem "rspec", "~> 3.0"
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- require 'rake/extensiontask'
7
-
8
- task :build => :compile
9
-
10
- Rake::ExtensionTask.new('dartscloneext') do |ext|
11
- ext.ext_dir = 'ext/dartsclone'
12
- ext.lib_dir = 'lib/dartsclone'
13
- end
14
-
15
- task :default => [:clobber, :compile, :spec]
data/dartsclone.gemspec DELETED
@@ -1,28 +0,0 @@
1
- require_relative 'lib/dartsclone/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = 'dartsclone'
5
- spec.version = DartsClone::VERSION
6
- spec.authors = ['yoshoku']
7
- spec.email = ['yoshoku@outlook.com']
8
-
9
- spec.summary = 'Ruby binding for the Darts-clone.'
10
- spec.description = 'Darts-clone.rb is a Ruby binding for the Darts-clone.'
11
- spec.homepage = 'https://github.com/yoshoku/darts-clone.rb'
12
- spec.license = 'BSD-2-Clause'
13
-
14
- spec.metadata['homepage_uri'] = spec.homepage
15
- spec.metadata['source_code_uri'] = spec.homepage
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'
18
-
19
- # Specify which files should be added to the gem when it is released.
20
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
22
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
- end
24
- spec.bindir = 'exe'
25
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
- spec.require_paths = ['lib']
27
- spec.extensions = ['ext/dartsclone/extconf.rb']
28
- end