Skip to content

Commit

Permalink
Merge pull request #70 from djberg96/rubocop
Browse files Browse the repository at this point in the history
Rubocop Updates
  • Loading branch information
djberg96 authored Aug 23, 2024
2 parents 18bdbf8 + 88bdcd9 commit 5253e1d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
platform: windows-latest
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
8 changes: 5 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ RSpec/MultipleExpectations:
Max: 4
RSpec/ContextWording:
Enabled: false
RSpec/FilePath:
SpecSuffixOnly: true
RSpec/SpecFilePathFormat:
Enabled: false
RSpec/InstanceVariable:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Expand Down Expand Up @@ -43,6 +43,8 @@ Style/HashSyntax:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/SlicingWithRange:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/CaseIndentation:
Expand All @@ -52,7 +54,7 @@ Layout/SpaceBeforeBlockBraces:
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
IgnoredMethods: ['describe', 'context']
AllowedMethods: ['describe', 'context']
Metrics/BlockNesting:
Max: 4
Metrics/ClassLength:
Expand Down
7 changes: 2 additions & 5 deletions lib/sys/unix/sys/filesystem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ class Stat
# The filesystem type, e.g. UFS.
attr_accessor :base_type

# The filesystem ID
attr_accessor :filesystem_id

# The filesystem type
attr_accessor :filesystem_type

Expand Down Expand Up @@ -275,8 +272,8 @@ def self.stat(path)
if RbConfig::CONFIG['host_os'] =~ /dragonfly/i
obj.owner = fs[:f_owner]
obj.filesystem_type = fs[:f_type]
obj.sync_reads= fs[:f_syncreads]
obj.async_reads= fs[:f_asyncreads]
obj.sync_reads = fs[:f_syncreads]
obj.async_reads = fs[:f_asyncreads]
obj.sync_writes = fs[:f_syncwrites]
obj.async_writes = fs[:f_asyncwrites]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sys/unix/sys/filesystem/structs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def self.linux64?
:f_spares1, :short,
:f_mntfromname, [:char, 80],
:f_spares2, :short,
:f_spare, [:long,2]
:f_spare, [:long, 2]
)
else
layout(
Expand Down
2 changes: 1 addition & 1 deletion spec/sys_filesystem_unix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require 'sys-filesystem'
require 'pathname'

RSpec.describe Sys::Filesystem, :unix => true do
RSpec.describe Sys::Filesystem, :unix do
let(:linux) { RbConfig::CONFIG['host_os'] =~ /linux/i }
let(:bsd) { RbConfig::CONFIG['host_os'] =~ /bsd|dragonfly/i }
let(:darwin) { RbConfig::CONFIG['host_os'] =~ /mac|darwin/i }
Expand Down
2 changes: 1 addition & 1 deletion spec/sys_filesystem_windows_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require 'sys/filesystem'
require 'pathname'

RSpec.describe Sys::Filesystem, :windows => true do
RSpec.describe Sys::Filesystem, :windows do
let(:root) { 'C:/' }

before do
Expand Down

0 comments on commit 5253e1d

Please sign in to comment.