jimmy 0.4.3 → 0.4.4

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: 18121fefc8ac910dd22947258351ead6ba28f6d5
4
- data.tar.gz: 8ed254a0689b645f9342bc5942f58f30209ba572
3
+ metadata.gz: fd49ef4d4b05d882f3725e1a218a36d3b284a700
4
+ data.tar.gz: 106425471819a818f6d7f02f015a75c6f80b9284
5
5
  SHA512:
6
- metadata.gz: 3ba9c0d73a79f5359e97bffd47c196516da7e5f9710e2abd6edd9935fb317a26f5c4e04331524b9b453fe47e2fb2119633f1334b93a148a05802c168f51604d3
7
- data.tar.gz: 16e090af3d657bbc05f7c0ceb37ad1641f24cd76ff673fd244843ca567681e03b43619ace2b4e0803f2693babcb52db03c5f1b013d020087455aa4f609e2c080
6
+ metadata.gz: 038ae82ea61923a19dfe426c495ebc31f63cc3e99e3e3f6f10321800cc2d50c55eead86712502ac1b77f8919e33732df61adb32a0c4da009d91a86d32af376b9
7
+ data.tar.gz: 778c1788969d57776069c776a2947b9689fb9fd09767f013e4bb647f379ff50b51a0968923552f6486c2cee626a86efcd691175f9c6b605950035a151f4d88fc
@@ -4,6 +4,7 @@ module Jimmy
4
4
 
5
5
  trait :min_items
6
6
  trait :max_items
7
+ trait(:unique) { attrs[:unique_items] = true }
7
8
  trait Range do |range|
8
9
  min, max = [range.first, range.last].sort
9
10
  min_items min
@@ -16,7 +17,7 @@ module Jimmy
16
17
  end
17
18
 
18
19
  compile do |hash|
19
- hash.merge! camelize_attrs(%i[min_items max_items])
20
+ hash.merge! camelize_attrs(%i[min_items max_items unique_items])
20
21
  items = attrs[:items] || []
21
22
  if items.length > 1
22
23
  hash['items'] = {'anyOf' => items.map(&:compile)}
data/lib/jimmy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jimmy
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jimmy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil E. Pearson