Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More rubocop fixes #9

Merged
merged 2 commits into from
Oct 14, 2017
Merged

More rubocop fixes #9

merged 2 commits into from
Oct 14, 2017

Conversation

arthurmde
Copy link
Contributor

This PR removes 26 rubocop offenses. Now, there are 41 offenses missing. The following offenses were removed:

lib/core/transport.rb:11:1: C: Extra empty line detected at module body beginning.
lib/core/transport.rb:14:1: C: Extra empty line detected at class body beginning.
lib/core/transport.rb:15:81: C: Line is too long. [83/80]
      attr_reader :folder_path, :total_files, :include_folder, :uuid, :current_file
                                                                                ^^^
lib/core/transport.rb:22:118: C: Unnecessary spacing detected.
        @uuid           = "#{File.basename(File.absolute_path(folder_path))}-#{Rex::Text::rand_text_alphanumeric(8)}"  # Structure: foldername-8RNDLTRS
                                                                                                                     ^
lib/core/transport.rb:22:89: C: Do not use :: for method calls.
        @uuid           = "#{File.basename(File.absolute_path(folder_path))}-#{Rex::Text::rand_text_alphanumeric(8)}"  # Structure: foldername-8RNDLTRS
lib/core/transport.rb:43:32: C: Use the new Ruby 1.9 hash syntax.
            HTTP.put(uri.to_s, :body => File.read(f))
                               ^^^^^^^^
lib/core/transport.rb:45:32: C: Use the new Ruby 1.9 hash syntax.
            HTTP.put(uri.to_s, :body => '')
                               ^^^^^^^^
lib/core/transport.rb:49:9: C: Redundant return detected.
        return access_uri
        ^^^^^^
lib/core/transport.rb:51:1: C: Extra empty line detected at class body end
server/server.rb:7:3: C: Use the new Ruby 1.9 hash syntax.
  :Port             => 443,
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:8:3: C: Use the new Ruby 1.9 hash syntax.
  :DocumentRoot     => "/root/rise-server-public",
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:8:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  :DocumentRoot     => "/root/rise-server-public",
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
server/server.rb:9:3: C: Use the new Ruby 1.9 hash syntax.
  :SSLEnable        => true,
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:10:3: C: Use the new Ruby 1.9 hash syntax.
  :SSLVerifyClient  => OpenSSL::SSL::VERIFY_NONE,
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:11:3: C: Use the new Ruby 1.9 hash syntax.
  :SSLCertificate   => OpenSSL::X509::Certificate.new(File.read('/etc/letsencrypt/archive/rise.sh/cert1.pem')),
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:12:3: C: Use the new Ruby 1.9 hash syntax.
  :SSLPrivateKey    => OpenSSL::PKey::RSA.new(File.read('/etc/letsencrypt/archive/rise.sh/privkey1.pem')),
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:13:3: C: Use the new Ruby 1.9 hash syntax.
  :SSLCertName      => [[ 'US', WEBrick::Utils::getservername ]]
  ^^^^^^^^^^^^^^^^^^^^
server/server.rb:13:26: C: Space inside square brackets detected.
  :SSLCertName      => [[ 'US', WEBrick::Utils::getservername ]]
                         ^
server/server.rb:13:47: C: Do not use :: for method calls.
  :SSLCertName      => [[ 'US', WEBrick::Utils::getservername ]]
                                              ^^
server/server.rb:13:62: C: Space inside square brackets detected.
  :SSLCertName      => [[ 'US', WEBrick::Utils::getservername ]]
                                                             ^
server/server.rb:27:1: C: Extra empty line detected at block body end.
        ^^^^^
bin/rise:47:1: C: Extra blank line detected.
bin/rise:52:51: C: Unnecessary spacing detected.
  result_url = uploader.upload!(options[:verbose])  # Do the file upload
                                                  ^
bin/rise:57:62: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  puts Paint["[#{((Time.now - beginning_time)).round(2)}s]", "#95a5a6"]

@cbrnrd
Copy link
Owner

cbrnrd commented Oct 14, 2017

Thanks for tackling this. merging now

@cbrnrd cbrnrd merged commit c66569c into cbrnrd:master Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants