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
15 changes: 6 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
## Tipo de alteração

Este MR implementa as seguintes alterações:
_(Deixe apenas os itens aplicáveis)_
Este PR implementa as seguintes alterações:
<!-- Deixe apenas os itens aplicáveis -->

- :sparkles: **Nova feature** (alteração que adiciona funcionalidade).

- :bug: **Correção de bug** (alteração que corrige um problema).

- :boom: **Breaking change** (correção ou feature que causaria alterações na funcionalidade existente).

- :heavy_check_mark: **Dívida técnica** (alteração que resolve dívidas técnicas no sistema como falta de testes para funcionalidades antigas ou refatorações).
- :sparkles: **Nova feature**. <!-- alteração que adiciona funcionalidade. -->
- :bug: **Correção de bug**.<!-- alteração que corrige um problema. -->
- :boom: **Breaking change**. <!-- correção ou feature que causaria alterações na funcionalidade existente. -->
- :heavy_check_mark: **Dívida técnica**. <!-- alteração que resolve dívidas técnicas no sistema como falta de testes para funcionalidades antigas ou refatorações. -->

## Detalhes da solução

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
strategy:
matrix:
ruby:
- '3.0.5'
- '3.1.3'
- '3.2.1'
- '3.2'
- '3.3'
- '4.0'

steps:
- uses: actions/checkout@v4
Expand Down
78 changes: 70 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require:
plugins:
- rubocop-rspec
- rubocop-performance
- rubocop-vicenzo

AllCops:
TargetRubyVersion: 3.0
Expand All @@ -15,6 +16,14 @@ AllCops:

##### LAYOUT #####

Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: with_fixed_indentation

Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: consistent

Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: consistent
Expand All @@ -23,10 +32,44 @@ Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent

Layout/FirstMethodArgumentLineBreak:
Enabled: true

Layout/LineLength:
Max: 120
AllowedPatterns: ['(\A|\s)#']

Layout/MultilineMethodArgumentLineBreaks:
Enabled: true

Layout/MultilineMethodCallBraceLayout:
Enabled: true
EnforcedStyle: new_line

Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented

Layout/FirstArrayElementLineBreak:
Enabled: true

Layout/MultilineArrayLineBreaks:
Enabled: true

Layout/MultilineArrayBraceLayout:
Enabled: true
EnforcedStyle: new_line

Layout/FirstHashElementLineBreak:
Enabled: true

Layout/MultilineHashKeyLineBreaks:
Enabled: true

Layout/MultilineHashBraceLayout:
Enabled: true
EnforcedStyle: new_line

##### STYLE #####

Style/PreferredHashMethods:
Expand Down Expand Up @@ -57,9 +100,6 @@ Style/LambdaCall:
Style/Documentation:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

##### LINT #####

Lint/MissingSuper:
Expand All @@ -70,7 +110,7 @@ Lint/MissingSuper:
Naming/InclusiveLanguage:
Enabled: false

Naming/PredicateName:
Naming/PredicatePrefix:
ForbiddenPrefixes:
- is_
- have_
Expand Down Expand Up @@ -110,16 +150,38 @@ RSpec/ContextWording:
RSpec/ExampleLength:
Max: 20

RSpec/FilePath:
CustomTransform:
FHTTPClient: f_http_client
RSpec/MultipleExpectations:
Exclude:
- 'spec/f_http_client/rspec/matchers/**/*'

# This directory contains specs for custom RSpec matchers.
# These examples intentionally use nested `expect { ... }.to raise_error(...)`
# to assert on matcher failure messages, which inherently requires more than
# one `expect` per example and conflicts with the MultipleExpectations cop.
#
# Using `:aggregate_failures` here is not an option, because it captures the
# inner expectation failure and re-raises an aggregated error, so the outer
# `raise_error` matcher no longer sees the original `ExpectationNotMetError`
# and the specs for the failure messages become impossible to express.

RSpec/MultipleMemoizedHelpers:
Enabled: false

RSpec/NestedGroups:
Enabled: false

RSpec/SpecFilePathFormat:
CustomTransform:
FHTTPClient: f_http_client

##### RUBYGEMS #####
Gemspec/RequireMFA:
Enabled: false

##### Vicenzo #####

Vicenzo/Style/MultilineMethodCallParentheses:
AllowedMethods:
- to
- not_to
- to_not
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]

- Add `f_http_client_response_including` RSpec matcher for testing HTTParty::Response objects with nested matchers
- Fix Ruby 4.0+ compatibility by adding activesupport >= 7.2, ostruct, and csv dependencies
- Change Disable rubygems MFA checking #14

## [0.2.1] - 2023-09-27
Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ source 'https://rubygems.org'
gemspec

group :development do
gem 'benchmark' # Required by rubocop on Ruby 4+
gem 'racc' # Required by parser on Ruby 4+
gem 'rubocop'
gem 'rubocop-performance'
gem 'rubocop-rspec'
gem 'rubocop-vicenzo'
end

group :test do
gem 'csv' # Required by httparty on Ruby 4+ (moved from stdlib)
gem 'ostruct' # Required by simplecov on Ruby 4+ (moved from stdlib)
gem 'rspec', '~> 3.0'
gem 'simplecov'
gem 'webmock'
Expand Down
Loading