text-gen 0.12.0 → 0.12.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a96a06698a3f29093011dac3d0f9311741ffa92707ee42d685837480efaf458e
4
- data.tar.gz: 3d6a85c17d38b8e2f13c203744e088efe7ff12d1f8d0eebc26551d9b94a0d9c7
3
+ metadata.gz: 1f4b6dac1a3fe31b9d98c79834a4fc69af77a06e5206d8051e6e6fe5d6e2742f
4
+ data.tar.gz: bbf696d52a9838d6c9caccb1d8ae2772ed75cde64a82325db1d9a673eb664d38
5
5
  SHA512:
6
- metadata.gz: bbcf087725fc5fa33da6427ddd0ff10e0482083a1e8193c37a2a609e63bf2a1932c4763bae0811ff29d489e70736a6e47e46503b0010f1a90db84dbd18f5fc0f
7
- data.tar.gz: c4cc7a812869a52bab81fcd78dfcebea2c64951b09299ccdb9c7f1cda7cc05b65635082cb15c03d0ff61ae248eb031f166edce39c3da52cbe1e4ce379a3d47b9
6
+ metadata.gz: 6f5bfbc0ad2b052980ad177dea9f0f9eb688447defd40cc0f352025e881b57a408510e50f5788bfd17a45b2996cd597e06d05d56c50a9d28b8444a1b54ae9ee1
7
+ data.tar.gz: '089919fc1c912b1ec0ddb13a25c6ca32e55d6a64d05afe368c5b93b97b6c6377603b255ce0c74f5f650fc88943c4b74f3e1b8cd448690427fdbff39c78279540'
@@ -6,7 +6,7 @@ module Text
6
6
  # Return nil if the text value has already been generated
7
7
  class Distinct < Base
8
8
  def result(context, result)
9
- return result if @depth && context.depth != @depth
9
+ return result if key != context.current_key
10
10
 
11
11
  previous = context.remembered(key)
12
12
  return nil if previous.any? { |r| r.text.strip.downcase == result.text.strip.downcase }
@@ -5,7 +5,7 @@ module Text
5
5
  module Filter
6
6
  class Remember < Base
7
7
  def result(context, result)
8
- return result if @depth && context.depth != @depth
8
+ return result if key != context.current_key
9
9
 
10
10
  previous = context.remembered(key)
11
11
  return previous.sample unless previous.nil? || previous.empty?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Text
4
4
  module Gen
5
- VERSION = "0.12.0"
5
+ VERSION = "0.12.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - G Palmer