valcro 0.2.0 → 0.2.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 +4 -4
- data/.github/workflows/specs.yml +23 -0
- data/README.md +9 -12
- data/Rakefile +2 -2
- data/lib/valcro/error.rb +4 -2
- data/lib/valcro/error_list.rb +3 -1
- data/lib/valcro/runner.rb +2 -0
- data/lib/valcro/version.rb +3 -1
- data/lib/valcro.rb +10 -7
- data/spec/error_list_spec.rb +31 -29
- data/spec/error_spec.rb +11 -10
- data/spec/runner_spec.rb +7 -5
- data/spec/spec_helper.rb +6 -3
- data/spec/valcro_spec.rb +46 -42
- data/valcro.gemspec +10 -13
- metadata +19 -10
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe2a894e02ab3ec3cf6539c010830020ee584952e4a2b1f755afb981e86a4fdf
|
4
|
+
data.tar.gz: 053cdef1adc947a580eccfcf8e0b21f64ebfb7653da648490459b00f994ecdd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd1978ca04b743e095d8dd178a55c8ba87f5148254a1cd258136668d7f2d873e86a55515ec80f50688c7200c017b1e9f7e1feff4ac5df5b0b251c285bf836a76
|
7
|
+
data.tar.gz: 2a35fbdc02dd27ae2cd7504011498cc45904fbbf5f82d902c4fefd8961c056929e54431c1a508afa33452976d19a44f91a44550c5f90f221cfb9911ccaad8c24
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Specs
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: ["master"]
|
5
|
+
pull_request:
|
6
|
+
branches: ["master"]
|
7
|
+
permissions:
|
8
|
+
contents: read
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ["2.6", "2.7", "3.0"]
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v3
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby-version }}
|
21
|
+
bundler-cache: true
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rspec
|
data/README.md
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
# Valcro
|
2
2
|
|
3
|
-
|
4
|
-
[](https://codeclimate.com/github/hgmnz/valcro)
|
3
|
+
Valcro is the simple validation library for Ruby. It provides
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
* A declarative way to describe what makes an object valid
|
9
|
-
* A way to declare validator classes encapsulating validations to be shared
|
5
|
+
- A declarative way to describe what makes an object valid
|
6
|
+
- A way to declare validator classes encapsulating validations to be shared
|
10
7
|
across objects
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
- A method for running validations against an instance of your class
|
9
|
+
- A method for checking whether an object is valid
|
10
|
+
- Visibility into what validations failed
|
14
11
|
|
15
12
|
It is similar in spirit to ActiveModel's or Sequel's validations, but far
|
16
13
|
simpler and with a slightly different API. It does not provide validation
|
@@ -35,7 +32,7 @@ dog = Dog.new
|
|
35
32
|
dog.name = 'spike'
|
36
33
|
dog.validate
|
37
34
|
dog.valid?
|
38
|
-
=> false
|
35
|
+
=> false
|
39
36
|
dog.errors[:name]
|
40
37
|
=> ["must be great"]
|
41
38
|
dog.error_messages
|
@@ -49,8 +46,8 @@ check for validity of objects.
|
|
49
46
|
|
50
47
|
You may also have Cats in your system, which share the same validation. Valcro lets you encapsulate validations in an object with the following contract:
|
51
48
|
|
52
|
-
|
53
|
-
|
49
|
+
- It is constructed with the object being validated
|
50
|
+
- It responds to `call`, which receives a `Valcro::ErrorList`. Add validation errors to this object.
|
54
51
|
|
55
52
|
```ruby
|
56
53
|
class GreatNameValidator
|
data/Rakefile
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
|
3
|
-
require
|
3
|
+
require "rspec/core/rake_task"
|
4
4
|
RSpec::Core::RakeTask.new(:spec)
|
5
5
|
task default: :spec
|
6
6
|
|
7
7
|
namespace :gem do
|
8
8
|
desc "Release to rubygems"
|
9
9
|
task :release do
|
10
|
-
require File.expand_path(
|
10
|
+
require File.expand_path("lib/valcro/version", File.dirname(__FILE__))
|
11
11
|
version = Valcro::VERSION
|
12
12
|
message = "Bump to version #{version}"
|
13
13
|
system "git tag -a -m '#{message}' v#{version}"
|
data/lib/valcro/error.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Valcro
|
2
4
|
class Error
|
3
5
|
attr_accessor :property, :message
|
4
6
|
|
5
7
|
def initialize(property, message)
|
6
8
|
@property = property
|
7
|
-
@message
|
9
|
+
@message = message
|
8
10
|
end
|
9
11
|
|
10
12
|
def to_s
|
11
13
|
if @property == :base
|
12
14
|
message
|
13
15
|
else
|
14
|
-
"#{property
|
16
|
+
"#{property} #{message}"
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
data/lib/valcro/error_list.rb
CHANGED
data/lib/valcro/runner.rb
CHANGED
data/lib/valcro/version.rb
CHANGED
data/lib/valcro.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "valcro/error"
|
4
|
+
require "valcro/error_list"
|
5
|
+
require "valcro/runner"
|
4
6
|
|
5
7
|
module Valcro
|
6
8
|
def self.included(base)
|
@@ -23,10 +25,10 @@ module Valcro
|
|
23
25
|
validation_runner.clear!
|
24
26
|
self.class.validators.each do |validator_class|
|
25
27
|
validator = if validator_class.respond_to?(:build)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
validator_class.build(self)
|
29
|
+
else
|
30
|
+
validator_class.new(self)
|
31
|
+
end
|
30
32
|
validation_runner.add_validator validator
|
31
33
|
end
|
32
34
|
self.class.validation_blocks.each do |validation_block|
|
@@ -47,6 +49,7 @@ module Valcro
|
|
47
49
|
def validators
|
48
50
|
@validators ||= []
|
49
51
|
end
|
52
|
+
|
50
53
|
def validation_blocks
|
51
54
|
@validation_blocks ||= []
|
52
55
|
end
|
data/spec/error_list_spec.rb
CHANGED
@@ -1,78 +1,80 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
describe Valcro::ErrorList, "adding errors" do
|
6
|
+
it "supports adding via <<" do
|
5
7
|
list = Valcro::ErrorList.new
|
6
|
-
list << Valcro::Error.new(:prop,
|
8
|
+
list << Valcro::Error.new(:prop, "message")
|
7
9
|
|
8
10
|
expect(list.errors.length).to eq(1)
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
12
|
-
describe Valcro::ErrorList,
|
13
|
-
it
|
14
|
+
describe Valcro::ErrorList, "#add" do
|
15
|
+
it "finds and agregates error messages" do
|
14
16
|
list = Valcro::ErrorList.new
|
15
17
|
|
16
18
|
expect(list[:one]).to be_empty
|
17
19
|
|
18
|
-
list.add(:one,
|
19
|
-
list.add(:two,
|
20
|
-
list.add(:one,
|
20
|
+
list.add(:one, "message one")
|
21
|
+
list.add(:two, "message two")
|
22
|
+
list.add(:one, "another message one")
|
21
23
|
|
22
|
-
expect(list[:one]).to eq([
|
24
|
+
expect(list[:one]).to eq(["message one", "another message one"])
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
26
|
-
describe Valcro::ErrorList,
|
27
|
-
it
|
28
|
+
describe Valcro::ErrorList, "#full_messages" do
|
29
|
+
it "gives a collection of messages" do
|
28
30
|
list = Valcro::ErrorList.new
|
29
31
|
|
30
|
-
list.add :prop,
|
31
|
-
list.add :prop,
|
32
|
-
list.add :prop,
|
32
|
+
list.add :prop, "one"
|
33
|
+
list.add :prop, "two"
|
34
|
+
list.add :prop, "three"
|
33
35
|
|
34
36
|
expect(list.full_messages).to eq(["prop one", "prop two", "prop three"])
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
|
-
describe Valcro::ErrorList,
|
39
|
-
it
|
40
|
+
describe Valcro::ErrorList, "#to_s" do
|
41
|
+
it "gives messages as one string" do
|
40
42
|
list = Valcro::ErrorList.new
|
41
43
|
|
42
|
-
list.add :prop,
|
43
|
-
list.add :prop,
|
44
|
-
list.add :prop,
|
44
|
+
list.add :prop, "one"
|
45
|
+
list.add :prop, "two"
|
46
|
+
list.add :prop, "three"
|
45
47
|
|
46
48
|
expect(list.to_s).to eq("prop one prop two prop three")
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
50
|
-
describe Valcro::ErrorList,
|
51
|
-
it
|
52
|
+
describe Valcro::ErrorList, "#any?" do
|
53
|
+
it "is true when there are errors " do
|
52
54
|
list = Valcro::ErrorList.new
|
53
55
|
|
54
56
|
expect(list.any?).to be_falsey
|
55
|
-
list.add :prop,
|
57
|
+
list.add :prop, "some error"
|
56
58
|
|
57
59
|
expect(list.any?).to be_truthy
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
61
|
-
describe Valcro::ErrorList,
|
62
|
-
it
|
63
|
+
describe Valcro::ErrorList, "#none?" do
|
64
|
+
it "is true when there no errors " do
|
63
65
|
list = Valcro::ErrorList.new
|
64
66
|
|
65
67
|
expect(list.none?).to be_truthy
|
66
|
-
list.add :prop,
|
68
|
+
list.add :prop, "some error"
|
67
69
|
|
68
70
|
expect(list.none?).to be_falsey
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
72
|
-
describe Valcro::ErrorList,
|
73
|
-
it
|
74
|
+
describe Valcro::ErrorList, "#clear!" do
|
75
|
+
it "removes all errors" do
|
74
76
|
list = Valcro::ErrorList.new
|
75
|
-
list.add :prop,
|
77
|
+
list.add :prop, "some error"
|
76
78
|
expect(list.any?).to be_truthy
|
77
79
|
|
78
80
|
list.clear!
|
data/spec/error_spec.rb
CHANGED
@@ -1,25 +1,26 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
2
4
|
|
3
5
|
describe Valcro::Error do
|
4
|
-
it
|
5
|
-
error = create_error(:prop,
|
6
|
+
it "has a property and a message" do
|
7
|
+
error = create_error(:prop, "message")
|
6
8
|
|
7
9
|
expect(error.property).to eq(:prop)
|
8
|
-
expect(error.message).to eq(
|
10
|
+
expect(error.message).to eq("message")
|
9
11
|
end
|
10
12
|
|
11
|
-
it
|
13
|
+
it "can coerce to a string" do
|
12
14
|
error = create_error
|
13
|
-
expect(error.to_s).to eq(
|
15
|
+
expect(error.to_s).to eq("prop message")
|
14
16
|
end
|
15
17
|
|
16
|
-
it
|
18
|
+
it "does not include property if it is base" do
|
17
19
|
error = create_error(:base)
|
18
|
-
expect(error.to_s).to eq(
|
20
|
+
expect(error.to_s).to eq("message")
|
19
21
|
end
|
20
22
|
|
21
|
-
def create_error(prop = :prop, message =
|
23
|
+
def create_error(prop = :prop, message = "message")
|
22
24
|
Valcro::Error.new(prop, message)
|
23
25
|
end
|
24
26
|
end
|
25
|
-
|
data/spec/runner_spec.rb
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
2
4
|
|
3
5
|
describe Valcro::Runner do
|
4
|
-
it
|
6
|
+
it "can store validators" do
|
5
7
|
runner = Valcro::Runner.new
|
6
8
|
runner.add_validator :some_validator
|
7
9
|
expect(runner.validators).to have(1).validator
|
8
10
|
end
|
9
11
|
|
10
|
-
it
|
12
|
+
it "runs validators" do
|
11
13
|
error_list = Valcro::ErrorList.new
|
12
|
-
runner
|
13
|
-
runner.add_validator lambda { |errors| errors.add :foo,
|
14
|
+
runner = Valcro::Runner.new(error_list)
|
15
|
+
runner.add_validator lambda { |errors| errors.add :foo, "Huge mistake" }
|
14
16
|
|
15
17
|
runner.validate
|
16
18
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "valcro"
|
4
|
+
require "rspec/collection_matchers"
|
5
|
+
|
3
6
|
RSpec.configure do |config|
|
4
7
|
config.run_all_when_everything_filtered = true
|
5
8
|
config.filter_run :focus
|
@@ -8,7 +11,7 @@ RSpec.configure do |config|
|
|
8
11
|
# order dependency and want to debug it, you can fix the order by providing
|
9
12
|
# the seed, which is printed after each run.
|
10
13
|
# --seed 1234
|
11
|
-
config.order =
|
14
|
+
config.order = "random"
|
12
15
|
|
13
16
|
config.expect_with :rspec do |c|
|
14
17
|
c.syntax = :expect
|
data/spec/valcro_spec.rb
CHANGED
@@ -1,26 +1,28 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
class TestClass
|
5
|
-
include Valcro
|
6
|
-
end
|
3
|
+
require "spec_helper"
|
7
4
|
|
8
|
-
|
5
|
+
class TestClass
|
6
|
+
include Valcro
|
7
|
+
end
|
8
|
+
|
9
|
+
describe Valcro do
|
10
|
+
it "is valid with no validations defined" do
|
9
11
|
expect(TestClass.new.valid?).to be_truthy
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
|
-
describe Valcro,
|
15
|
+
describe Valcro, "adding some errors" do
|
14
16
|
let(:test_class) do
|
15
17
|
Class.new do
|
16
|
-
|
18
|
+
include Valcro
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
20
|
-
it
|
22
|
+
it "gives access to the error list" do
|
21
23
|
test_instance = test_class.new
|
22
24
|
|
23
|
-
test_instance.errors.add(:foo,
|
25
|
+
test_instance.errors.add(:foo, "too foo for my taste")
|
24
26
|
|
25
27
|
expect(test_instance.errors[:foo]).to have(1).error
|
26
28
|
|
@@ -28,16 +30,17 @@ describe Valcro, 'adding some errors' do
|
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
33
|
+
class StatusFailValidator
|
34
|
+
def initialize(context)
|
35
|
+
@context = context
|
36
|
+
end
|
37
|
+
|
38
|
+
def call(errors)
|
39
|
+
errors.add(:status, "big mistake") if @context.status == "fail"
|
39
40
|
end
|
41
|
+
end
|
40
42
|
|
43
|
+
describe Valcro, "validators" do
|
41
44
|
let(:test_class) do
|
42
45
|
Class.new do
|
43
46
|
include Valcro
|
@@ -49,39 +52,40 @@ describe Valcro, 'validators' do
|
|
49
52
|
end
|
50
53
|
end
|
51
54
|
|
52
|
-
it
|
55
|
+
it "can be added validators" do
|
53
56
|
test_instance = test_class.new
|
54
57
|
|
55
58
|
test_instance.validate
|
56
59
|
expect(test_instance).not_to be_valid
|
57
60
|
end
|
58
61
|
|
59
|
-
it
|
62
|
+
it "clears validations on subsequent runs" do
|
60
63
|
test_instance = test_class.new
|
61
64
|
|
62
65
|
test_instance.validate
|
63
66
|
expect(test_instance).not_to be_valid
|
64
67
|
|
65
|
-
test_instance.status =
|
68
|
+
test_instance.status = "win"
|
66
69
|
test_instance.validate
|
67
70
|
expect(test_instance).to be_valid
|
68
71
|
end
|
69
72
|
end
|
70
73
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
end
|
74
|
+
class ScopedStatusFailValidator
|
75
|
+
def self.build(context)
|
76
|
+
new(context.status)
|
77
|
+
end
|
76
78
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
def initialize(status)
|
80
|
+
@status = status
|
81
|
+
end
|
82
|
+
|
83
|
+
def call(errors)
|
84
|
+
errors.add(:status, "big mistake") if @status == "fail"
|
83
85
|
end
|
86
|
+
end
|
84
87
|
|
88
|
+
describe Valcro, "reusable validators" do
|
85
89
|
let(:test_class) do
|
86
90
|
Class.new do
|
87
91
|
include Valcro
|
@@ -94,50 +98,50 @@ describe Valcro, 'reusable validators' do
|
|
94
98
|
end
|
95
99
|
end
|
96
100
|
|
97
|
-
it
|
101
|
+
it "can be added validators" do
|
98
102
|
test_instance = test_class.new
|
99
103
|
|
100
104
|
test_instance.validate
|
101
105
|
expect(test_instance).not_to be_valid
|
102
106
|
end
|
103
107
|
|
104
|
-
it
|
108
|
+
it "clears validations on subsequent runs" do
|
105
109
|
test_instance = test_class.new
|
106
110
|
|
107
111
|
test_instance.validate
|
108
112
|
expect(test_instance).not_to be_valid
|
109
113
|
|
110
|
-
test_instance.status =
|
114
|
+
test_instance.status = "win"
|
111
115
|
test_instance.validate
|
112
116
|
expect(test_instance).to be_valid
|
113
117
|
end
|
114
118
|
end
|
115
119
|
|
116
|
-
describe Valcro,
|
120
|
+
describe Valcro, "#error_messages" do
|
117
121
|
let(:test_class) do
|
118
122
|
Class.new { include Valcro }
|
119
123
|
end
|
120
124
|
|
121
|
-
it
|
125
|
+
it "delegates to errors" do
|
122
126
|
test_instance = test_class.new
|
123
|
-
allow(test_instance).to receive(:errors).and_return(double(to_s:
|
127
|
+
allow(test_instance).to receive(:errors).and_return(double(to_s: "some errors"))
|
124
128
|
|
125
|
-
expect(test_instance.error_messages).to eq(
|
129
|
+
expect(test_instance.error_messages).to eq("some errors")
|
126
130
|
end
|
127
131
|
end
|
128
132
|
|
129
|
-
describe Valcro,
|
133
|
+
describe Valcro, ".validate" do
|
130
134
|
let(:test_class) do
|
131
135
|
Class.new do
|
132
136
|
include Valcro
|
133
137
|
attr_accessor :works
|
134
138
|
validate do
|
135
|
-
errors.add(:works,
|
139
|
+
errors.add(:works, "does not work") unless works
|
136
140
|
end
|
137
141
|
end
|
138
142
|
end
|
139
143
|
|
140
|
-
it
|
144
|
+
it "sets validations on the included class" do
|
141
145
|
test_instance = test_class.new
|
142
146
|
test_instance.works = false
|
143
147
|
test_instance.validate
|
data/valcro.gemspec
CHANGED
@@ -1,24 +1,21 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
$:.push File.expand_path("../lib", __FILE__)
|
3
2
|
require "valcro/version"
|
4
3
|
|
5
4
|
Gem::Specification.new do |s|
|
6
|
-
s.name
|
7
|
-
s.version
|
8
|
-
s.authors
|
9
|
-
s.email
|
10
|
-
s.homepage
|
11
|
-
s.summary
|
12
|
-
s.description =
|
5
|
+
s.name = "valcro"
|
6
|
+
s.version = Valcro::VERSION
|
7
|
+
s.authors = ["Harold Giménez"]
|
8
|
+
s.email = ["harold.gimenez@gmail.com"]
|
9
|
+
s.homepage = "https://github.com/hgmnz/valcro"
|
10
|
+
s.summary = "The simplest possible validation library for Ruby"
|
11
|
+
s.description = "Valcro is a validation library for arbitrary ruby objects. I's primary goal is to remain as simple as possible so that it can be useful to a large surface of use cases remaining easily extensible."
|
13
12
|
|
14
|
-
s.
|
15
|
-
|
16
|
-
s.files = `git ls-files`.split("\n")
|
17
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
13
|
+
s.files = `git ls-files`.split("\n")
|
14
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
19
15
|
s.require_paths = ["lib"]
|
20
16
|
|
21
17
|
s.add_development_dependency "rspec"
|
22
18
|
s.add_development_dependency "rspec-collection_matchers"
|
23
19
|
s.add_development_dependency "rake"
|
20
|
+
s.add_development_dependency "standardrb"
|
24
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valcro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harold Giménez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standardrb
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Valcro is a validation library for arbitrary ruby objects. I's primary
|
56
70
|
goal is to remain as simple as possible so that it can be useful to a large surface
|
57
71
|
of use cases remaining easily extensible.
|
@@ -61,8 +75,8 @@ executables: []
|
|
61
75
|
extensions: []
|
62
76
|
extra_rdoc_files: []
|
63
77
|
files:
|
78
|
+
- ".github/workflows/specs.yml"
|
64
79
|
- ".gitignore"
|
65
|
-
- ".travis.yml"
|
66
80
|
- Gemfile
|
67
81
|
- LICENSE
|
68
82
|
- README.md
|
@@ -78,7 +92,7 @@ files:
|
|
78
92
|
- spec/spec_helper.rb
|
79
93
|
- spec/valcro_spec.rb
|
80
94
|
- valcro.gemspec
|
81
|
-
homepage: https://github.com/
|
95
|
+
homepage: https://github.com/hgmnz/valcro
|
82
96
|
licenses: []
|
83
97
|
metadata: {}
|
84
98
|
post_install_message:
|
@@ -100,9 +114,4 @@ rubygems_version: 3.4.12
|
|
100
114
|
signing_key:
|
101
115
|
specification_version: 4
|
102
116
|
summary: The simplest possible validation library for Ruby
|
103
|
-
test_files:
|
104
|
-
- spec/error_list_spec.rb
|
105
|
-
- spec/error_spec.rb
|
106
|
-
- spec/runner_spec.rb
|
107
|
-
- spec/spec_helper.rb
|
108
|
-
- spec/valcro_spec.rb
|
117
|
+
test_files: []
|