shaped 0.11.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +8 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +39 -42
- data/README.md +1 -1
- data/lib/shaped/shapes/callable.rb +6 -1
- data/lib/shaped/version.rb +1 -1
- data/shaped.gemspec +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e226dafe068cc45deed7f52a99515a56ecc3fbb805970819fb21988de5eeeec0
|
4
|
+
data.tar.gz: 0e7853b2e584d84076ce7bcb8ae416a17958a0495b763c001411660da3ef34ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f34048b132718f20569cc14e995f07c7509ffbe18c2366cd5573dd11323d554f61c8a00c91669deca86877f27682f60f5b68278b72602d260e0f889e06ac316
|
7
|
+
data.tar.gz: f6d886d2310a2bd7a752f207cb998496642c3b4d0843059e76db0260014b3e0d36622ec5b53ec32c96c3f0e992905f72794d92b70a8608e65296b8aa9c949ee1
|
data/.github/workflows/ruby.yml
CHANGED
@@ -3,24 +3,28 @@ name: Run Tests, Linters, Etc.
|
|
3
3
|
on:
|
4
4
|
pull_request:
|
5
5
|
branches:
|
6
|
-
|
6
|
+
- '*'
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- main
|
7
10
|
|
8
11
|
jobs:
|
9
12
|
build:
|
10
13
|
runs-on: ubuntu-latest
|
11
14
|
steps:
|
12
|
-
- uses: actions/checkout@
|
15
|
+
- uses: actions/checkout@v4
|
13
16
|
- name: Set up Ruby
|
14
17
|
uses: ruby/setup-ruby@v1
|
15
18
|
with:
|
16
19
|
bundler-cache: true
|
17
|
-
- name: Run
|
20
|
+
- name: Run RuboCop
|
18
21
|
run: bin/rubocop --format clang
|
19
22
|
- name: Run RSpec tests
|
20
23
|
run: bin/rspec --format progress
|
21
24
|
- name: Ensure no git diff
|
22
25
|
run: git diff --exit-code && git diff-index --quiet --cached HEAD
|
23
26
|
- name: Upload Code Coverage
|
24
|
-
uses: codecov/codecov-action@
|
27
|
+
uses: codecov/codecov-action@v4
|
25
28
|
with:
|
26
29
|
directory: tmp/simple_cov
|
30
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## v0.13.0 (2024-06-28)
|
2
|
+
- Enforce only major and minor parts of required Ruby version (loosening the required Ruby version from 3.3.3 to 3.3.0)
|
3
|
+
|
4
|
+
## v0.12.0 (2024-06-15)
|
5
|
+
- Rename primary branch from `master` to `main`
|
6
|
+
|
1
7
|
## v0.11.0 (2024-03-08)
|
2
8
|
[no unreleased changes yet]
|
3
9
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
shaped (0.
|
4
|
+
shaped (0.13.0)
|
5
5
|
activemodel (>= 6, < 8)
|
6
6
|
activesupport (>= 6, < 8)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (7.1.3.
|
12
|
-
activesupport (= 7.1.3.
|
13
|
-
activesupport (7.1.3.
|
11
|
+
activemodel (7.1.3.4)
|
12
|
+
activesupport (= 7.1.3.4)
|
13
|
+
activesupport (7.1.3.4)
|
14
14
|
base64
|
15
15
|
bigdecimal
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -20,56 +20,56 @@ GEM
|
|
20
20
|
minitest (>= 5.1)
|
21
21
|
mutex_m
|
22
22
|
tzinfo (~> 2.0)
|
23
|
-
amazing_print (1.
|
23
|
+
amazing_print (1.6.0)
|
24
24
|
ast (2.4.2)
|
25
25
|
base64 (0.2.0)
|
26
|
-
bigdecimal (3.1.
|
26
|
+
bigdecimal (3.1.8)
|
27
27
|
byebug (11.1.3)
|
28
28
|
coderay (1.1.3)
|
29
|
-
concurrent-ruby (1.
|
29
|
+
concurrent-ruby (1.3.3)
|
30
30
|
connection_pool (2.4.1)
|
31
31
|
diff-lcs (1.5.1)
|
32
32
|
docile (1.4.0)
|
33
|
-
drb (2.2.
|
34
|
-
|
35
|
-
i18n (1.14.1)
|
33
|
+
drb (2.2.1)
|
34
|
+
i18n (1.14.5)
|
36
35
|
concurrent-ruby (~> 1.0)
|
37
|
-
json (2.7.
|
36
|
+
json (2.7.2)
|
38
37
|
language_server-protocol (3.17.0.3)
|
39
|
-
memo_wise (1.
|
40
|
-
method_source (1.
|
41
|
-
minitest (5.
|
38
|
+
memo_wise (1.9.0)
|
39
|
+
method_source (1.1.0)
|
40
|
+
minitest (5.24.0)
|
42
41
|
mutex_m (0.2.0)
|
43
|
-
parallel (1.
|
44
|
-
parser (3.3.0
|
42
|
+
parallel (1.25.1)
|
43
|
+
parser (3.3.3.0)
|
45
44
|
ast (~> 2.4.1)
|
46
45
|
racc
|
47
|
-
prism (0.
|
48
|
-
pry (0.14.
|
46
|
+
prism (0.30.0)
|
47
|
+
pry (0.14.2)
|
49
48
|
coderay (~> 1.1)
|
50
49
|
method_source (~> 1.0)
|
51
50
|
pry-byebug (3.10.1)
|
52
51
|
byebug (~> 11.0)
|
53
52
|
pry (>= 0.13, < 0.15)
|
54
|
-
racc (1.
|
53
|
+
racc (1.8.0)
|
55
54
|
rainbow (3.1.1)
|
56
|
-
rake (13.1
|
57
|
-
regexp_parser (2.9.
|
58
|
-
rexml (3.
|
55
|
+
rake (13.2.1)
|
56
|
+
regexp_parser (2.9.2)
|
57
|
+
rexml (3.3.1)
|
58
|
+
strscan
|
59
59
|
rspec (3.13.0)
|
60
60
|
rspec-core (~> 3.13.0)
|
61
61
|
rspec-expectations (~> 3.13.0)
|
62
62
|
rspec-mocks (~> 3.13.0)
|
63
63
|
rspec-core (3.13.0)
|
64
64
|
rspec-support (~> 3.13.0)
|
65
|
-
rspec-expectations (3.13.
|
65
|
+
rspec-expectations (3.13.1)
|
66
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
67
67
|
rspec-support (~> 3.13.0)
|
68
|
-
rspec-mocks (3.13.
|
68
|
+
rspec-mocks (3.13.1)
|
69
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
70
|
rspec-support (~> 3.13.0)
|
71
|
-
rspec-support (3.13.
|
72
|
-
rubocop (1.
|
71
|
+
rspec-support (3.13.1)
|
72
|
+
rubocop (1.64.1)
|
73
73
|
json (~> 2.3)
|
74
74
|
language_server-protocol (>= 3.17.0)
|
75
75
|
parallel (~> 1.10)
|
@@ -80,27 +80,20 @@ GEM
|
|
80
80
|
rubocop-ast (>= 1.31.1, < 2.0)
|
81
81
|
ruby-progressbar (~> 1.7)
|
82
82
|
unicode-display_width (>= 2.4.0, < 3.0)
|
83
|
-
rubocop-ast (1.31.
|
84
|
-
parser (>= 3.3.0
|
85
|
-
rubocop-
|
86
|
-
rubocop (~> 1.41)
|
87
|
-
rubocop-factory_bot (2.25.1)
|
88
|
-
rubocop (~> 1.41)
|
89
|
-
rubocop-performance (1.20.2)
|
83
|
+
rubocop-ast (1.31.3)
|
84
|
+
parser (>= 3.3.1.0)
|
85
|
+
rubocop-performance (1.21.1)
|
90
86
|
rubocop (>= 1.48.1, < 2.0)
|
91
|
-
rubocop-ast (>= 1.
|
92
|
-
rubocop-rspec (
|
93
|
-
rubocop (~> 1.
|
94
|
-
rubocop-capybara (~> 2.17)
|
95
|
-
rubocop-factory_bot (~> 2.22)
|
87
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
88
|
+
rubocop-rspec (3.0.1)
|
89
|
+
rubocop (~> 1.61)
|
96
90
|
ruby-progressbar (1.13.0)
|
97
|
-
|
98
|
-
runger_release_assistant (0.5.0)
|
91
|
+
runger_release_assistant (0.8.0)
|
99
92
|
activesupport (>= 6, < 8)
|
100
93
|
memo_wise (>= 1.7, < 2)
|
101
94
|
rainbow (>= 3.0, < 4)
|
102
95
|
slop (~> 4.8)
|
103
|
-
runger_style (2.
|
96
|
+
runger_style (2.8.0)
|
104
97
|
prism (>= 0.24.0)
|
105
98
|
rubocop (>= 1.38.0, < 2)
|
106
99
|
simplecov (0.22.0)
|
@@ -113,6 +106,7 @@ GEM
|
|
113
106
|
simplecov-html (0.12.3)
|
114
107
|
simplecov_json_formatter (0.1.4)
|
115
108
|
slop (4.10.1)
|
109
|
+
strscan (3.1.0)
|
116
110
|
tzinfo (2.0.6)
|
117
111
|
concurrent-ruby (~> 1.0)
|
118
112
|
unicode-display_width (2.5.0)
|
@@ -133,5 +127,8 @@ DEPENDENCIES
|
|
133
127
|
shaped!
|
134
128
|
simplecov-cobertura
|
135
129
|
|
130
|
+
RUBY VERSION
|
131
|
+
ruby 3.3.3p89
|
132
|
+
|
136
133
|
BUNDLED WITH
|
137
|
-
2.
|
134
|
+
2.5.11
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![codecov](https://codecov.io/gh/davidrunger/shaped/branch/
|
1
|
+
[![codecov](https://codecov.io/gh/davidrunger/shaped/branch/main/graph/badge.svg)](https://codecov.io/gh/davidrunger/shaped)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/shaped.svg)](https://badge.fury.io/rb/shaped)
|
3
3
|
|
4
4
|
# Shaped
|
@@ -12,7 +12,12 @@ class Shaped::Shapes::Callable < Shaped::Shape
|
|
12
12
|
def to_s
|
13
13
|
case @callable
|
14
14
|
when Method then "Method defined at #{@callable.source_location.map(&:to_s).join(':')}"
|
15
|
-
when Proc
|
15
|
+
when Proc
|
16
|
+
if @callable.source_location
|
17
|
+
"Proc test defined at #{@callable.source_location.map(&:to_s).join(':')}"
|
18
|
+
else
|
19
|
+
'Proc test defined at unknown location'
|
20
|
+
end
|
16
21
|
else "#call test defined at #{@callable.method(:call).source_location.map(&:to_s).join(':')}"
|
17
22
|
end
|
18
23
|
end
|
data/lib/shaped/version.rb
CHANGED
data/shaped.gemspec
CHANGED
@@ -12,12 +12,13 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Validate the "shape" of Ruby objects.'
|
13
13
|
spec.homepage = 'https://github.com/davidrunger/shaped'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
|
15
|
+
required_ruby_version = File.read('.ruby-version').rstrip.sub(/\A(\d+\.\d+)\.\d+\z/, '\1.0')
|
16
|
+
spec.required_ruby_version = ">= #{required_ruby_version}"
|
16
17
|
|
17
18
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
18
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
19
20
|
spec.metadata['source_code_uri'] = 'https://github.com/davidrunger/shaped'
|
20
|
-
spec.metadata['changelog_uri'] = 'https://github.com/davidrunger/shaped/blob/
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/davidrunger/shaped/blob/main/CHANGELOG.md'
|
21
22
|
|
22
23
|
# Specify which files should be added to the gem when it is released.
|
23
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shaped
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Runger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -96,7 +96,7 @@ metadata:
|
|
96
96
|
rubygems_mfa_required: 'true'
|
97
97
|
homepage_uri: https://github.com/davidrunger/shaped
|
98
98
|
source_code_uri: https://github.com/davidrunger/shaped
|
99
|
-
changelog_uri: https://github.com/davidrunger/shaped/blob/
|
99
|
+
changelog_uri: https://github.com/davidrunger/shaped/blob/main/CHANGELOG.md
|
100
100
|
post_install_message:
|
101
101
|
rdoc_options: []
|
102
102
|
require_paths:
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
rubygems_version: 3.5.
|
115
|
+
rubygems_version: 3.5.14
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Validate the "shape" of Ruby objects.
|