Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
- name: Install
run: make install
ruby-version: .ruby-version
bundler-cache: true
- name: Run linter
run: make lint
- name: Run tests
Expand Down
13 changes: 13 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
plugins:
- rubocop-rspec

AllCops:
Exclude:
- "vendor/**/*"
Expand All @@ -10,3 +13,13 @@ Style/Documentation:
Enabled: false
Metrics/BlockLength:
Enabled: false

# Спека читается как документация к библиотеке, поэтому имя класса и предикат
# пишутся явно: described_class и be_pair прячут ровно тот API, который она
# показывает.
RSpec/DescribedClass:
Enabled: false
RSpec/PredicateMatcher:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.6
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ source 'https://rubygems.org'

gemspec

gem 'rspec', '~> 3.10'
gem 'rspec', '~> 3.13'

gem 'rubocop', '~> 1.12.1'
gem 'rubocop', '~> 1.89'

gem 'rubocop-rspec', '~> 2.2.0'
gem 'rubocop-rspec', '~> 3.10'
85 changes: 49 additions & 36 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,65 @@ PATH
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
diff-lcs (1.4.4)
parallel (1.20.1)
parser (3.0.1.0)
ast (2.4.3)
diff-lcs (1.6.2)
json (2.21.2)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
parallel (2.1.0)
parser (3.3.12.0)
ast (~> 2.4.1)
rainbow (3.0.0)
regexp_parser (2.1.1)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
racc
prism (1.9.0)
racc (1.8.1)
rainbow (3.1.1)
regexp_parser (2.12.0)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rubocop (1.12.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
rubocop (1.89.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-rspec (2.2.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-progressbar (1.11.0)
unicode-display_width (2.0.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
ruby-progressbar (1.13.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)

PLATFORMS
aarch64-linux
ruby
x86_64-linux

DEPENDENCIES
hexlet-pairs!
rspec (~> 3.10)
rubocop (~> 1.12.1)
rubocop-rspec (~> 2.2.0)
rspec (~> 3.13)
rubocop (~> 1.89)
rubocop-rspec (~> 3.10)

BUNDLED WITH
2.2.15
4.0.16
2 changes: 1 addition & 1 deletion hexlet-pairs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.description = "A SICP'ish Functional Pairs implemented in Ruby."
spec.homepage = "https://github.com/hexlet-components/ruby-pairs"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
spec.required_ruby_version = Gem::Requirement.new(">= 4.0")

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/hexlet-components/ruby-pairs"
Expand Down
6 changes: 3 additions & 3 deletions spec/pairs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
end

it 'check_pair' do
expect(-> { Pairs.car(345) }).to raise_error(NoMethodError)
expect(-> { Pairs.cdr('asdf') }).to raise_error(NoMethodError)
expect(-> { Pairs.car({ key: 'value' }) }).to raise_error(NoMethodError)
expect { Pairs.car(345) }.to raise_error(NoMethodError)
expect { Pairs.cdr('asdf') }.to raise_error(NoMethodError)
expect { Pairs.car({ key: 'value' }) }.to raise_error(NoMethodError)
end
end