shaped 0.10.0 → 0.12.0

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: a561294e8661c08c4e51ffbbfd8f6d7f5b1c7847189694d0eefad3ac0242ba12
4
- data.tar.gz: 60aaf2ad38b406f12d69e62090403c028f57c5872dfba2f8c4d8df22cfc557aa
3
+ metadata.gz: 02b7c2a9f904ee02871e502d76faff37aa5385b8ed9ff73032a04ce83725edf1
4
+ data.tar.gz: bbe2bb585d4dd869ea3cd2d84f56e23a0ed17264ced832c6b451ba2e94872875
5
5
  SHA512:
6
- metadata.gz: d6a382e593f908adc17d6b518892e157af29ae4ab13767bfbf23aaf3d4ebe75e25b8dee88dae655c4049e31e1db612a872084dcb08957b10b3eafb9c59f9478b
7
- data.tar.gz: bd49cde0f68661e86a27b705c40db07aee52a750fc1ce082d2c075e947839eaab08201fa0e0e6fe4c15bee5a5c385f1f3bda4c3343ae924e3e392245c86ae82d
6
+ metadata.gz: 9f9f193c152349ea227c8cf10e5654e148d4fcec6baddcf0e51dcb271b58b1b5a5a6665d170f8ea23bf03834a69ee74f20d224dfac75f00cc5648d6785ebb125
7
+ data.tar.gz: 39e6b0711be8ad70daf0dc1224519d2ad0b7716e55e41793646b2b7f1296c437953c0153b08ea22d9a80a2c196c1799d4aee5adaa3918ecf6de416dcf9324d62
@@ -3,14 +3,7 @@ updates:
3
3
  - package-ecosystem: bundler
4
4
  directory: "/"
5
5
  schedule:
6
- interval: weekly
7
- time: "03:52"
6
+ interval: daily
7
+ time: "04:04"
8
8
  timezone: America/Chicago
9
9
  open-pull-requests-limit: 20
10
- ignore:
11
- - dependency-name: activesupport
12
- versions:
13
- - 6.1.3
14
- - dependency-name: activemodel
15
- versions:
16
- - 6.1.2.1
@@ -3,7 +3,7 @@ name: Run Tests, Linters, Etc.
3
3
  on:
4
4
  pull_request:
5
5
  branches:
6
- - master
6
+ - main
7
7
 
8
8
  jobs:
9
9
  build:
@@ -14,9 +14,13 @@ jobs:
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
16
16
  bundler-cache: true
17
- - name: Run Rubocop
17
+ - name: Run RuboCop
18
18
  run: bin/rubocop --format clang
19
19
  - name: Run RSpec tests
20
20
  run: bin/rspec --format progress
21
21
  - name: Ensure no git diff
22
22
  run: git diff --exit-code && git diff-index --quiet --cached HEAD
23
+ - name: Upload Code Coverage
24
+ uses: codecov/codecov-action@v3
25
+ with:
26
+ directory: tmp/simple_cov
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.3.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.12.0 (2024-06-15)
2
+ - Rename primary branch from `master` to `main`
3
+
4
+ ## v0.11.0 (2024-03-08)
5
+ [no unreleased changes yet]
6
+
1
7
  ## v0.10.0 (2023-05-04)
2
8
  [no unreleased changes yet]
3
9
 
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ ruby file: '.ruby-version'
4
+
3
5
  source 'https://rubygems.org'
4
6
 
5
7
  # Specify your gem's dependencies in shaped.gemspec
@@ -12,14 +14,14 @@ group :development, :test do
12
14
  gem 'rubocop', require: false
13
15
  gem 'rubocop-performance', require: false
14
16
  gem 'rubocop-rspec', require: false
15
- gem 'runger_style', github: 'davidrunger/runger_style', require: false
17
+ gem 'runger_style', require: false
16
18
  end
17
19
 
18
20
  group :development do
19
- gem 'release_assistant', require: false, github: 'davidrunger/release_assistant'
21
+ gem 'runger_release_assistant', require: false
20
22
  end
21
23
 
