Skip to content

Commit

Permalink
Merge pull request #20 from djberg96/rubocop
Browse files Browse the repository at this point in the history
More Rubocop Updates
  • Loading branch information
djberg96 authored Apr 28, 2024
2 parents 7e5ae0b + 86b3a57 commit 1fe29d7
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
test:
strategy:
matrix:
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3', 'jruby', 'truffleruby']
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', 'jruby', 'truffleruby']
platform: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- ruby-version: truffleruby
Expand Down
6 changes: 5 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RSpec/InstanceVariable:
Enabled: false
RSpec/BeforeAfterAll:
Enabled: false
RSpec/SpecFilePathFormat:
Enabled: false

AllCops:
NewCops: enable
Expand All @@ -20,6 +22,8 @@ AllCops:
- examples/*.rb
Lint/AssignmentInCondition:
Enabled: false
Style/FetchEnvVar:
Enabled: false
Style/HashSyntax:
Enabled: false
Style/MethodCallWithoutArgsParentheses:
Expand All @@ -43,7 +47,7 @@ Layout/SpaceBeforeBlockBraces:
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
IgnoredMethods: ['describe', 'context']
AllowedMethods: ['describe', 'context']
Metrics/ClassLength:
Enabled: false
Metrics/MethodLength:
Expand Down
2 changes: 1 addition & 1 deletion lib/sys/windows/uname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def self.parse_ms_date(str)
# String rather than a Fixnum/Bignum. This deals with that for now.
#
def self.convert(str)
return nil if str.nil? # Don't turn nil into 0
return nil if str.nil? # Don't turn nil into 0
str.to_i
end

Expand Down
6 changes: 3 additions & 3 deletions spec/sys_platform_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
end

example 'the ARCH constant is defined' do
expect(Sys::Platform::ARCH).to be_kind_of(Symbol)
expect(Sys::Platform::ARCH).to be_a(Symbol)
end

example 'the OS constant is defined' do
expect(Sys::Platform::OS).to be_kind_of(Symbol)
expect(Sys::Platform::OS).to be_a(Symbol)
end

example 'the IMPL constant is defined' do
expect(Sys::Platform::IMPL).to be_kind_of(Symbol)
expect(Sys::Platform::IMPL).to be_a(Symbol)
end

example 'the IMPL returns an expected value on windows', :windows do
Expand Down
Loading

0 comments on commit 1fe29d7

Please sign in to comment.