dartsclone 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -5
- data/lib/dartsclone/version.rb +1 -1
- metadata +4 -12
- data/.github/workflows/build.yml +0 -20
- data/.gitignore +0 -21
- data/.rspec +0 -3
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -10
- data/Rakefile +0 -15
- data/Steepfile +0 -20
- data/dartsclone.gemspec +0 -28
- data/ext/dartsclone/dummy.rb +0 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5c8c715224717189a3cdf3f81f8355a7a53be38600df89f36ca0494b5675ee1
|
4
|
+
data.tar.gz: b6494f6c74ae12099f355a9cbd255eb74cae9b53a49bff3dffa9b29f012943a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99670d66df938b290560c45ab0df6b2d527631a0be6048dacc888ecca3a3952829e6ee0a539517bbebc598860234d5b38096bb05720185957b0ae9bdab9b6dbb
|
7
|
+
data.tar.gz: c81deeea74a982f6e6fc13ef8eaf5f0cf6e030a542f4db320d5c9c792e404b1ea2e0183ddfcde52a520065ab103d15f8af0a80ec8bccc1dfeeead72d5425ad6d
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -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,
|
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).
|
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.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:
|
11
|
+
date: 2022-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Darts-clone.rb provides Ruby bindings for the Darts-clone.
|
14
14
|
email:
|
@@ -18,20 +18,11 @@ 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
|
-
- Steepfile
|
31
|
-
- dartsclone.gemspec
|
32
24
|
- ext/dartsclone/dartscloneext.cpp
|
33
25
|
- ext/dartsclone/dartscloneext.hpp
|
34
|
-
- ext/dartsclone/dummy.rb
|
35
26
|
- ext/dartsclone/extconf.rb
|
36
27
|
- ext/dartsclone/src/COPYING.md
|
37
28
|
- ext/dartsclone/src/darts.h
|
@@ -46,6 +37,7 @@ metadata:
|
|
46
37
|
source_code_uri: https://github.com/yoshoku/darts-clone.rb
|
47
38
|
changelog_uri: https://github.com/yoshoku/darts-clone.rb/blob/master/CHANGELOG.md
|
48
39
|
documentation_uri: https://github.com/yoshoku/darts-clone.rb#usage
|
40
|
+
rubygems_mfa_required: 'true'
|
49
41
|
post_install_message:
|
50
42
|
rdoc_options: []
|
51
43
|
require_paths:
|
@@ -61,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
53
|
- !ruby/object:Gem::Version
|
62
54
|
version: '0'
|
63
55
|
requirements: []
|
64
|
-
rubygems_version: 3.2.
|
56
|
+
rubygems_version: 3.2.33
|
65
57
|
signing_key:
|
66
58
|
specification_version: 4
|
67
59
|
summary: Ruby bindings for the Darts-clone.
|
data/.github/workflows/build.yml
DELETED
@@ -1,20 +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.6', '2.7', '3.0' ]
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v2
|
14
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
15
|
-
uses: ruby/setup-ruby@v1
|
16
|
-
with:
|
17
|
-
ruby-version: ${{ matrix.ruby }}
|
18
|
-
bundler-cache: true
|
19
|
-
- name: Build and test with Rake
|
20
|
-
run: 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
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
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/Steepfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
target :lib do
|
2
|
-
signature "sig"
|
3
|
-
#
|
4
|
-
check "lib" # Directory name
|
5
|
-
# check "Gemfile" # File name
|
6
|
-
# check "app/models/**/*.rb" # Glob
|
7
|
-
# # ignore "lib/templates/*.rb"
|
8
|
-
#
|
9
|
-
# # library "pathname", "set" # Standard libraries
|
10
|
-
# # library "strong_json" # Gems
|
11
|
-
end
|
12
|
-
|
13
|
-
# target :spec do
|
14
|
-
# signature "sig", "sig-private"
|
15
|
-
#
|
16
|
-
# check "spec"
|
17
|
-
#
|
18
|
-
# # library "pathname", "set" # Standard libraries
|
19
|
-
# # library "rspec"
|
20
|
-
# end
|
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 bindings for the Darts-clone.'
|
10
|
-
spec.description = 'Darts-clone.rb provides Ruby bindings 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
|
data/ext/dartsclone/dummy.rb
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
# This class is for yard.
|
2
|
-
|
3
|
-
# Darts-clone.rb is a Ruby binding for the Darts-clone.
|
4
|
-
module DartsClone
|
5
|
-
# The version of Darts-clone.rb you are using.
|
6
|
-
VERSION = '0.2.2'
|
7
|
-
|
8
|
-
# The version of Darts-clone that this gem is binding to.
|
9
|
-
DARTS_CLONE_VERSION = '0.32'
|
10
|
-
|
11
|
-
# DoubleArray is a class that implements double-array trie.
|
12
|
-
#
|
13
|
-
# @example
|
14
|
-
# require 'dartsclone'
|
15
|
-
#
|
16
|
-
# da = DartsClone::DoubleArray.new
|
17
|
-
#
|
18
|
-
# keys = ['abc', 'abcd', 'abcde', 'bcd', 'cde']
|
19
|
-
# da.build(keys)
|
20
|
-
#
|
21
|
-
# p da.common_prefix_search('abcde')
|
22
|
-
# # => [["abc", "abcd", "abcde"], [0, 1, 2]]
|
23
|
-
#
|
24
|
-
class DoubleArray
|
25
|
-
# Create a new double-array trie.
|
26
|
-
def initialize; end
|
27
|
-
|
28
|
-
# Build index of double-array trie
|
29
|
-
#
|
30
|
-
# @param keys [Array<String>]
|
31
|
-
# @param values [Array<Integer>]
|
32
|
-
# @return [Boolean]
|
33
|
-
def build(keys, values: nil); end
|
34
|
-
|
35
|
-
# Open saved index.
|
36
|
-
#
|
37
|
-
# @param filename [String]
|
38
|
-
# @return [Boolean]
|
39
|
-
def open(filename); end
|
40
|
-
|
41
|
-
# Save index.
|
42
|
-
#
|
43
|
-
# @param filename [String]
|
44
|
-
# @param mode [String]
|
45
|
-
# @param offset [Integer]
|
46
|
-
# @return [Boolean]
|
47
|
-
def save(filename, mode: 'wb', offset: 0); end
|
48
|
-
|
49
|
-
# Dump array data.
|
50
|
-
#
|
51
|
-
# @return [String]
|
52
|
-
def get_array(); end
|
53
|
-
|
54
|
-
# Load array data.
|
55
|
-
#
|
56
|
-
# @param str [String]
|
57
|
-
def set_array(str); end
|
58
|
-
|
59
|
-
# Search with exact match
|
60
|
-
#
|
61
|
-
# @param key [String]
|
62
|
-
# @param length [Integer]
|
63
|
-
# @param node_pos [Integer]
|
64
|
-
def exact_match_search(key, length: 0, node_pos: 0); end
|
65
|
-
|
66
|
-
# Common prefix search.
|
67
|
-
#
|
68
|
-
# @param key [String]
|
69
|
-
def common_prefix_search(key, max_num_results: nil, length: 0, node_pos: 0); end
|
70
|
-
|
71
|
-
# Traverse trie.
|
72
|
-
#
|
73
|
-
# @param key [String]
|
74
|
-
def traverse(key, node_pos: nil, key_pos: nil, length: nil); end
|
75
|
-
|
76
|
-
# size
|
77
|
-
# @return [Integer]
|
78
|
-
def unit_size(); end
|
79
|
-
|
80
|
-
# unit size
|
81
|
-
# @return [Integer]
|
82
|
-
def size(); end
|
83
|
-
|
84
|
-
# total size
|
85
|
-
# @return [Integer]
|
86
|
-
def total_size(); end
|
87
|
-
|
88
|
-
# clear trie
|
89
|
-
# @return [Nil]
|
90
|
-
def clear(); end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|