data-validator 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 43e341fbbededef9b22873786e968cbc88b4e792
4
- data.tar.gz: 23e63129a76bebe6673f554851107b35ff7a69d7
3
+ metadata.gz: 6c0b111d5ff665740d694bc24cc0b880764592b3
4
+ data.tar.gz: 37224d4295b3f968e58b52874656b465e75dbf81
5
5
  SHA512:
6
- metadata.gz: ca0a84a63e3ec0b129a8c3edfdf5ef00f381710b22189b886855085c880d44a8feb0aa404d674aff4ef5357045c4036fdd9854fd6125fd277359863c2125ed63
7
- data.tar.gz: 8fc856b878d892559a1863d1460955964c0617a87d0bb713f3ce85e8bd8c952020797e8f2b34f305969a2fb42865bda5155dc07593d87b39d3343d69847fe28c
6
+ metadata.gz: 040be98b8146b289a6cf59f490e0d6bd949f02c2f6a9fe439a849d728f1a08590d26f795cf94ea54990973f9b098f03cfe9694a743edb5ffb59975d4f4eb284b
7
+ data.tar.gz: e7fb62c23cef4b75597befdbb5895e8e285e2ef130a21b0866a5d755be6bf78779fe49df876b948248ebc68e6178cd000d4df3582900a943ea47cae7b7d02548
@@ -20,4 +20,4 @@
20
20
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
- Data::Validator::VERSION = "1.0.0"
23
+ Data::Validator::VERSION = "1.0.1"
@@ -85,7 +85,7 @@ class Data::Validator
85
85
  when @isa == Hash then
86
86
  recur = rule[:rule].each_pair.each_with_object Hash.new do |(k, v), r|
87
87
  case v when Hash then
88
- r[k] = self.class.send :bare_new, v
88
+ r[k] = self.class.send :bare_new, **v
89
89
  else
90
90
  r[k] = self.class.send :bare_new, isa: v
91
91
  end
@@ -229,4 +229,4 @@ class Data::Validator
229
229
  end
230
230
 
231
231
  require_relative 'validator/recursive'
232
- require_relative 'validator/Error'
232
+ require_relative 'validator/error'
@@ -7,9 +7,9 @@ class Test008Optional < Test::Unit::TestCase
7
7
  v = Data::Validator.new(
8
8
  'foo' => { },
9
9
  'bar' => { },
10
- 'baz' => { optional => 1 }
10
+ 'baz' => { optional: 1 }
11
11
  )
12
- asset { v.is_a? Data::Validator }
12
+ assert { v.is_a? Data::Validator }
13
13
 
14
14
  args = v.validate({ 'foo' => 1, 'bar' => 2 })
15
15
  assert { args == { 'foo' => 1, 'bar' => 2 } }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data-validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Urabe, Shyouhei
@@ -130,7 +130,7 @@ files:
130
130
  - test/gfx/002_isa.rb
131
131
  - test/gfx/003_default.rb
132
132
  - test/gfx/004_xor.rb
133
- - test/gfx/008_optional.t
133
+ - test/gfx/008_optional.rb
134
134
  - test/gfx/010_common_params.rb
135
135
  - test/gfx/104_extra_args.rb
136
136
  - test/xaicron/00_compile.rb
@@ -167,7 +167,7 @@ test_files:
167
167
  - test/gfx/002_isa.rb
168
168
  - test/gfx/003_default.rb
169
169
  - test/gfx/004_xor.rb
170
- - test/gfx/008_optional.t
170
+ - test/gfx/008_optional.rb
171
171
  - test/gfx/010_common_params.rb
172
172
  - test/gfx/104_extra_args.rb
173
173
  - test/xaicron/00_compile.rb