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
10 changes: 2 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
fail-fast: false # don't fail all matrix builds if one fails
matrix:
ruby:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- '3.4'
- '4.0'
- 'head'
- truffleruby-head
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
Expand All @@ -53,13 +53,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}

- name: Install dependencies
run: |
if [[ "${{ matrix.ruby }}" < "3.1" ]]; then
gem install bundler:2.4.22
bundle _2.4.22_ install
else
bundle install
fi
run: bundle install

- name: Run tests
run: bundle exec rake test
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
- rubocop-rake

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
NewCops: enable

# Suppress noise for obvious operator precedence.
Expand Down
2 changes: 1 addition & 1 deletion faker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.bindir = 'bin'
spec.executables = ['faker']
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 3.0'
spec.required_ruby_version = '>= 3.1'

spec.metadata['changelog_uri'] = 'https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md'
spec.metadata['source_code_uri'] = 'https://github.com/faker-ruby/faker'
Expand Down
6 changes: 3 additions & 3 deletions lib/faker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def bothify(string)
letterify(numerify(string))
end

def generate(as_type, &block)
PositionalGenerator.new(as_type, &block).generate
def generate(as_type, &)
PositionalGenerator.new(as_type, &).generate
end

# Given a regular expression, attempt to generate a string
Expand Down Expand Up @@ -195,7 +195,7 @@ def flexible(key)
# name:
# girls_name: ["Alice", "Cheryl", "Tatiana"]
# Then you can call Faker::Name.girls_name and it will act like #first_name
def method_missing(mth, *args, &block)
def method_missing(mth, *args, &)
super unless flexible_key

if (translation = translate("faker.#{flexible_key}.#{mth}"))
Expand Down