linked_lists 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +8 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +96 -0
- data/LICENSE.txt +21 -0
- data/README.md +70 -0
- data/Rakefile +24 -0
- data/benchmark/append.rb +26 -0
- data/benchmark/benchmark_helper.rb +5 -0
- data/benchmark/pop.rb +26 -0
- data/benchmark/shift.rb +25 -0
- data/benchmark/unshift.rb +26 -0
- data/ext/linked_lists/extconf.rb +5 -0
- data/ext/linked_lists/linked_lists.c +9 -0
- data/ext/linked_lists/linked_lists.h +6 -0
- data/lib/linked_lists/linked_list/node.rb +63 -0
- data/lib/linked_lists/linked_list.rb +985 -0
- data/lib/linked_lists/version.rb +5 -0
- data/lib/linked_lists.rb +11 -0
- data/linked_lists.gemspec +43 -0
- data/sig/linked_lists.rbs +4 -0
- metadata +72 -0
data/lib/linked_lists.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'linked_lists/version'
|
4
|
+
# require_relative "linked_lists/linked_lists" TODO: native extension
|
5
|
+
|
6
|
+
module LinkedLists
|
7
|
+
class Error < StandardError; end
|
8
|
+
# Your code goes here...
|
9
|
+
end
|
10
|
+
|
11
|
+
require_relative 'linked_lists/linked_list'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/linked_lists/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'linked_lists'
|
7
|
+
spec.version = LinkedLists::VERSION
|
8
|
+
spec.authors = ['Mateusz Drewniak']
|
9
|
+
spec.email = ['matmg24@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Adds linked lists and doubly linked lists to Ruby.'
|
12
|
+
spec.description = <<~DESC
|
13
|
+
Adds the linked list structure to Ruby as a proper `Enumerable` class,
|
14
|
+
like `Set` or `Array`.
|
15
|
+
|
16
|
+
Has a similar set of methods to `Array` and `Set`.
|
17
|
+
DESC
|
18
|
+
spec.homepage = 'https://github.com/Verseth/linked_lists'
|
19
|
+
spec.license = 'MIT'
|
20
|
+
spec.required_ruby_version = '>= 2.6.0'
|
21
|
+
|
22
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
23
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
24
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
25
|
+
|
26
|
+
# Specify which files should be added to the gem when it is released.
|
27
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
28
|
+
spec.files = Dir.chdir(__dir__) do
|
29
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
30
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
31
|
+
end
|
32
|
+
end
|
33
|
+
spec.bindir = 'exe'
|
34
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
35
|
+
spec.require_paths = ['lib']
|
36
|
+
# spec.extensions = ['ext/linked_lists/extconf.rb']
|
37
|
+
|
38
|
+
# Uncomment to register a new dependency of your gem
|
39
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
40
|
+
|
41
|
+
# For more information and examples about making a new gem, check out our
|
42
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: linked_lists
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mateusz Drewniak
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-10-16 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: |
|
14
|
+
Adds the linked list structure to Ruby as a proper `Enumerable` class,
|
15
|
+
like `Set` or `Array`.
|
16
|
+
|
17
|
+
Has a similar set of methods to `Array` and `Set`.
|
18
|
+
email:
|
19
|
+
- matmg24@gmail.com
|
20
|
+
executables: []
|
21
|
+
extensions: []
|
22
|
+
extra_rdoc_files: []
|
23
|
+
files:
|
24
|
+
- ".rubocop.yml"
|
25
|
+
- ".ruby-version"
|
26
|
+
- CHANGELOG.md
|
27
|
+
- Gemfile
|
28
|
+
- Gemfile.lock
|
29
|
+
- LICENSE.txt
|
30
|
+
- README.md
|
31
|
+
- Rakefile
|
32
|
+
- benchmark/append.rb
|
33
|
+
- benchmark/benchmark_helper.rb
|
34
|
+
- benchmark/pop.rb
|
35
|
+
- benchmark/shift.rb
|
36
|
+
- benchmark/unshift.rb
|
37
|
+
- ext/linked_lists/extconf.rb
|
38
|
+
- ext/linked_lists/linked_lists.c
|
39
|
+
- ext/linked_lists/linked_lists.h
|
40
|
+
- lib/linked_lists.rb
|
41
|
+
- lib/linked_lists/linked_list.rb
|
42
|
+
- lib/linked_lists/linked_list/node.rb
|
43
|
+
- lib/linked_lists/version.rb
|
44
|
+
- linked_lists.gemspec
|
45
|
+
- sig/linked_lists.rbs
|
46
|
+
homepage: https://github.com/Verseth/linked_lists
|
47
|
+
licenses:
|
48
|
+
- MIT
|
49
|
+
metadata:
|
50
|
+
homepage_uri: https://github.com/Verseth/linked_lists
|
51
|
+
source_code_uri: https://github.com/Verseth/linked_lists
|
52
|
+
rubygems_mfa_required: 'true'
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.6.0
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubygems_version: 3.3.7
|
69
|
+
signing_key:
|
70
|
+
specification_version: 4
|
71
|
+
summary: Adds linked lists and doubly linked lists to Ruby.
|
72
|
+
test_files: []
|