hensel_code 0.3.0 → 0.3.1

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: 50f6a13e6cba426fca07fa46a610b85ef7fae043a4a380481cb20ab6df14de3a
4
- data.tar.gz: 89ac88e608472e67fe00238d1e974462747870bf13aa6f85d2391c559656cfcf
3
+ metadata.gz: 5eaefbf55c5b467595cb52c0034036d2133f802fbd20ca63b17edef4c3ec159a
4
+ data.tar.gz: c1b9c4e619c032d11d1d68ca2a858b6da7286a67ac40e81c9c19b9f606f1385f
5
5
  SHA512:
6
- metadata.gz: d67e6bdb32a0a1c70fecc6b00a6d5a3e7b7a6ca426446b02c9b44e3c84f059dccf79e17d6567013ec61f2ddb2641fdc41f34b0887dc36bc287cba89452329398
7
- data.tar.gz: 7f4c9d9deb9edb968e99ad1c67e7cb597789169af91c6c83c9c1288990c531d7fcd732065cd71ce4a7f3cb6fd364667d2cd92932a5c20a4b0dad89bdf0b088d7
6
+ metadata.gz: 3f55c6f2e2ec23a4eac8d098227fc630109c8d3c605b148e281f910111bbe68fbcc79e3437275639c95f808aa63612e97cac44509219431b89bb79e9164321ba
7
+ data.tar.gz: fd298edc25d8ea23c731727109622895a93804a39b8546598e95e19ec8b9235aba384e90c312f7215e175cb1fb0ff26d9bab8198d69554fe12cfd0e998be1986
data/Gemfile CHANGED
@@ -17,6 +17,4 @@ gem "rubocop-rake", "~> 0.6"
17
17
 
18
18
  gem "minitest-reporters", "~> 1.5"
19
19
 
20
- gem "prime", "~> 0.1.2"
21
-
22
20
  gem "codecov", require: false, group: :test
data/Gemfile.lock CHANGED
@@ -2,6 +2,8 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  hensel_code (0.3.0)
5
+ openssl (~> 3.0.0)
6
+ prime (~> 0.1.2)
5
7
 
6
8
  GEM
7
9
  remote: https://rubygems.org/
@@ -19,6 +21,7 @@ GEM
19
21
  builder
20
22
  minitest (>= 5.0)
21
23
  ruby-progressbar
24
+ openssl (3.0.0)
22
25
  parallel (1.21.0)
23
26
  parser (3.1.1.0)
24
27
  ast (~> 2.4.1)
@@ -63,7 +66,6 @@ DEPENDENCIES
63
66
  hensel_code!
64
67
  minitest (~> 5.0)
65
68
  minitest-reporters (~> 1.5)
66
- prime (~> 0.1.2)
67
69
  rake (~> 13.0)
68
70
  rubocop (~> 1.21)
69
71
  rubocop-minitest (~> 0.17.2)
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/hensel_code/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "hensel_code"
7
+ spec.version = HenselCode::VERSION
8
+ spec.authors = ["David William Silva"]
9
+ spec.email = ["contact@davidwsilva.com"]
10
+
11
+ spec.summary = "Homomorphic encoding of rational numbers."
12
+ spec.description = "A Ruby library for homomorphically representing rational numbers as integers."
13
+ spec.homepage = "https://github.com/davidwilliam/hensel_code"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/davidwilliam/hensel_code"
19
+ spec.metadata["changelog_uri"] = "https://github.com/davidwilliam/hensel_code/blob/main/CHANGELOG.md"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ spec.add_dependency "openssl", "~> 3.0.0"
34
+ spec.add_dependency "prime", "~> 0.1.2"
35
+
36
+ # For more information and examples about making a new gem, check out our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ spec.metadata["rubygems_mfa_required"] = "true"
39
+ end
@@ -40,7 +40,7 @@ module HenselCode
40
40
  numbers = [send("random_#{type}", bits)]
41
41
  while numbers.size < quantity
42
42
  number = send("random_#{type}", bits)
43
- numbers << number if number != numbers.last
43
+ numbers << number unless numbers.include?(number)
44
44
  end
45
45
  numbers
46
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HenselCode
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hensel_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David William Silva
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-13 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: openssl
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: prime
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.2
13
41
  description: A Ruby library for homomorphically representing rational numbers as integers.
14
42
  email:
15
43
  - contact@davidwsilva.com
@@ -26,6 +54,7 @@ files:
26
54
  - README.md
27
55
  - Rakefile
28
56
  - codecov
57
+ - hensel_code.gemspec
29
58
  - lib/hensel_code.rb
30
59
  - lib/hensel_code/finite_padic_expansion.rb
31
60
  - lib/hensel_code/gadic_base.rb