diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-04-11 14:56:08 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-04-11 19:12:28 +0900 |
commit | d89cc317c642848008f5b17a82196d25ddcdf124 (patch) | |
tree | b1a0dea2ae57246ff407a7608618ff12bb77204f /lib/rubygems/commands | |
parent | 65e276096f2b5ace95d07ac15af545362e0714c1 (diff) |
util/rubocop -A --only Style/NumericLiteralPrefix
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r-- | lib/rubygems/commands/cert_command.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/commands/setup_command.rb | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/commands/cert_command.rb b/lib/rubygems/commands/cert_command.rb index 57f01a3ae1..22864a9b29 100644 --- a/lib/rubygems/commands/cert_command.rb +++ b/lib/rubygems/commands/cert_command.rb @@ -178,7 +178,7 @@ class Gem::Commands::CertCommand < Gem::Command algorithm = options[:key_algorithm] || Gem::Security::DEFAULT_KEY_ALGORITHM key = Gem::Security.create_key(algorithm) - key_path = Gem::Security.write key, "gem-private_key.pem", 0600, passphrase + key_path = Gem::Security.write key, "gem-private_key.pem", 0o600, passphrase [key, key_path] end @@ -291,7 +291,7 @@ For further reading on signing gems see `ri Gem::Security`. cert = File.read cert_file cert = OpenSSL::X509::Certificate.new cert - permissions = File.stat(cert_file).mode & 0777 + permissions = File.stat(cert_file).mode & 0o777 issuer_cert = options[:issuer_cert] issuer_key = options[:key] diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index cf3924df54..c2b681c60d 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -243,7 +243,7 @@ By default, this RubyGems will install gem as: end def install_executables(bin_dir) - prog_mode = options[:prog_mode] || 0755 + prog_mode = options[:prog_mode] || 0o755 executables = { "gem" => "bin" } executables.each do |tool, path| @@ -369,7 +369,7 @@ By default, this RubyGems will install gem as: File.dirname(loaded_from) else target_specs_dir = File.join(default_dir, "specifications", "default") - mkdir_p target_specs_dir, :mode => 0755 + mkdir_p target_specs_dir, :mode => 0o755 target_specs_dir end @@ -393,7 +393,7 @@ By default, this RubyGems will install gem as: end bundler_bin_dir = bundler_spec.bin_dir - mkdir_p bundler_bin_dir, :mode => 0755 + mkdir_p bundler_bin_dir, :mode => 0o755 bundler_spec.executables.each do |e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e) end @@ -430,8 +430,8 @@ By default, this RubyGems will install gem as: lib_dir, bin_dir = generate_default_dirs end - mkdir_p lib_dir, :mode => 0755 - mkdir_p bin_dir, :mode => 0755 + mkdir_p lib_dir, :mode => 0o755 + mkdir_p bin_dir, :mode => 0o755 [lib_dir, bin_dir] end @@ -639,10 +639,10 @@ abort "#{deprecation_message}" dest_file = File.join dest_dir, file dest_dir = File.dirname dest_file unless File.directory? dest_dir - mkdir_p dest_dir, :mode => 0755 + mkdir_p dest_dir, :mode => 0o755 end - install file, dest_file, :mode => options[:data_mode] || 0644 + install file, dest_file, :mode => options[:data_mode] || 0o644 end def remove_file_list(files, dir) |