fibonacci_rng 1.2.4 → 1.2.5

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: a2b0f346f2a84fffa599f7e59d56266af1071c36
4
- data.tar.gz: a81bb2464457c39090b48e6898d76c906c25487a
3
+ metadata.gz: 4999cbec6a694cd39c97612604da2d3aef472ebc
4
+ data.tar.gz: 6615b8208ac015d76658f2b07cb4509832342e5c
5
5
  SHA512:
6
- metadata.gz: 714b087512536b6bf85d4dea7b92b2b3ff6c0f6f7b9aee66465a9872808b07a7b51b8cca4f24c1ab8cdbaac78c09992c52eb0f91fcf72ec18ce0ed093d644dbc
7
- data.tar.gz: a1ab955cdc11a4fdd9b922dba0345de7421b869db980e270661b31065f0525306f538f705478fc7eef4b9c0fbc2640370d55b7757c4f4522e017391f54a999df
6
+ metadata.gz: 77e649c937622ba4b341ce2d2da7a98a46a030455f323a93fcf21382302ce5306fcb3135ef730fc83681abc2d888747124dd82ddae664602540c9f8b15094ede
7
+ data.tar.gz: 43afbd3b1ae190f3c50f91ad01c41d238709bbbc456a9b46d77a91a98fb728a51339a69d69055286d0e47d7ef2a2c3866c43d5009798b70c968b2f1daa2a6f46
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at peter.c.camilleri@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/README.md CHANGED
@@ -212,6 +212,7 @@ N is shown below:
212
212
  <br>Notes:
213
213
  * The last two elements are copies of the first two elements before
214
214
  the array was transformed.
215
+ * The notation ror(x) above signifies a 29 bit rotate right of the argument.
215
216
  * Not shown above for brevity, the result of each addition is masked with the
216
217
  value 0x1FFFFFFF before being stored. This masks off any data beyond the low
217
218
  29 bits.
data/fibonacci.reek CHANGED
@@ -24,6 +24,9 @@ DuplicateMethodCall:
24
24
  FeatureEnvy:
25
25
  enabled: true
26
26
  exclude: []
27
+ InstanceVariableAssumption:
28
+ enabled: false
29
+ exclude: []
27
30
  IrresponsibleModule:
28
31
  enabled: true
29
32
  exclude: []
@@ -57,6 +60,8 @@ TooManyInstanceVariables:
57
60
  enabled: true
58
61
  exclude: []
59
62
  max_instance_variables: 9
63
+ TooManyConstants:
64
+ max_constants: 10
60
65
  TooManyMethods:
61
66
  enabled: true
62
67
  exclude: []
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = FibonacciRng::VERSION
9
9
  spec.authors = ["Peter Camilleri"]
10
10
  spec.email = ["peter.c.camilleri@gmail.com"]
11
- spec.homepage = "http://teuthida-technologies.com/"
11
+ spec.homepage = "https://github.com/PeterCamilleri/fibonacci_rng"
12
12
  spec.description = "A Fibonacci inspired pseudo random number generator. " +
13
13
  "[Updated] The algorithm is changed to use bit rotate " +
14
14
  "instead of bit shift."
@@ -25,10 +25,11 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.required_ruby_version = '>= 1.9.3'
27
27
 
28
- spec.add_development_dependency 'minitest_visible', ">= 0.1.1"
28
+ spec.add_development_dependency "rake", "~> 12.0"
29
29
  spec.add_development_dependency "bundler", "~> 1.3"
30
- spec.add_development_dependency "rake"
31
- spec.add_development_dependency 'reek', "~> 1.3.8"
32
- spec.add_development_dependency 'minitest', "~> 4.7.5"
33
- spec.add_development_dependency 'rdoc', "~> 4.0.1"
30
+ spec.add_development_dependency 'minitest', "~> 5.7"
31
+ spec.add_development_dependency 'minitest_visible', "~> 0.1"
32
+ spec.add_development_dependency 'rdoc', "~> 5.0"
33
+ spec.add_development_dependency 'reek', "~> 4.5"
34
+
34
35
  end
@@ -50,15 +50,15 @@ class FibonacciRng
50
50
  #Get a pseudo random float
51
51
  def float
52
52
  do_spin
53
- @buffer[0].to_f / BASE
53
+ raw_float / BASE
54
54
  end
55
55
 
56
56
  #Get a better pseudo random float
57
57
  def double
58
58
  do_spin
59
- part_one = @buffer[0].to_f * BASE
59
+ part_one = raw_float * BASE
60
60
  do_spin
61
- (part_one + @buffer[0].to_f) / DOUBLE
61
+ (part_one + raw_float) / DOUBLE
62
62
  end
63
63
 
64
64
  #The printable seven bit ASCII characters.
@@ -74,4 +74,11 @@ class FibonacciRng
74
74
  result
75
75
  end
76
76
 
77
+ private
78
+
79
+ #Get a float value.
80
+ def raw_float
81
+ @buffer[0].to_f
82
+ end
83
+
77
84
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  #The class of Fibonacci inspired random number generators.
4
4
  class FibonacciRng
5
- VERSION = "1.2.4"
5
+ VERSION = "1.2.5"
6
6
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fibonacci_rng
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-23 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest_visible
14
+ name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.1
19
+ version: '12.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.1
26
+ version: '12.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,61 +39,61 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '5.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '5.7'
55
55
  - !ruby/object:Gem::Dependency
56
- name: reek
56
+ name: minitest_visible
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3.8
61
+ version: '0.1'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.3.8
68
+ version: '0.1'
69
69
  - !ruby/object:Gem::Dependency
70
- name: minitest
70
+ name: rdoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 4.7.5
75
+ version: '5.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 4.7.5
82
+ version: '5.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rdoc
84
+ name: reek
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 4.0.1
89
+ version: '4.5'
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: 4.0.1
96
+ version: '4.5'
97
97
  description: A Fibonacci inspired pseudo random number generator. [Updated] The algorithm
98
98
  is changed to use bit rotate instead of bit shift.
99
99
  email:
@@ -103,6 +103,7 @@ extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
105
  - ".gitignore"
106
+ - CODE_OF_CONDUCT.md
106
107
  - Gemfile
107
108
  - LICENSE.txt
108
109
  - README.md
@@ -124,7 +125,7 @@ files:
124
125
  - tools/chi_squared.rb
125
126
  - tools/internal_rng.rb
126
127
  - tools/scatter_plot.rb
127
- homepage: http://teuthida-technologies.com/
128
+ homepage: https://github.com/PeterCamilleri/fibonacci_rng
128
129
  licenses:
129
130
  - MIT
130
131
  metadata: {}
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
145
  version: '0'
145
146
  requirements: []
146
147
  rubyforge_project:
147
- rubygems_version: 2.2.2
148
+ rubygems_version: 2.2.3
148
149
  signing_key:
149
150
  specification_version: 4
150
151
  summary: "[Updated] A Fibonacci inspired pseudo random number generator."