22
24
  group :test do
23
- gem 'codecov', require: false
24
25
  gem 'rspec'
26
+ gem 'simplecov-cobertura', require: false
25
27
  end
data/Gemfile.lock CHANGED
@@ -1,126 +1,143 @@
1
- GIT
2
- remote: https://github.com/davidrunger/release_assistant.git
3
- revision: 969b3a90264da6ce73275a7240cc7e54ff5a6370
4
- specs:
5
- release_assistant (0.3.3.alpha)
6
- activesupport (>= 6, < 8)
7
- colorize (~> 0.8)
8
- memoist (~> 0.16)
9
- slop (~> 4.8)
10
-
11
- GIT
12
- remote: https://github.com/davidrunger/runger_style.git
13
- revision: 70a51d91a324c23a0dcd206f2d4ef6008b66beca
14
- specs:
15
- runger_style (0.2.22.alpha)
16
- rubocop (>= 1.38.0, < 2)
17
-
18
1
  PATH
19
2
  remote: .
20
3
  specs:
21
- shaped (0.10.0)
4
+ shaped (0.12.0)
22
5
  activemodel (>= 6, < 8)
23
6
  activesupport (>= 6, < 8)
24
7
 
25
8
  GEM
26
9
  remote: https://rubygems.org/
27
10
  specs:
28
- activemodel (7.0.4.3)
29
- activesupport (= 7.0.4.3)
30
- activesupport (7.0.4.3)
11
+ activemodel (7.1.3.3)
12
+ activesupport (= 7.1.3.3)
13
+ activesupport (7.1.3.3)
14
+ base64
15
+ bigdecimal
31
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ connection_pool (>= 2.2.5)
18
+ drb
32
19
  i18n (>= 1.6, < 2)
33
20
  minitest (>= 5.1)
21
+ mutex_m
34
22
  tzinfo (~> 2.0)
35
- amazing_print (1.4.0)
23
+ amazing_print (1.6.0)
36
24
  ast (2.4.2)
25
+ base64 (0.2.0)
26
+ bigdecimal (3.1.8)
37
27
  byebug (11.1.3)
38
- codecov (0.6.0)
39
- simplecov (>= 0.15, < 0.22)
40
28
  coderay (1.1.3)
41
- colorize (0.8.1)
42
- concurrent-ruby (1.2.2)
43
- diff-lcs (1.5.0)
29
+ concurrent-ruby (1.3.3)
30
+ connection_pool (2.4.1)
31
+ diff-lcs (1.5.1)
44
32
  docile (1.4.0)
45
- i18n (1.12.0)
33
+ drb (2.2.1)
34
+ i18n (1.14.5)
46
35
  concurrent-ruby (~> 1.0)
47
- json (2.6.3)
48
- memoist (0.16.2)
36
+ json (2.7.2)
37
+ language_server-protocol (3.17.0.3)
38
+ memo_wise (1.9.0)
49
39
  method_source (1.0.0)
50
- minitest (5.18.0)
51
- parallel (1.23.0)
52
- parser (3.2.2.0)
40
+ minitest (5.23.1)
41
+ mutex_m (0.2.0)
42
+ parallel (1.24.0)
43
+ parser (3.3.1.0)
53
44
  ast (~> 2.4.1)
45
+ racc
46
+ prism (0.29.0)
54
47
  pry (0.14.1)
55
48
  coderay (~> 1.1)
56
49
  method_source (~> 1.0)
57
50
  pry-byebug (3.10.1)
58
51
  byebug (~> 11.0)
59
52
  pry (>= 0.13, < 0.15)
53
+ racc (1.8.0)
60
54
  rainbow (3.1.1)
