Skip to content

Commit

Permalink
Rubocop updates related to v2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
acant committed Dec 16, 2024
1 parent 0e8c984 commit 7d401fd
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in rspec-side_effects.gemspec
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
Expand Down
1 change: 1 addition & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'rspec/side_effects'
Expand Down
6 changes: 3 additions & 3 deletions doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
:why:
:versions: []
:when: 2018-06-13 15:20:17.351348000 Z
- - :whitelist
- - :permit
- Apache 2.0
- :who: Andrew Sullivan Cant <[email protected]>
:why: SugarCRM's primary approved open source license
:versions: []
:when: 2018-06-18 19:28:33.314061000 Z
- - :whitelist
- - :permit
- MIT
- :who: Andrew Sullivan Cant <[email protected]>
:why: SugarCRM's secondary approved open source license
:versions: []
:when: 2018-06-13 15:18:36.240771000 Z
- - :whitelist
- - :permit
- BSD
- :who: Andrew Sullivan Cant <[email protected]>
:why: SugarCRM's secondary approved open source license
Expand Down
9 changes: 6 additions & 3 deletions lib/rspec/side_effects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'rspec/side_effects/version'

module Rspec
Expand All @@ -16,11 +18,12 @@ def its_side_effects_are(*options, &block)

describe('side effects', *options) do
if block
# rubocop:disable Lint/HandleExceptions, Lint/RescueException
before do
# rubocop:disable Lint/HandleExceptions, Lint/RescueException
begin; subject; rescue Exception; end
# rubocop:enable Lint/HandleExceptions, Lint/RescueException
subject
rescue Exception
end
# rubocop:enable Lint/HandleExceptions, Lint/RescueException
example(nil, :aggregate_failures, *options, &block)
else
example(nil, {}) { subject }
Expand Down
4 changes: 3 additions & 1 deletion lib/rspec/side_effects/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

module Rspec
module SideEffects
VERSION = '0.2.0'.freeze
VERSION = '0.2.0'
end
end
2 changes: 2 additions & 0 deletions rspec-side_effects.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'rspec/side_effects/version'
Expand Down
2 changes: 2 additions & 0 deletions spec/rspec/side_effects_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

class TestClass
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'bundler/setup'

# Setup code coverage
Expand Down

0 comments on commit 7d401fd

Please sign in to comment.