Skip to content

Commit

Permalink
Fix some rubocop comments that were showing up in YARD docs. (faker-r…
Browse files Browse the repository at this point in the history
…uby#1771)

* Fix some rubocop comments that were showing up in YARD docs.

* Fix the Rubocop command in Faker::Avatar as well.
  • Loading branch information
connorshea authored and vbrazo committed Sep 29, 2019
1 parent 0a4fdb5 commit fe2191c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/faker/default/app.rb
Expand Up @@ -42,6 +42,8 @@ def author
parse('app.author')
end

# rubocop:disable Metrics/ParameterLists

##
# Produces a String representing a semantic version identifier.
#
Expand All @@ -60,7 +62,6 @@ def author
# Faker::App.semantic_version(patch: 5..6) #=> "7.2.6"
#
# @faker.version 1.4.3
# rubocop:disable Metrics/ParameterLists
def semantic_version(legacy_major = NOT_GIVEN, legacy_minor = NOT_GIVEN, legacy_patch = NOT_GIVEN, major: 0..9, minor: 0..9, patch: 1..9)
# rubocop:enable Metrics/ParameterLists
warn_for_deprecated_arguments do |keywords|
Expand Down
3 changes: 2 additions & 1 deletion lib/faker/default/avatar.rb
Expand Up @@ -6,6 +6,8 @@ class << self
# @private
SUPPORTED_FORMATS = %w[png jpg bmp].freeze

# rubocop:disable Metrics/ParameterLists

##
# Produces a URL for an avatar from robohash.org
#
Expand Down Expand Up @@ -36,7 +38,6 @@ class << self
# #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1&bgset=bg1"
#
# @faker.version 1.4.3
# rubocop:disable Metrics/ParameterLists
def image(legacy_slug = NOT_GIVEN, legacy_size = NOT_GIVEN, legacy_format = NOT_GIVEN, legacy_set = NOT_GIVEN, legacy_bgset = NOT_GIVEN, slug: nil, size: '300x300', format: 'png', set: 'set1', bgset: nil)
# rubocop:enable Metrics/ParameterLists
warn_for_deprecated_arguments do |keywords|
Expand Down
5 changes: 4 additions & 1 deletion lib/faker/default/internet.rb
Expand Up @@ -73,6 +73,8 @@ def username(legacy_specifier = NOT_GIVEN, legacy_separators = NOT_GIVEN, specif
end
end

# rubocop:disable Metrics/ParameterLists

##
# Produces a randomized string of characters suitable for passwords
#
Expand All @@ -95,8 +97,8 @@ def username(legacy_specifier = NOT_GIVEN, legacy_separators = NOT_GIVEN, specif
# Faker::Internet.password(min_length: 10, max_length: 20, mix_case: true, special_characters: true) #=> "*%NkOnJsH4"
#
# @faker.version 2.1.3
# rubocop:disable Metrics/ParameterLists
def password(legacy_min_length = NOT_GIVEN, legacy_max_length = NOT_GIVEN, legacy_mix_case = NOT_GIVEN, legacy_special_characters = NOT_GIVEN, min_length: 8, max_length: 16, mix_case: true, special_characters: false)
# rubocop:enable Metrics/ParameterLists
warn_for_deprecated_arguments do |keywords|
keywords << :min_length if legacy_min_length != NOT_GIVEN
keywords << :max_length if legacy_max_length != NOT_GIVEN
Expand Down Expand Up @@ -239,6 +241,7 @@ def ip_v6_cidr
"#{ip_v6_address}/#{rand(1..127)}"
end

# rubocop:disable Metrics/ParameterLists
def url(legacy_host = NOT_GIVEN, legacy_path = NOT_GIVEN, legacy_scheme = NOT_GIVEN, host: domain_name, path: "/#{username}", scheme: 'http')
# rubocop:enable Metrics/ParameterLists
warn_for_deprecated_arguments do |keywords|
Expand Down

0 comments on commit fe2191c

Please sign in to comment.