61
- rake (13.0.6)
62
- regexp_parser (2.8.0)
63
- rexml (3.2.5)
64
- rspec (3.12.0)
65
- rspec-core (~> 3.12.0)
66
- rspec-expectations (~> 3.12.0)
67
- rspec-mocks (~> 3.12.0)
68
- rspec-core (3.12.0)
69
- rspec-support (~> 3.12.0)
70
- rspec-expectations (3.12.0)
55
+ rake (13.2.1)
56
+ regexp_parser (2.9.2)
57
+ rexml (3.2.8)
58
+ strscan (>= 3.0.9)
59
+ rspec (3.13.0)
60
+ rspec-core (~> 3.13.0)
61
+ rspec-expectations (~> 3.13.0)
62
+ rspec-mocks (~> 3.13.0)
63
+ rspec-core (3.13.0)
64
+ rspec-support (~> 3.13.0)
65
+ rspec-expectations (3.13.0)
71
66
  diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.12.0)
73
- rspec-mocks (3.12.0)
67
+ rspec-support (~> 3.13.0)
68
+ rspec-mocks (3.13.0)
74
69
  diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.12.0)
76
- rspec-support (3.12.0)
77
- rubocop (1.50.2)
70
+ rspec-support (~> 3.13.0)
71
+ rspec-support (3.13.0)
72
+ rubocop (1.64.0)
78
73
  json (~> 2.3)
74
+ language_server-protocol (>= 3.17.0)
79
75
  parallel (~> 1.10)
80
- parser (>= 3.2.0.0)
76
+ parser (>= 3.3.0.2)
81
77
  rainbow (>= 2.2.2, < 4.0)
82
78
  regexp_parser (>= 1.8, < 3.0)
83
79
  rexml (>= 3.2.5, < 4.0)
84
- rubocop-ast (>= 1.28.0, < 2.0)
80
+ rubocop-ast (>= 1.31.1, < 2.0)
85
81
  ruby-progressbar (~> 1.7)
86
82
  unicode-display_width (>= 2.4.0, < 3.0)
87
- rubocop-ast (1.28.0)
88
- parser (>= 3.2.1.0)
89
- rubocop-capybara (2.18.0)
83
+ rubocop-ast (1.31.3)
84
+ parser (>= 3.3.1.0)
85
+ rubocop-capybara (2.20.0)
86
+ rubocop (~> 1.41)
87
+ rubocop-factory_bot (2.25.1)
90
88
  rubocop (~> 1.41)
91
- rubocop-performance (1.17.1)
92
- rubocop (>= 1.7.0, < 2.0)
93
- rubocop-ast (>= 0.4.0)
94
- rubocop-rspec (2.20.0)
95
- rubocop (~> 1.33)
89
+ rubocop-performance (1.21.0)
90
+ rubocop (>= 1.48.1, < 2.0)
91
+ rubocop-ast (>= 1.31.1, < 2.0)
92
+ rubocop-rspec (2.29.2)
93
+ rubocop (~> 1.40)
96
94
  rubocop-capybara (~> 2.17)
95
+ rubocop-factory_bot (~> 2.22)
96
+ rubocop-rspec_rails (~> 2.28)
97
+ rubocop-rspec_rails (2.28.3)
98
+ rubocop (~> 1.40)
97
99
  ruby-progressbar (1.13.0)
98
- simplecov (0.21.2)
100
+ runger_release_assistant (0.8.0)
101
+ activesupport (>= 6, < 8)
102
+ memo_wise (>= 1.7, < 2)
103
+ rainbow (>= 3.0, < 4)
104
+ slop (~> 4.8)
105
+ runger_style (2.4.0)
106
+ prism (>= 0.24.0)
107
+ rubocop (>= 1.38.0, < 2)
108
+ simplecov (0.22.0)
99
109
  docile (~> 1.1)
100
110
  simplecov-html (~> 0.11)
101
111
  simplecov_json_formatter (~> 0.1)
112
+ simplecov-cobertura (2.1.0)
113
+ rexml
114
+ simplecov (~> 0.19)
102
115
  simplecov-html (0.12.3)
103
- simplecov_json_formatter (0.1.3)
116
+ simplecov_json_formatter (0.1.4)
104
117
  slop (4.10.1)
118
+ strscan (3.1.0)
105
119
  tzinfo (2.0.6)
106
120
  concurrent-ruby (~> 1.0)
107
- unicode-display_width (2.4.2)
121
+ unicode-display_width (2.5.0)
108
122
 
