data_structures_101 0.2.6 → 0.2.7

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
  SHA1:
3
- metadata.gz: e15be8b700463083c82dda684ae895dde3d8baa7
4
- data.tar.gz: 2d63d489be4c9eafac10a425f7f4b52e68a90d6e
3
+ metadata.gz: 9da1e1c439afbfee405a03d8a20ee10801f2ad21
4
+ data.tar.gz: f23f1dd42d7bf0101857de009811880c143f76a5
5
5
  SHA512:
6
- metadata.gz: 11947ea941d77805167838c153543e3db5215817e4d614e78e7d27d9021917cf0cdd21ef312dd8e2f53ca6acecbcc88c2a20eac7430f3e0234e86219f5392b66
7
- data.tar.gz: c4f82b40b433e5156bd8a20492a2833d9d1cf104c0c49b71e97aa67e33098cd3725d559bc34c202b2250d915d74c19e3b9010a8d2e4784231a5252607e8cc382
6
+ metadata.gz: 866abc6a74bce5ba8f9c53f207c79f51b8d25588e753b5592ca5d1c0c749e2836ae20a70cc2f04307fa8aeaa0cfe03778de2468db949f102f39e6c20f578753e
7
+ data.tar.gz: 8e204a45a38b935ee32b43ca4da0586788ab4166666594522e252cb847030c9e0164fb4252a6f846248837181dfa0974eeeb2b5992dd6dd2ba8a00838873a8ea
data/.gitignore CHANGED
@@ -19,5 +19,8 @@
19
19
  *.sublime-project
20
20
  *.sublime-workspace
21
21
 
22
+ # VS Code files
23
+ .vscode
24
+
22
25
  # Gem files
23
26
  *.gem
data/.rubocop.yml CHANGED
@@ -1,9 +1,11 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.4
3
3
  Metrics/MethodLength:
4
- Max: 25
4
+ Max: 30
5
5
  CountComments: false
6
6
  Metrics/AbcSize:
7
+ Exclude:
8
+ - spec/**/*
7
9
  Max: 20
8
10
  Metrics/CyclomaticComplexity:
9
11
  Max: 10
data/.travis.yml CHANGED
@@ -2,6 +2,9 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.4.0
5
+ env:
6
+ global:
7
+ - CI: true
5
8
  script:
6
9
  - bundle exec rspec
7
10
  - bundle exec rubocop lib
@@ -11,7 +14,7 @@ deploy:
11
14
  - provider: pages
12
15
  skip_cleanup: true
13
16
  github_token: $GITHUB_TOKEN
14
- local_dir: doc
17
+ local_dir: .
15
18
  target_branch: gh-pages
16
19
  on:
17
20
  branch: master
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
+ Dir.glob('tasks/*.rake').each { |r| load r}
3
4
 
4
5
  RSpec::Core::RakeTask.new(:spec)
5
6
 
@@ -10,11 +10,11 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["renehr9102@gmail.com"]
11
11
 
12
12
  spec.summary = %q{DataStructures101 is a simple gem that groups several implementations of common data structures usually taught in Computer Science courses.}
13
- spec.homepage = "https://github.com/renehernandez/bok-data_structures_101"
13
+ spec.homepage = "https://github.com/renehernandez/data_structures_101"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
- f.match(%r{^(test|spec|features)/})
17
+ f.match(%r{^(test|spec|features|doc|tasks)/})
18
18
  end
19
19
  spec.bindir = "exe"
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -25,7 +25,11 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rspec", "~> 3.5"
26
26
  spec.add_development_dependency "reek", "~> 4.7"
27
27
  spec.add_development_dependency "rubocop", "~> 0.49"
28
- spec.add_development_dependency "yard"
29
- spec.add_development_dependency "redcarpet"
30
- spec.add_development_dependency "github-markup"
28
+ spec.add_development_dependency "yard", "~> 0.9"
29
+ spec.add_development_dependency "redcarpet", "~> 3.4"
30
+ spec.add_development_dependency "github-markup", "~> 1.6"
31
+ unless ENV['CI']
32
+ spec.add_development_dependency "benchmark-ips", "~> 2.7"
33
+ spec.add_development_dependency "gruff", "~> 0.7"
34
+ end
31
35
  end
@@ -19,7 +19,7 @@ module DataStructures101
19
19
 
20
20
  return unless @probe_lambda.nil?
21
21
 
22
- @probe_lambda = ->(h, i) { return (h + i) % @capacity }
22
+ @probe_lambda = ->(h, i, cap) { return (h + i) % cap }
23
23
  end
24
24
 
25
25
  private
@@ -73,7 +73,7 @@ module DataStructures101
73
73
 
74
74
  j = 0
75
75
  loop do
76
- i = @probe_lambda.call(h, j)
76
+ i = @probe_lambda.call(h, j, @capacity)
77
77
  if slot_available?(i)
78
78
  idx = i if idx == -1
79
79
  break if @table[i].nil?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DataStructures101
4
- VERSION = '0.2.6'
4
+ VERSION = '0.2.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_structures_101
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - renehernandez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-03 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,44 +84,44 @@ dependencies:
84
84
  name: yard
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '0.9'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '0.9'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: redcarpet
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '3.4'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '3.4'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: github-markup
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '1.6'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '1.6'
125
125
  description:
126
126
  email:
127
127
  - renehr9102@gmail.com
@@ -144,6 +144,15 @@ files:
144
144
  - bin/setup
145
145
  - config.reek
146
146
  - data_structures_101.gemspec
147
+ - docs/graphs/hash/default_benchmark_delete.png
148
+ - docs/graphs/hash/default_benchmark_find.png
149
+ - docs/graphs/hash/default_benchmark_insert.png
150
+ - docs/graphs/hash/division_method_benchmark_delete.png
151
+ - docs/graphs/hash/division_method_benchmark_find.png
152
+ - docs/graphs/hash/division_method_benchmark_insert.png
153
+ - docs/graphs/hash/quadratic_probing_benchmark_delete.png
154
+ - docs/graphs/hash/quadratic_probing_benchmark_find.png
155
+ - docs/graphs/hash/quadratic_probing_benchmark_insert.png
147
156
  - lib/data_structures_101.rb
148
157
  - lib/data_structures_101/chained_hash_table.rb
149
158
  - lib/data_structures_101/hash/base_hash_table.rb
@@ -151,7 +160,7 @@ files:
151
160
  - lib/data_structures_101/linked_list.rb
152
161
  - lib/data_structures_101/probe_hash_table.rb
153
162
  - lib/data_structures_101/version.rb
154
- homepage: https://github.com/renehernandez/bok-data_structures_101
163
+ homepage: https://github.com/renehernandez/data_structures_101
155
164
  licenses:
156
165
  - MIT
157
166
  metadata: {}
@@ -171,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
180
  version: '0'
172
181
  requirements: []
173
182
  rubyforge_project:
174
- rubygems_version: 2.6.11
183
+ rubygems_version: 2.6.13
175
184
  signing_key:
176
185
  specification_version: 4
177
186
  summary: DataStructures101 is a simple gem that groups several implementations of