Skip to content

Commit 65a5924

Browse files
committed
WIP
1 parent 4df8f64 commit 65a5924

File tree

21 files changed

+1065
-122
lines changed

21 files changed

+1065
-122
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ jobs:
1313
name: Ruby ${{ matrix.ruby }}
1414
strategy:
1515
matrix:
16-
ruby:
17-
- '3.2.2'
18-
- '3.1.4'
19-
- '3.0.6'
20-
- '2.7.8'
21-
16+
ruby: [2.7, 3.0, 3.1, 3.2, head]
2217
steps:
23-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2419
- name: Set up Ruby
2520
uses: ruby/setup-ruby@v1
2621
with:
2722
ruby-version: ${{ matrix.ruby }}
2823
bundler-cache: true
29-
- name: Run the default task
30-
run: bundle exec rake
31-
- name: Run the steep check
24+
- name: Run BCDD::Result.configuration test (Minitest)
25+
run: bundle exec rake test_configuration TEST_CONFIG_FREEZING=true
26+
- name: Run tests (Minitest)
27+
run: bundle exec rake test
28+
- name: Run static code analysis (Rubocop)
29+
run: bundle exec rake rubocop
30+
- name: Run static type checking (Steep)
3231
run: bundle exec steep check
32+
if: ${{ matrix.ruby == 3.2 }}

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ Minitest/MultipleAssertions:
6666
Minitest/AssertEmptyLiteral:
6767
Enabled: false
6868

69+
Minitest/AssertOperator:
70+
Enabled: false
71+
6972
Naming/FileName:
7073
Exclude:
7174
- lib/bcdd-result.rb

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
## [Unreleased]
22

3+
```ruby
4+
BCDD::Result.configuration do |config|
5+
config.addon.enable!(:continue)
6+
7+
config.constant_alias.enable!('Result')
8+
9+
config.pattern_matching.disable!(:nil_as_valid_value_checking)
10+
11+
config.feature.disable!(:expectations) if ::Rails.env.production?
12+
end
13+
14+
extend BCDD::Result::Expectations.mixin(
15+
config: {
16+
addon: { continue: false },
17+
pattern_matching: { nil_as_valid_value_checking: true },
18+
},
19+
success: {
20+
numbers: ->(value) { value => [Numeric, Numeric] },
21+
division_completed: Numeric
22+
},
23+
failure: {
24+
invalid_arg: String,
25+
division_by_zero: String
26+
}
27+
)
28+
```
29+
330
### Added
431

532
- Add `BCDD::Result.config`

Gemfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ source 'https://rubygems.org'
55
# Specify your gem's dependencies in bcdd-result.gemspec
66
gemspec
77

8-
gem 'rake', '~> 13.0'
8+
gem 'rake', '~> 13.1'
99

10-
gem 'minitest', '~> 5.0'
10+
gem 'minitest', '~> 5.20'
11+
gem 'mocha', '~> 2.1', require: false
1112

12-
gem 'rubocop', '~> 1.21'
13-
gem 'rubocop-minitest', '~> 0.31.1'
13+
gem 'rubocop', '~> 1.58', '>= 1.58.0'
14+
gem 'rubocop-minitest', '~> 0.33.0'
1415
gem 'rubocop-performance', '~> 1.19', '>= 1.19.1'
1516
gem 'rubocop-rake', '~> 0.6.0'
1617

1718
gem 'simplecov', '~> 0.22.0', require: false
1819

19-
gem 'steep', '~> 1.5', '>= 1.5.3', require: false
20+
gem 'steep', '~> 1.6', require: false if RUBY_VERSION >= '3.0'

0 commit comments

Comments
 (0)