dunmanifestin 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dunmanifestin.rb +1 -0
- data/lib/dunmanifestin/array.rb +5 -4
- data/lib/dunmanifestin/terminator.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e08fd19462f956e116b9fc58b7a00e8988afcc391947b2321a925249c2602458
|
4
|
+
data.tar.gz: 344b6336a1c3303dd8f4ffc88cc82e37c107e34db95f89b67fbd66fd546704f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaf0fa4b3433ed699741da6b557071d33b576c142899c402181f7b5cdf219fa619f693243f043019018aa05e8ee118fe97f065b76c0df192b1e4ca49254039d1
|
7
|
+
data.tar.gz: 47281b79a2d37d99144ea58b90a50730ccb97a15274a66bf5dcb8b150cc637ab5f3a279158174027389b1e3c3f3a2346f5f0d062df4012be7cae6e2ad9233f6c
|
data/lib/dunmanifestin.rb
CHANGED
data/lib/dunmanifestin/array.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require_relative 'integer'
|
2
2
|
|
3
3
|
class Array
|
4
|
-
|
4
|
+
|
5
5
|
|
6
6
|
class << self
|
7
|
-
attr_accessor :coarse_seed, :fine_seed, :diversity
|
7
|
+
attr_accessor :coarse_seed, :fine_seed, :diversity, :recurrences
|
8
8
|
|
9
9
|
def meta_random
|
10
10
|
@meta_random ||= @fine_seed ? Random.new(@fine_seed) : Random.new
|
@@ -12,8 +12,9 @@ class Array
|
|
12
12
|
|
13
13
|
def randoms
|
14
14
|
@coarse_seed ||= meta_random.rand(Integer::MAX)
|
15
|
-
@
|
16
|
-
|
15
|
+
@recurrences ||= 500
|
16
|
+
@randoms ||= @recurrences.times.map do |i|
|
17
|
+
Random.new(@coarse_seed + (i % (@diversity||Integer::MAX)))
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -11,7 +11,8 @@ class Terminator
|
|
11
11
|
def address demands
|
12
12
|
Array.coarse_seed = demands[:coarse_seed]
|
13
13
|
Array.fine_seed = demands[:fine_seed]
|
14
|
-
Array.diversity =
|
14
|
+
Array.diversity = 2
|
15
|
+
Array.recurrences = 20
|
15
16
|
phrase_string = phrasing(demands[:phrase], demands[:file])
|
16
17
|
root_phrase_class = Class.new(Phrase) { list phrase_string, !!demands[:file] }
|
17
18
|
list_loader.load demands[:genre]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dunmanifestin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- quavmo
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-04-
|
13
|
+
date: 2019-04-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|