lib/faker/default/internet.rb in faker-2.4.0 vs lib/faker/default/internet.rb in faker-2.5.0

- old
+ new

@@ -71,10 +71,12 @@ end.join(sample(separators)) ]) end end + # rubocop:disable Metrics/ParameterLists + ## # Produces a randomized string of characters suitable for passwords # # @param min_length [Integer] The minimum length of the password # @param max_length [Integer] The maximum length of the password @@ -93,12 +95,12 @@ # Faker::Internet.password(min_length: 10, max_length: 20, mix_case: true) #=> "3k5qS15aNmG" # @example # 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 keywords << :mix_case if legacy_mix_case != NOT_GIVEN keywords << :special_characters if legacy_special_characters != NOT_GIVEN @@ -237,9 +239,10 @@ 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| keywords << :host if legacy_host != NOT_GIVEN keywords << :path if legacy_path != NOT_GIVEN