jimmy 2.0.0 → 2.0.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: 445cebab8aa679190116902608361938ced57a678a878ff03dc8fb15182ffc55
4
- data.tar.gz: 9c9cc22906573a9b311cc92e61a3fd584736a9b4e2aa468060d147b6f7f4c50f
3
+ metadata.gz: f7676c81813716230b7a6069a61ff4627c673dcc6f15086e80db7cc24e8d5657
4
+ data.tar.gz: 494461f91262f612c27ecbc9205ffda3a9a3d3c4832b7747afe98fcc6d8fbb1a
5
5
  SHA512:
6
- metadata.gz: '018afef0aa32e99fb30b3413107e50022df0edd72ac85f62d8be0c9fc376ff48232da2988f63dc26134a80c86ffbbe4284d33f1cba3420cb29a62c0a5bcbcbf3'
7
- data.tar.gz: eff46b385b6b20d30c8c424fe8c8df39868cdfc214cad90628a78dd822eea17a8bd3281b2d450c637d6c8b270fb1dca07e0ce0449a5c9294365116ecf581d539
6
+ metadata.gz: 998722e56117d5d550f0b85453c3ff9bce1e04c672c03063aaadf93148f70a75feb3d9580ccea81b8b8559046f8514af0e07e9c339642d64360a4df67372da86
7
+ data.tar.gz: 2bd6809263817866fbff585537d54dfc0145d3d5e9e670070486a45fecef8ee1ad7215b35c9cfcbf7f3064cb449f1e309db56a629d2e55b116279b636598e11d
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'Jimmy the Gem'
12
12
  spec.description = 'Jimmy the Gem'
13
13
  spec.homepage = 'https://github.com/hx/jimmy'
14
- spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
14
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
15
15
 
16
16
  spec.metadata['homepage_uri'] = spec.homepage
17
17
  spec.metadata['source_code_uri'] = spec.homepage
@@ -17,11 +17,11 @@ module Jimmy
17
17
  # @return [self] self, for chaining
18
18
  def range(range)
19
19
  assert_range range
20
- schema.minimum range.begin
21
- unless range.end.nil?
22
- schema.maximum range.end, exclusive: range.exclude_end?
20
+ schema do |s|
21
+ s.type range.begin.is_a?(Integer) ? 'integer' : 'number'
22
+ s.minimum range.begin
23
+ s.maximum range.end, exclusive: range.exclude_end? unless range.end.nil?
23
24
  end
24
- self
25
25
  end
26
26
  end
27
27
  end
@@ -30,8 +30,7 @@ module Jimmy
30
30
  # @return [self] self, for chaining
31
31
  def pattern(expression)
32
32
  assert_regexp expression
33
- string
34
- set pattern: expression.source
33
+ set(pattern: expression.source).string
35
34
  end
36
35
 
37
36
  FORMATS.each do |format|
@@ -118,6 +118,7 @@ module Jimmy
118
118
  protected
119
119
 
120
120
  def schema
121
+ yield self if block_given?
121
122
  self
122
123
  end
123
124
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jimmy
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil E. Pearson
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 2.3.0
82
+ version: 2.6.0
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="