dry-validation-matchers 1.2.1 → 1.2.2

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: a2a26d1b25ccab7d54eb5b34a6de7196fd56ffcf9c7b13ccc3baca67c2cf0f73
4
- data.tar.gz: '09bd7d53cbb6df2aff01c71379fd70f55511fdc9c7c98d53f268d3048aecda3c'
3
+ metadata.gz: fb356fd9e7bd319025961ef39a1ea6d0418de27d0898035b3076bd3b3226e74d
4
+ data.tar.gz: 5cda89f507dfc43126811c8c14fbb742e3a310f06caae942e8c572df84ad1804
5
5
  SHA512:
6
- metadata.gz: 66aeec4d694da72968e780169b2b5d2e4e1d135584bfcc0705feaaaa5f3b58f2e440e690bba13218ba436e9a04e3fc89747da431cfd4e23c40420af2d0485c04
7
- data.tar.gz: 4323d57686a976430fe2a3b1636d1442572c3e2278c844e40e5bd30e87e4a84c319274d4f69e59a143baa21958bfda22172fdc41402b17ef53660f0cfd2500a4
6
+ metadata.gz: b80ecd94935e51a6cb59458fd27476c12bb76565e1a182325a33e76f5387c52c74f3e3e411a05cec7df184480cddc841187b307bb9fb5e023f0eeea914692a96
7
+ data.tar.gz: 1299dd2ef1395819995aa17835eeb442452357e36701500893e14dac2551bc01b8ab7beb680527b32b180f1e7d6b48a6632d1642d8f42e20a265373e776f0e52
@@ -0,0 +1,35 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['2.6', '2.7', '3.0']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ # uses: ruby/setup-ruby@v1
30
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
31
+ with:
32
+ ruby-version: ${{ matrix.ruby-version }}
33
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
+ - name: Run tests
35
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [1.2.2] - 2021-06-15
8
+ ### Fixed
9
+ - Use long-hand name for types. Not sure when it changed, but the short-hand
10
+ (i.e. `str?`) no longer works
11
+
7
12
  ## [1.2.1] - 2019-11-22
8
13
  ### Fixed
9
14
  - Deprecation messages re BigDecimal()
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Dry::Validation::Matchers
2
2
 
3
- [![Build Status](https://travis-ci.org/bloom-solutions/dry-validation-matchers.svg?branch=master)](https://travis-ci.org/bloom-solutions/dry-validation-matchers)
4
-
5
3
  RSpec matchers for [Dry::Validation](dry-rb.org/gems/dry-validation).
6
4
 
7
5
  ## Installation
@@ -40,8 +38,8 @@ RSpec.describe "Integration with RSpec", type: %i[dry_validation] do
40
38
  params do
41
39
  required(:username).filled
42
40
  required(:first_name)
43
- required(:age).filled(:int?)
44
- required(:last_name).filled(:str?)
41
+ required(:age).filled(:integer)
42
+ required(:last_name).filled(:string)
45
43
  optional(:mobile).filled
46
44
  optional(:email)
47
45
  optional(:decimal_value)
@@ -1,13 +1,13 @@
1
1
  module Dry::Validation::Matchers
2
2
  class ValidateMatcher
3
3
 
4
- DEFAULT_TYPE = :str
4
+ DEFAULT_TYPE = :string
5
5
  TYPE_ERRORS = {
6
- str: {
6
+ string: {
7
7
  test_value: "str",
8
8
  message: "must be a string",
9
9
  },
10
- int: {
10
+ integer: {
11
11
  test_value: 43,
12
12
  message: "must be an integer",
13
13
  },
@@ -111,7 +111,7 @@ module Dry::Validation::Matchers
111
111
  check_macro_usage!(schema)
112
112
  end
113
113
 
114
- def filled(type=:str)
114
+ def filled(type=DEFAULT_TYPE)
115
115
  @check_filled = true
116
116
  @type = type
117
117
  self
@@ -1,7 +1,7 @@
1
1
  module Dry
2
2
  module Validation
3
3
  module Matchers
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-validation-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-22 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation
@@ -73,10 +73,10 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".github/workflows/ruby.yml"
76
77
  - ".gitignore"
77
78
  - ".rspec"
78
79
  - ".ruby-version"
79
- - ".travis.yml"
80
80
  - CHANGELOG.md
81
81
  - CODE_OF_CONDUCT.md
82
82
  - Gemfile
@@ -96,7 +96,7 @@ licenses:
96
96
  - MIT
97
97
  metadata:
98
98
  allowed_push_host: https://rubygems.org
99
- post_install_message:
99
+ post_install_message:
100
100
  rdoc_options: []
101
101
  require_paths:
102
102
  - lib
@@ -111,8 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.0.6
115
- signing_key:
114
+ rubygems_version: 3.1.6
115
+ signing_key:
116
116
  specification_version: 4
117
117
  summary: RSpec matchers for dry-validation
118
118
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.6.3
5
- before_install:
6
- - gem update --system
7
- - gem install bundler -v 2.0.1