109
123
  PLATFORMS
110
124
  ruby
111
125
 
112
126
  DEPENDENCIES
113
127
  amazing_print
114
- codecov
115
128
  pry-byebug
116
129
  rake
117
- release_assistant!
118
130
  rspec
119
131
  rubocop
120
132
  rubocop-performance
121
133
  rubocop-rspec
122
- runger_style!
134
+ runger_release_assistant
135
+ runger_style
123
136
  shaped!
137
+ simplecov-cobertura
138
+
139
+ RUBY VERSION
140
+ ruby 3.3.3p89
124
141
 
125
142
  BUNDLED WITH
126
- 2.2.22
143
+ 2.5.11
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- [![codecov](https://codecov.io/gh/davidrunger/shaped/branch/master/graph/badge.svg)](https://codecov.io/gh/davidrunger/shaped)
2
- [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=davidrunger/shaped)](https://dependabot.com)
1
+ [![codecov](https://codecov.io/gh/davidrunger/shaped/branch/main/graph/badge.svg)](https://codecov.io/gh/davidrunger/shaped)
3
2
  [![Gem Version](https://badge.fury.io/rb/shaped.svg)](https://badge.fury.io/rb/shaped)
4
3
 
5
4
  # Shaped
data/bin/_guard-core CHANGED
@@ -17,8 +17,8 @@ if File.file?(bundle_binstub)
17
17
  if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
18
18
  load(bundle_binstub)
19
19
  else
20
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
20
+ abort('Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.')
22
22
  end
23
23
  end
24
24
 
data/bin/guard CHANGED
@@ -17,8 +17,8 @@ if File.file?(bundle_binstub)
17
17
  if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
18
18
  load(bundle_binstub)
19
19
  else
20
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
20
+ abort('Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.')
22
22
  end
23
23
  end
24
24
 
data/bin/release CHANGED
@@ -17,8 +17,8 @@ if File.file?(bundle_binstub)
17
17
  if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
18
18
  load(bundle_binstub)
19
19
  else
20
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
20
+ abort('Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.')
22
22
  end
23
23
  end
24
24
 
@@ -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 then "Proc test defined at #{@callable.source_location.map(&:to_s).join(':')}"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Shaped
4
- VERSION = '0.10.0'
4
+ VERSION = '0.12.0'
5
5
  end
data/lib/shaped.rb CHANGED
@@ -5,7 +5,7 @@ module Shaped::Shapes ; end
5
5
 
6
6
  require 'active_model'
7
7
  require 'active_support/all'
8
- require_relative './shaped/shape.rb'
8
+ require_relative 'shaped/shape.rb'
9
9
  Dir["#{File.dirname(__FILE__)}/**/*.rb"].each { |file| require file }
10
10
 
11
11
  module Shaped
data/shaped.gemspec CHANGED
@@ -12,12 +12,12 @@ 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
- spec.required_ruby_version = Gem::Requirement.new('>= 3.1.1')
15
+ spec.required_ruby_version = ">= #{File.read('.ruby-version').rstrip}"
16
16
 
17
17
  spec.metadata['rubygems_mfa_required'] = 'true'
18
18
  spec.metadata['homepage_uri'] = spec.homepage
19
19
  spec.metadata['source_code_uri'] = 'https://github.com/davidrunger/shaped'
20
- spec.metadata['changelog_uri'] = 'https://github.com/davidrunger/shaped/blob/master/CHANGELOG.md'
20
+ spec.metadata['changelog_uri'] = 'https://github.com/davidrunger/shaped/blob/main/CHANGELOG.md'
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # 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.10.0
4
+ version: 0.12.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: 2023-05-04 00:00:00.000000000 Z
11
+ date: 2024-06-16 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/master/CHANGELOG.md
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:
@@ -105,14 +105,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - ">="
107
107
  - !ruby/object:Gem::Version
108
- version: 3.1.1
108
+ version: 3.3.3
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.4.4
115
+ rubygems_version: 3.5.11
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Validate the "shape" of Ruby objects.