Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Akber Saifee committed Feb 3, 2024
1 parent 9a063b5 commit 981e957
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end

desc "Get release notes for the current or specific version"
task :release_notes, [:version] do |_t, args|
version = (args[:version] || Flutter::VERSION)
version = args[:version] || Flutter::VERSION
parser = Keepachangelog::MarkdownParser.load("CHANGELOG.md")
parser.parsed_content.delete("intro")
parser.parsed_content.delete("title")
Expand Down
8 changes: 5 additions & 3 deletions lib/flutter/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

begin
require "minitest"
rescue LoadError # rubocop:disable Lint/SuppressedException
rescue LoadError # rubocop:disable Lint/SuppressedException
end

module Flutter
Expand All @@ -15,8 +15,10 @@ class << self

def flutter_tracker
@tracker ||= Flutter::Tracker.new(
Flutter.config.sources, Flutter.config.exclusions,
Flutter.config.storage_class, Flutter.config.storage_options
Flutter.config.sources,
Flutter.config.exclusions,
Flutter.config.storage_class,
Flutter.config.storage_options,
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/flutter/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def initialize(path:)
# (see AbstractStorage#load!)
def load!
if File.exist?(@full_path)
persisted = YAML.load(File.read(@full_path), **YAML_LOAD_OPTS)
persisted = YAML.load_file(@full_path, **YAML_LOAD_OPTS)
@state.update(persisted) if persisted
end
end
Expand Down
12 changes: 8 additions & 4 deletions lib/flutter/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class << self

def tracker
@tracker ||= Flutter::Tracker.new(
Flutter.config.sources, Flutter.config.exclusions,
Flutter.config.storage_class, Flutter.config.storage_options
Flutter.config.sources,
Flutter.config.exclusions,
Flutter.config.storage_class,
Flutter.config.storage_options,
)
end
end
Expand Down Expand Up @@ -55,8 +57,10 @@ class << self
config.around(:each) do |example|
Flutter::RSpec.tracker.start(example.full_description) if Flutter.enabled
example.run
Flutter::RSpec.tracker.stop(example.full_description,
example.execution_result.exception.nil?) if Flutter.enabled
Flutter::RSpec.tracker.stop(
example.full_description,
example.execution_result.exception.nil?,
) if Flutter.enabled
end

config.after(:suite) do
Expand Down
2 changes: 1 addition & 1 deletion lib/flutter/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def skip?(test, test_location, test_source)
test_source_unchanged = @test_source_mapping[test_location_rel][test] == @source_mapping.dig(
test_location_rel, test
)
return unless test_seen && test_source_unchanged
return false unless test_seen && test_source_unchanged

sources = @test_mapping[test] || {}
sources.map do |file, methods|
Expand Down
2 changes: 1 addition & 1 deletion test/test_flutter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "./test_helper"
require_relative "test_helper"

class TestFlutter < Minitest::Test
def test_that_it_has_a_version_number
Expand Down
2 changes: 1 addition & 1 deletion test/test_tracker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "./test_helper"
require_relative "test_helper"
require "flutter/tracker"
require "flutter/persistence"

Expand Down

0 comments on commit 981e957

Please sign in to comment.