Created
March 31, 2019 21:37
-
-
Save ChefAustin/088e684d42af05de436f79145716c028 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inspecting 27 files | |
CCCCCWWCCCCWWCWCWCWCCCCCCCC | |
Offenses: | |
~/macinbox/macinbox.gemspec:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
lib = File.expand_path("../lib", __FILE__) | |
^ | |
~/macinbox/macinbox.gemspec:1:12: C: Style/ExpandPathArguments: Use expand_path('lib', __dir__) instead of expand_path('../lib', __FILE__). | |
lib = File.expand_path("../lib", __FILE__) | |
^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:1:24: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
lib = File.expand_path("../lib", __FILE__) | |
^^^^^^^^ | |
~/macinbox/macinbox.gemspec:3:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/version" | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:6:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.name = "macinbox" | |
^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:8:22: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.authors = ["David Kramer"] | |
^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:9:22: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.email = ["bacongravy@icloud.com"] | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:11:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.summary = "Puts macOS in a Vagrant box" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:12:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.homepage = "https://github.com/bacongravy/macinbox" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:13:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.license = "MIT" | |
^^^^^ | |
~/macinbox/macinbox.gemspec:18:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.bindir = "exe" | |
^^^^^ | |
~/macinbox/macinbox.gemspec:20:22: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.require_paths = ["lib"] | |
^^^^^ | |
~/macinbox/macinbox.gemspec:22:32: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.add_development_dependency "bundler", "~> 1.16" | |
^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:22:43: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.add_development_dependency "bundler", "~> 1.16" | |
^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:23:32: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.add_development_dependency "rake", "~> 10.0" | |
^^^^^^ | |
~/macinbox/macinbox.gemspec:23:40: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.add_development_dependency "rake", "~> 10.0" | |
^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:25:29: C: Gemspec/RequiredRubyVersion: required_ruby_version (2.3, declared in macinbox.gemspec) and TargetRubyVersion (2.6, which may be specified in .rubocop.yml) should be equal. | |
s.required_ruby_version = '~> 2.3' | |
^^^^^^^^ | |
~/macinbox/macinbox.gemspec:27:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.requirements << "macOS Mojave" | |
^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:28:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.requirements << "macOS Mojave installer app" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:29:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
s.requirements << "Vagrant" | |
^^^^^^^^^ | |
~/macinbox/macinbox.gemspec:30:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/Rakefile:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require "bundler/gem_tasks" | |
^ | |
~/macinbox/Rakefile:1:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "bundler/gem_tasks" | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/Rakefile:2:6: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
task :default => :spec | |
^^^^^^^^^^^ | |
~/macinbox/Vagrantfile:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
Vagrant.configure("2") do |config| | |
^ | |
~/macinbox/Vagrantfile:1:19: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Vagrant.configure("2") do |config| | |
^^^ | |
~/macinbox/Vagrantfile:2:19: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
config.vm.box = "macinbox" | |
^^^^^^^^^^ | |
~/macinbox/Gemfile:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
source "https://rubygems.org" | |
^ | |
~/macinbox/Gemfile:1:8: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
source "https://rubygems.org" | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/Gemfile:3:21: C: Layout/SpaceInsideBlockBraces: Space between { and | missing. | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
^^ | |
~/macinbox/bin/console:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
#!/usr/bin/env ruby | |
^ | |
~/macinbox/bin/console:3:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "bundler/setup" | |
^^^^^^^^^^^^^^^ | |
~/macinbox/bin/console:4:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox" | |
^^^^^^^^^^ | |
~/macinbox/bin/console:13:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "irb" | |
^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'macinbox/error' | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:6:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/virtual_disk.rb:7:3: C: Style/Documentation: Missing top-level class documentation comment. | |
class VirtualDisk | |
^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:8:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/virtual_disk.rb:11:21: C: Style/GlobalVars: Do not introduce global variables. | |
@quiet_flag = $verbose ? [] : %W[ -quiet ] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:11:37: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@quiet_flag = $verbose ? [] : %W[ -quiet ] | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:11:40: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@quiet_flag = $verbose ? [] : %W[ -quiet ] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:11:47: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@quiet_flag = $verbose ? [] : %W[ -quiet ] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:12:20: C: Style/GlobalVars: Do not introduce global variables. | |
@task_opts = $verbose ? [] : [{ :out => File::NULL }] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:12:39: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
@task_opts = $verbose ? [] : [{ :out => File::NULL }] | |
^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:19:9: C: Naming/AccessorMethodName: Do not prefix writer method names with set_. | |
def set_devices(devices) | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:22:81: C: Metrics/LineLength: Line is too long. [97/80] | |
@volume_device = devices[/([^ \n]*)([ \t])+(Apple_HFS|41504653-0000-11AA-AA11-0030654)/, 1] | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:23:7: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("failed to attach the image") unless File.exist? @disk_device | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:23:33: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("failed to attach the image") unless File.exist? @disk_device | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:23:81: C: Metrics/LineLength: Line is too long. [93/80] | |
raise Macinbox::Error.new("failed to attach the image") unless File.exist? @disk_device | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:33:36: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
disk_info = Task.backtick %W[ /usr/sbin/diskutil info #{@volume_device} ] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:33:78: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
disk_info = Task.backtick %W[ /usr/sbin/diskutil info #{@volume_device} ] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:38:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil create -srcfolder #{srcfolder} #{@image} ] + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:38:77: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil create -srcfolder #{srcfolder} #{@image} ] + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:38:81: C: Metrics/LineLength: Line is too long. [92/80] | |
Task.run %W[ /usr/bin/hdiutil create -srcfolder #{srcfolder} #{@image} ] + @quiet_flag | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:42:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil create -size #{disk_size}g -type SPARSE -fs #{fstype} -volname #{"Macintosh HD"} -uid 0 -gid 80 -mode 1775 #{@image} ] + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:42:81: C: Metrics/LineLength: Line is too long. [168/80] | |
Task.run %W[ /usr/bin/hdiutil create -size #{disk_size}g -type SPARSE -fs #{fstype} -volname #{"Macintosh HD"} -uid 0 -gid 80 -mode 1775 #{@image} ] + @quiet_flag | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:42:102: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
Task.run %W[ /usr/bin/hdiutil create -size #{disk_size}g -type SPARSE -fs #{fstype} -volname #{"Macintosh HD"} -uid 0 -gid 80 -mode 1775 #{@image} ] + @quiet_flag | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:42:102: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Task.run %W[ /usr/bin/hdiutil create -size #{disk_size}g -type SPARSE -fs #{fstype} -volname #{"Macintosh HD"} -uid 0 -gid 80 -mode 1775 #{@image} ] + @quiet_flag | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:42:153: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil create -size #{disk_size}g -type SPARSE -fs #{fstype} -volname #{"Macintosh HD"} -uid 0 -gid 80 -mode 1775 #{@image} ] + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:46:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil convert -format #{format} -o #{outfile} #{@image} ] + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:46:81: C: Metrics/LineLength: Line is too long. [101/80] | |
Task.run %W[ /usr/bin/hdiutil convert -format #{format} -o #{outfile} #{@image} ] + @quiet_flag | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:46:86: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil convert -format #{format} -o #{outfile} #{@image} ] + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:50:19: C: Style/NestedParenthesizedCalls: Add parentheses to nested method call Task.backtick %W[ /usr/bin/hdiutil attach #{@image} -nomount ]. | |
set_devices(Task.backtick %W[ /usr/bin/hdiutil attach #{@image} -nomount ]) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:50:36: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
set_devices(Task.backtick %W[ /usr/bin/hdiutil attach #{@image} -nomount ]) | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:50:79: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
set_devices(Task.backtick %W[ /usr/bin/hdiutil attach #{@image} -nomount ]) | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:50:81: C: Metrics/LineLength: Line is too long. [81/80] | |
set_devices(Task.backtick %W[ /usr/bin/hdiutil attach #{@image} -nomount ]) | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:54:30: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
mount_option = at ? %W[ -mountpoint #{at} ] : [] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:54:48: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
mount_option = at ? %W[ -mountpoint #{at} ] : [] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:55:32: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
owners_option = owners ? %W[ -owners on ] : [] | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:55:35: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
owners_option = owners ? %W[ -owners on ] : [] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:55:46: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
owners_option = owners ? %W[ -owners on ] : [] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:56:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil attach #{@volume_device} -nobrowse ] + mount_option + owners_option + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:56:71: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/hdiutil attach #{@volume_device} -nobrowse ] + mount_option + owners_option + @quiet_flag | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:56:81: C: Metrics/LineLength: Line is too long. [117/80] | |
Task.run %W[ /usr/bin/hdiutil attach #{@volume_device} -nobrowse ] + mount_option + owners_option + @quiet_flag | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:60:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil mount -mountPoint #{at} #{@efi_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:60:77: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil mount -mountPoint #{at} #{@efi_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:60:81: C: Metrics/LineLength: Line is too long. [91/80] | |
Task.run %W[ /usr/sbin/diskutil mount -mountPoint #{at} #{@efi_device} ] + @task_opts | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:64:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil unmount #{@efi_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:64:61: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil unmount #{@efi_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:67:5: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
def eject ... | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:69:7: C: Style/For: Prefer each over for. | |
for attempt in 1..max_attempts ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:71:19: C: Style/GlobalVars: Do not introduce global variables. | |
quiet = $verbose ? [] : %W[ quiet ] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:71:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
quiet = $verbose ? [] : %W[ quiet ] | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:71:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
quiet = $verbose ? [] : %W[ quiet ] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:71:44: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
quiet = $verbose ? [] : %W[ quiet ] | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:72:20: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /usr/sbin/diskutil ] + quiet + %W[ eject #{@disk_device} ] + @task_opts | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:72:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil ] + quiet + %W[ eject #{@disk_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:72:42: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil ] + quiet + %W[ eject #{@disk_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:72:58: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil ] + quiet + %W[ eject #{@disk_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:72:80: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/diskutil ] + quiet + %W[ eject #{@disk_device} ] + @task_opts | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:72:81: C: Metrics/LineLength: Line is too long. [94/80] | |
Task.run %W[ /usr/sbin/diskutil ] + quiet + %W[ eject #{@disk_device} ] + @task_opts | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:76:11: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. | |
raise if attempt == max_attempts | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:77:81: C: Metrics/LineLength: Line is too long. [92/80] | |
Logger.info "Eject failed: #{error.message}. Sleeping and retrying..." if $verbose | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:77:85: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Eject failed: #{error.message}. Sleeping and retrying..." if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:84:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. | |
return unless @disk_device | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:85:7: C: Style/CommandLiteral: Use backticks around command string. | |
%x( /usr/bin/hdiutil detach -quiet -force #{@disk_device.shellescape} > /dev/null 2>&1 ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:85:10: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
%x( /usr/bin/hdiutil detach -quiet -force #{@disk_device.shellescape} > /dev/null 2>&1 ) | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:85:81: C: Metrics/LineLength: Line is too long. [94/80] | |
%x( /usr/bin/hdiutil detach -quiet -force #{@disk_device.shellescape} > /dev/null 2>&1 ) | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:85:93: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
%x( /usr/bin/hdiutil detach -quiet -force #{@disk_device.shellescape} > /dev/null 2>&1 ) | |
^ | |
~/macinbox/lib/macinbox/virtual_disk.rb:88:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/virtual_disk.rb:90:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/cli.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'macinbox/cli/options' | |
^ | |
~/macinbox/lib/macinbox/cli.rb:6:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions" | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:7:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/collector" | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:14:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/cli.rb:15:3: C: Metrics/ClassLength: Class has too many lines. [125/100] | |
class CLI ... | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:15:3: C: Style/Documentation: Missing top-level class documentation comment. | |
class CLI | |
^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:16:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/cli.rb:19:9: C: Style/RedundantSelf: Redundant self detected. | |
self.new.start(argv) | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:21:22: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.error "Error: " + e.to_s | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:27:5: C: Metrics/AbcSize: Assignment Branch Condition size for start is too high. [120.5/15] | |
def start(argv) ... | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:27:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for start is too high. [23/6] | |
def start(argv) ... | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:27:5: C: Metrics/MethodLength: Method has too many lines. [108/10] | |
def start(argv) ... | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:27:5: C: Metrics/PerceivedComplexity: Perceived complexity for start is too high. [22/7] | |
def start(argv) ... | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:28:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body beginning. | |
~/macinbox/lib/macinbox/cli.rb:33:53: C: Style/GlobalVars: Do not introduce global variables. | |
collector = Collector.new(preserve_temp_dirs: $debug) | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:41:9: C: Style/NegatedIf: Favor unless over if for negative conditions. | |
if !File.exists?(@options[:installer_dmg]) ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:41:18: W: Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. | |
if !File.exists?(@options[:installer_dmg]) | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:42:11: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Installer disk image not found: #{@options[:installer_dmg]}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:42:81: C: Metrics/LineLength: Line is too long. [98/80] | |
raise Macinbox::Error.new("Installer disk image not found: #{@options[:installer_dmg]}") | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:43:9: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. | |
end | |
^^^ | |
~/macinbox/lib/macinbox/cli.rb:44:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Attaching installer disk image..." | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:49:66: C: Layout/SpaceAroundOperators: Surrounding space missing for operator +. | |
@options[:installer_path] = Dir[installer_disk.mountpoint+'/*.app'].first | |
^ | |
~/macinbox/lib/macinbox/cli.rb:49:81: C: Metrics/LineLength: Line is too long. [81/80] | |
@options[:installer_path] = Dir[installer_disk.mountpoint+'/*.app'].first | |
^ | |
~/macinbox/lib/macinbox/cli.rb:52:7: C: Style/NegatedIf: Favor unless over if for negative conditions. | |
if not File.exists? @options[:installer_path] ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:52:10: C: Style/Not: Use ! instead of not. | |
if not File.exists? @options[:installer_path] | |
^^^ | |
~/macinbox/lib/macinbox/cli.rb:52:19: W: Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. | |
if not File.exists? @options[:installer_path] | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:53:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Installer app not found: #{@options[:installer_path]}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:53:81: C: Metrics/LineLength: Line is too long. [90/80] | |
raise Macinbox::Error.new("Installer app not found: #{@options[:installer_path]}") | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:7: C: Style/NegatedIf: Favor unless over if for negative conditions. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:10: C: Style/Not: Use ! instead of not. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:14: C: Style/WordArray: Use %w or %W for an array of words. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:15: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:32: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:50: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:63: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:56:81: C: Metrics/LineLength: Line is too long. [106/80] | |
if not ["vmware_fusion", "vmware_desktop", "parallels", "virtualbox"].include? @options[:box_format] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:57:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Box format not supported: #{@options[:box_format]}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:57:81: C: Metrics/LineLength: Line is too long. [87/80] | |
raise Macinbox::Error.new("Box format not supported: #{@options[:box_format]}") | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:60:38: C: Style/CaseEquality: Avoid the use of the case equality operator ===. | |
if /^vmware_(fusion|desktop)$/ === @options[:box_format] && !File.exists?(@options[:vmware_path]) | |
^^^ | |
~/macinbox/lib/macinbox/cli.rb:60:73: W: Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. | |
if /^vmware_(fusion|desktop)$/ === @options[:box_format] && !File.exists?(@options[:vmware_path]) | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:60:81: C: Metrics/LineLength: Line is too long. [103/80] | |
if /^vmware_(fusion|desktop)$/ === @options[:box_format] && !File.exists?(@options[:vmware_path]) | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:61:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("VMware Fusion app not found: #{@options[:vmware_path]}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:61:81: C: Metrics/LineLength: Line is too long. [91/80] | |
raise Macinbox::Error.new("VMware Fusion app not found: #{@options[:vmware_path]}") | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:64:24: C: Style/CaseEquality: Avoid the use of the case equality operator ===. | |
if /^parallels$/ === @options[:box_format] && !File.exists?(@options[:parallels_path]) | |
^^^ | |
~/macinbox/lib/macinbox/cli.rb:64:59: W: Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. | |
if /^parallels$/ === @options[:box_format] && !File.exists?(@options[:parallels_path]) | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:64:81: C: Metrics/LineLength: Line is too long. [92/80] | |
if /^parallels$/ === @options[:box_format] && !File.exists?(@options[:parallels_path]) | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:65:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Parallels Desktop app not found: #{@options[:parallels_path]}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:65:81: C: Metrics/LineLength: Line is too long. [98/80] | |
raise Macinbox::Error.new("Parallels Desktop app not found: #{@options[:parallels_path]}") | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:68:25: C: Style/CaseEquality: Avoid the use of the case equality operator ===. | |
if /^virtualbox$/ === @options[:box_format] && !File.exists?('/usr/local/bin/VBoxManage') | |
^^^ | |
~/macinbox/lib/macinbox/cli.rb:68:60: W: Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. | |
if /^virtualbox$/ === @options[:box_format] && !File.exists?('/usr/local/bin/VBoxManage') | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:68:81: C: Metrics/LineLength: Line is too long. [95/80] | |
if /^virtualbox$/ === @options[:box_format] && !File.exists?('/usr/local/bin/VBoxManage') | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:69:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("VBoxManage not found: /usr/local/bin/VBoxManage") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:69:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("VBoxManage not found: /usr/local/bin/VBoxManage") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:69:81: C: Metrics/LineLength: Line is too long. [84/80] | |
raise Macinbox::Error.new("VBoxManage not found: /usr/local/bin/VBoxManage") | |
^^^^ | |
~/macinbox/lib/macinbox/cli.rb:72:39: W: Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. | |
if @options[:use_qemu] && !File.exists?('/usr/local/bin/qemu-img') | |
^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:73:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("QEMU not found: /usr/local/bin/qemu-img") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:73:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("QEMU not found: /usr/local/bin/qemu-img") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:76:26: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
vagrant_home = ENV["VAGRANT_HOME"] | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:78:28: C: Style/AndOr: Use || instead of or. | |
if vagrant_home.nil? or vagrant_home.empty? | |
^^ | |
~/macinbox/lib/macinbox/cli.rb:79:41: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
vagrant_home = File.expand_path "~/.vagrant.d" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:82:7: C: Style/NegatedIf: Favor unless over if for negative conditions. | |
if !File.exist? vagrant_home ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:83:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("VAGRANT_HOME not found: #{vagrant_home}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:88:7: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. | |
if !File.exist? vagrant_boxes_dir | |
^^ | |
~/macinbox/lib/macinbox/cli.rb:88:7: C: Style/NegatedIf: Favor unless over if for negative conditions. | |
if !File.exist? vagrant_boxes_dir ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:92:37: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
root_temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t macinbox_root_temp ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:92:40: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
root_temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t macinbox_root_temp ] | |
^ | |
~/macinbox/lib/macinbox/cli.rb:92:81: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
root_temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t macinbox_root_temp ] | |
^ | |
~/macinbox/lib/macinbox/cli.rb:92:81: C: Metrics/LineLength: Line is too long. [82/80] | |
root_temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t macinbox_root_temp ] | |
^^ | |
~/macinbox/lib/macinbox/cli.rb:93:40: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
user_temp_dir = Task.backtick %W[ /usr/bin/sudo -u #{ENV["SUDO_USER"]} /usr/bin/mktemp -d -t macinbox_user_temp ] | |
^ | |
~/macinbox/lib/macinbox/cli.rb:93:64: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
user_temp_dir = Task.backtick %W[ /usr/bin/sudo -u #{ENV["SUDO_USER"]} /usr/bin/mktemp -d -t macinbox_user_temp ] | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:93:81: C: Metrics/LineLength: Line is too long. [119/80] | |
user_temp_dir = Task.backtick %W[ /usr/bin/sudo -u #{ENV["SUDO_USER"]} /usr/bin/mktemp -d -t macinbox_user_temp ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:93:118: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
user_temp_dir = Task.backtick %W[ /usr/bin/sudo -u #{ENV["SUDO_USER"]} /usr/bin/mktemp -d -t macinbox_user_temp ] | |
^ | |
~/macinbox/lib/macinbox/cli.rb:98:7: C: Style/WordArray: Use %w or %W for an array of words. | |
["TERM", "INT", "EXIT"].each do |signal| | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:98:8: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
["TERM", "INT", "EXIT"].each do |signal| | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:98:16: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
["TERM", "INT", "EXIT"].each do |signal| | |
^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:98:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
["TERM", "INT", "EXIT"].each do |signal| | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:100:24: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
trap signal, "SYSTEM_DEFAULT" unless signal == "EXIT" | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:100:58: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
trap signal, "SYSTEM_DEFAULT" unless signal == "EXIT" | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:104:25: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Cleaning up..." | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:107:26: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.error "Cleaning up..." | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:110:62: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Process.kill(signal, Process.pid) unless signal == "EXIT" | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:114:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@options[:image_path] = "macinbox.sparseimage" | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:115:30: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@options[:vmdk_path] = "macinbox.vmdk" | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:116:29: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@options[:hdd_path] = "macinbox.hdd" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:117:29: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@options[:vdi_path] = "macinbox.vdi" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:118:29: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@options[:box_path] = "macinbox.box" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:122:7: C: Metrics/BlockLength: Block has too many lines. [32/25] | |
Dir.chdir(root_temp_dir) do ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:123:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/cli.rb:124:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Checking macOS versions..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:125:81: C: Metrics/LineLength: Line is too long. [82/80] | |
@options[:macos_version] = Actions::CheckMacosVersions.new(@options).run | |
^^ | |
~/macinbox/lib/macinbox/cli.rb:128:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating image from installer..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:136:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating VMDK from image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:140:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating box from VMDK..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:146:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating HDD from image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:150:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating box from HDD..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:156:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating VDI from image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:160:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating box from VDI..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:166:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Installing box..." do | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:169:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/lib/macinbox/cli.rb:173:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end. | |
~/macinbox/lib/macinbox/cli.rb:177:7: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if Process.uid != 0 or ENV["SUDO_USER"].nil? | |
^^ | |
~/macinbox/lib/macinbox/cli.rb:177:27: C: Style/AndOr: Use || instead of or. | |
if Process.uid != 0 or ENV["SUDO_USER"].nil? | |
^^ | |
~/macinbox/lib/macinbox/cli.rb:177:34: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
if Process.uid != 0 or ENV["SUDO_USER"].nil? | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:178:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("script must be run as root with sudo") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:178:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("script must be run as root with sudo") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli.rb:181:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/cli/options.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'optparse' | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:6:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/cli/options.rb:7:3: C: Style/Documentation: Missing top-level class documentation comment. | |
class CLI | |
^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:8:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/cli/options.rb:9:29: C: Style/MutableConstant: Freeze mutable objects assigned to constants. | |
DEFAULT_OPTION_VALUES = { ... | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:10:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:box_format => "vmware_desktop", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:10:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:box_format => "vmware_desktop", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:10:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:box_format => "vmware_desktop", | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:11:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:box_name => "macinbox", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:11:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:box_name => "macinbox", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:11:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:box_name => "macinbox", | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:12:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:disk_size => 64, | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:12:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:disk_size => 64, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:13:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:fstype => "APFS", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:13:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:fstype => "APFS", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:13:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:fstype => "APFS", | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:14:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:memory_size => 2048, | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:14:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:memory_size => 2048, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:15:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:cpu_count => 2, | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:15:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:cpu_count => 2, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:16:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:short_name => "vagrant", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:16:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:short_name => "vagrant", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:16:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:short_name => "vagrant", | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:17:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:installer_path => "/Applications/Install macOS Mojave.app", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:17:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:installer_path => "/Applications/Install macOS Mojave.app", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:17:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:installer_path => "/Applications/Install macOS Mojave.app", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:18:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:vmware_path => "/Applications/VMware Fusion.app", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:18:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:vmware_path => "/Applications/VMware Fusion.app", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:18:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:vmware_path => "/Applications/VMware Fusion.app", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:19:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:parallels_path => "/Applications/Parallels Desktop.app", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:19:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:parallels_path => "/Applications/Parallels Desktop.app", | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:19:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:parallels_path => "/Applications/Parallels Desktop.app", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:20:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:vmware_tools => true, | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:20:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:vmware_tools => true, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:21:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:auto_login => true, | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:21:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:auto_login => true, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:22:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:skip_mini_buddy => true, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:23:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:hidpi => true, | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:23:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:hidpi => true, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:24:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:fullscreen => true, | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:24:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:fullscreen => true, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:25:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:gui => true, | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:25:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:gui => true, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:26:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:use_qemu => false, | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:26:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:use_qemu => false, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:27:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:verbose => false, | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:27:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:verbose => false, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:28:7: C: Layout/AlignHash: Align the elements of a hash literal if they span more than one line. | |
:debug => false, | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:28:7: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
:debug => false, | |
^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:28:32: C: Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash. | |
:debug => false, | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:31:5: C: Metrics/AbcSize: Assignment Branch Condition size for parse_options is too high. [54.2/15] | |
def parse_options(argv) ... | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:31:5: C: Metrics/MethodLength: Method has too many lines. [37/10] | |
def parse_options(argv) ... | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:32:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body beginning. | |
~/macinbox/lib/macinbox/cli/options.rb:35:24: C: Metrics/BlockLength: Block has too many lines. [32/25] | |
@option_parser = OptionParser.new do |o| ... | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:36:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/cli/options.rb:38:14: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
o.on( '--box-format FORMAT', 'Format of the box (default: vmware_desktop)') { |v| @options[:box_format] = v } | |
^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:38:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--box-format FORMAT', 'Format of the box (default: vmware_desktop)') { |v| @options[:box_format] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:38:42: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
o.on( '--box-format FORMAT', 'Format of the box (default: vmware_desktop)') { |v| @options[:box_format] = v } | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:38:81: C: Metrics/LineLength: Line is too long. [124/80] | |
o.on( '--box-format FORMAT', 'Format of the box (default: vmware_desktop)') { |v| @options[:box_format] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:38:90: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
o.on( '--box-format FORMAT', 'Format of the box (default: vmware_desktop)') { |v| @options[:box_format] = v } | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:40:81: C: Metrics/LineLength: Line is too long. [121/80] | |
o.on('-n', '--name NAME', 'Name of the box (default: macinbox)') { |v| @options[:box_name] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:41:81: C: Metrics/LineLength: Line is too long. [122/80] | |
o.on('-d', '--disk SIZE', 'Size (GB) of the disk (default: 64)') { |v| @options[:disk_size] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:42:81: C: Metrics/LineLength: Line is too long. [119/80] | |
o.on('-t', '--fstype TYPE', 'Type of FS on the disk (default: APFS)') { |v| @options[:fstype] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:43:81: C: Metrics/LineLength: Line is too long. [124/80] | |
o.on('-m', '--memory SIZE', 'Size (MB) of the memory (default: 2048)') { |v| @options[:memory_size] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:44:81: C: Metrics/LineLength: Line is too long. [122/80] | |
o.on('-c', '--cpu COUNT', 'Number of virtual cores (default: 2)') { |v| @options[:cpu_count] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:45:81: C: Metrics/LineLength: Line is too long. [123/80] | |
o.on('-s', '--short NAME', 'Short name of the user (default: vagrant)') { |v| @options[:short_name] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:46:81: C: Metrics/LineLength: Line is too long. [122/80] | |
o.on('-f', '--full NAME', 'Full name of the user (default: Vagrant)') { |v| @options[:full_name] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:47:81: C: Metrics/LineLength: Line is too long. [121/80] | |
o.on('-p', '--password PASSWORD', 'Password of the user (default: vagrant)') { |v| @options[:password] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:49:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--installer PATH', 'Path to the macOS installer app') { |v| @options[:installer_path] = File.absolute_path(v) } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:49:81: C: Metrics/LineLength: Line is too long. [147/80] | |
o.on( '--installer PATH', 'Path to the macOS installer app') { |v| @options[:installer_path] = File.absolute_path(v) } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:50:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--installer-dmg PATH', 'Path to a macOS installer app disk image') { |v| @options[:installer_dmg] = File.absolute_path(v) } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:50:81: C: Metrics/LineLength: Line is too long. [146/80] | |
o.on( '--installer-dmg PATH', 'Path to a macOS installer app disk image') { |v| @options[:installer_dmg] = File.absolute_path(v) } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:51:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--vmware PATH', 'Path to the VMware Fusion app') { |v| @options[:vmware_path] = File.absolute_path(v) } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:51:81: C: Metrics/LineLength: Line is too long. [144/80] | |
o.on( '--vmware PATH', 'Path to the VMware Fusion app') { |v| @options[:vmware_path] = File.absolute_path(v) } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:52:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--parallels PATH', 'Path to the Parallels Desktop app') { |v| @options[:parallels_path] = File.absolute_path(v) } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:52:81: C: Metrics/LineLength: Line is too long. [147/80] | |
o.on( '--parallels PATH', 'Path to the Parallels Desktop app') { |v| @options[:parallels_path] = File.absolute_path(v) } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:53:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--user-script PATH', 'Path to user script') { |v| @options[:user_script] = File.absolute_path(v) } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:53:81: C: Metrics/LineLength: Line is too long. [144/80] | |
o.on( '--user-script PATH', 'Path to user script') { |v| @options[:user_script] = File.absolute_path(v) } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:55:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--no-auto-login', 'Disable auto login') { |v| @options[:auto_login] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:55:81: C: Metrics/LineLength: Line is too long. [123/80] | |
o.on( '--no-auto-login', 'Disable auto login') { |v| @options[:auto_login] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:56:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--no-skip-mini-buddy', 'Show the mini buddy on first login') { |v| @options[:skip_mini_buddy] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:56:81: C: Metrics/LineLength: Line is too long. [128/80] | |
o.on( '--no-skip-mini-buddy', 'Show the mini buddy on first login') { |v| @options[:skip_mini_buddy] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:57:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--no-hidpi', 'Disable HiDPI resolutions') { |v| @options[:hidpi] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:57:81: C: Metrics/LineLength: Line is too long. [118/80] | |
o.on( '--no-hidpi', 'Disable HiDPI resolutions') { |v| @options[:hidpi] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:58:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--no-fullscreen', 'Display the virtual machine GUI in a window') { |v| @options[:fullsceen] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:58:81: C: Metrics/LineLength: Line is too long. [122/80] | |
o.on( '--no-fullscreen', 'Display the virtual machine GUI in a window') { |v| @options[:fullsceen] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:59:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--no-gui', 'Disable the GUI') { |v| @options[:gui] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:59:81: C: Metrics/LineLength: Line is too long. [116/80] | |
o.on( '--no-gui', 'Disable the GUI') { |v| @options[:gui] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:61:14: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
o.on( '--use-qemu', 'Use qemu-img (vmware_desktop only)') { |v| @options[:use_qemu] = v } | |
^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:61:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--use-qemu', 'Use qemu-img (vmware_desktop only)') { |v| @options[:use_qemu] = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:61:33: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
o.on( '--use-qemu', 'Use qemu-img (vmware_desktop only)') { |v| @options[:use_qemu] = v } | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:61:81: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
o.on( '--use-qemu', 'Use qemu-img (vmware_desktop only)') { |v| @options[:use_qemu] = v } | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:61:81: C: Metrics/LineLength: Line is too long. [121/80] | |
o.on( '--use-qemu', 'Use qemu-img (vmware_desktop only)') { |v| @options[:use_qemu] = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:63:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--verbose', 'Enable verbose mode') { |v| $verbose = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:63:81: C: Metrics/LineLength: Line is too long. [110/80] | |
o.on( '--verbose', 'Enable verbose mode') { |v| $verbose = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:63:97: C: Style/GlobalVars: Do not introduce global variables. | |
o.on( '--verbose', 'Enable verbose mode') { |v| $verbose = v } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:64:14: C: Layout/SpaceInsideParens: Space inside parentheses detected. | |
o.on( '--debug', 'Enable debug mode') { |v| $debug = $verbose = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:64:81: C: Metrics/LineLength: Line is too long. [119/80] | |
o.on( '--debug', 'Enable debug mode') { |v| $debug = $verbose = v } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:64:97: C: Style/GlobalVars: Do not introduce global variables. | |
o.on( '--debug', 'Enable debug mode') { |v| $debug = $verbose = v } | |
^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:64:106: C: Style/GlobalVars: Do not introduce global variables. | |
o.on( '--debug', 'Enable debug mode') { |v| $debug = $verbose = v } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:66:81: C: Metrics/LineLength: Line is too long. [136/80] | |
o.on('-v', '--version') { puts "macinbox #{Macinbox::VERSION}"; exit } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:66:129: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
o.on('-v', '--version') { puts "macinbox #{Macinbox::VERSION}"; exit } | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:67:81: C: Metrics/LineLength: Line is too long. [106/80] | |
o.on('-h', '--help') { puts o; exit } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/cli/options.rb:67:99: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
o.on('-h', '--help') { puts o; exit } | |
^ | |
~/macinbox/lib/macinbox/cli/options.rb:70:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/lib/macinbox/cli/options.rb:75:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end. | |
~/macinbox/lib/macinbox/collector.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/collector.rb:5:3: C: Style/Documentation: Missing top-level class documentation comment. | |
class Collector | |
^^^^^ | |
~/macinbox/lib/macinbox/collector.rb:11:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def add_temp_dir(temp_dir) | |
^^^ | |
~/macinbox/lib/macinbox/collector.rb:14:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def remove_temp_dirs | |
^^^ | |
~/macinbox/lib/macinbox/collector.rb:16:48: C: Style/SymbolProc: Pass &:shellescape as an argument to map instead of a block. | |
temp_dir_args = @temp_dirs.reverse.map { |o| o.shellescape }.join(" \\\n") | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/collector.rb:16:81: C: Metrics/LineLength: Line is too long. [82/80] | |
temp_dir_args = @temp_dirs.reverse.map { |o| o.shellescape }.join(" \\\n") | |
^^ | |
~/macinbox/lib/macinbox/collector.rb:17:22: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.error "WARNING: Temporary files were not removed. Run this command to remove them:" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/collector.rb:17:81: C: Metrics/LineLength: Line is too long. [98/80] | |
Logger.error "WARNING: Temporary files were not removed. Run this command to remove them:" | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/collector.rb:20:20: C: Performance/ReverseEach: Use reverse_each instead of reverse.each. | |
@temp_dirs.reverse.each do |temp_dir| | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/collector.rb:25:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def on_cleanup(&block) | |
^^^ | |
~/macinbox/lib/macinbox/collector.rb:28:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def cleanup! | |
^^^ | |
~/macinbox/lib/macinbox/collector.rb:29:15: C: Performance/ReverseEach: Use reverse_each instead of reverse.each. | |
@blocks.reverse.each do |block| | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/collector.rb:29:28: C: Style/SymbolProc: Pass &:call as an argument to each instead of a block. | |
@blocks.reverse.each do |block| ... | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require "macinbox/actions/check_macos_versions" | |
^ | |
~/macinbox/lib/macinbox/actions.rb:1:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/check_macos_versions" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:2:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_box_from_hdd" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:3:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_box_from_vdi" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:4:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_box_from_vmdk" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:5:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_hdd_from_image" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:6:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_image_from_installer" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:7:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_vdi_from_image" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:8:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/create_vmdk_from_image" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions.rb:9:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions/install_box" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'macinbox/tty' | |
^ | |
~/macinbox/lib/macinbox/logger.rb:4:3: C: Style/Documentation: Missing top-level class documentation comment. | |
class Logger | |
^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:5:16: C: Style/MutableConstant: Freeze mutable objects assigned to constants. | |
PREFIXES = ["• ", " + ", " - "] | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:5:17: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
PREFIXES = ["• ", " + ", " - "] | |
^^^^ | |
~/macinbox/lib/macinbox/logger.rb:5:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
PREFIXES = ["• ", " + ", " - "] | |
^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:5:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
PREFIXES = ["• ", " + ", " - "] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:6:5: C: Style/ClassVars: Replace class var @@depth with a class instance var. | |
@@depth = 0 | |
^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:10:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def self.reset_depth | |
^^^ | |
~/macinbox/lib/macinbox/logger.rb:11:7: C: Style/ClassVars: Replace class var @@depth with a class instance var. | |
@@depth = 0 | |
^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:13:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def self.info(msg) | |
^^^ | |
~/macinbox/lib/macinbox/logger.rb:15:7: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if block_given? | |
^^ | |
~/macinbox/lib/macinbox/logger.rb:16:9: C: Style/ClassVars: Replace class var @@depth with a class instance var. | |
@@depth += 1 | |
^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:18:9: C: Style/ClassVars: Replace class var @@depth with a class instance var. | |
@@depth -= 1 | |
^^^^^^^ | |
~/macinbox/lib/macinbox/logger.rb:21:5: C: Layout/EmptyLineBetweenDefs: Use empty lines between method definitions. | |
def self.error(msg) | |
^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:9:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:11:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:12:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateBoxFromVDI | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:13:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:14:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [26.57/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:14:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [8/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:14:7: C: Metrics/PerceivedComplexity: Perceived complexity for initialize is too high. [8/7] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:15:53: C: Style/AndOr: Use || instead of or. | |
@input_vdi = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:15:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_vdi = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:15:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_vdi = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:15:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@input_vdi = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:16:53: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:16:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:16:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:16:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:18:53: C: Style/AndOr: Use || instead of or. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:18:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:18:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:18:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:19:53: C: Style/AndOr: Use || instead of or. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:19:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:19:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:19:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:20:53: C: Style/AndOr: Use || instead of or. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:20:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:20:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:20:81: C: Metrics/LineLength: Line is too long. [108/80] | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:26:46: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:26:53: C: Layout/SpaceAroundOperators: Operator or should be surrounded by a single space. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:26:53: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:26:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:26:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:26:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:28:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("VDI not found") unless File.exist? @input_vdi | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:28:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("VDI not found") unless File.exist? @input_vdi | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:31:7: C: Metrics/AbcSize: Assignment Branch Condition size for run is too high. [31.21/15] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:31:7: C: Metrics/MethodLength: Method has too many lines. [35/10] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:32:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vdi ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:32:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vdi ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:32:80: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vdi ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:32:81: C: Metrics/LineLength: Line is too long. [81/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vdi ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:35:9: C: Metrics/BlockLength: Block has too many lines. [27/25] | |
Logger.info "Assembling the box contents..." do ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:35:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Assembling the box contents..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:36:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:43:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:53:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:55:23: C: Style/GlobalVars: Do not introduce global variables. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:55:41: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:57:20: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ VBoxManage createvm --register --name macinbox --ostype MacOS1013_64 ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:57:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage createvm --register --name macinbox --ostype MacOS1013_64 ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:57:81: C: Metrics/LineLength: Line is too long. [107/80] | |
Task.run %W[ VBoxManage createvm --register --name macinbox --ostype MacOS1013_64 ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:57:92: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage createvm --register --name macinbox --ostype MacOS1013_64 ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:60:22: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ VBoxManage unregistervm macinbox --delete ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:60:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage unregistervm macinbox --delete ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:60:67: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage unregistervm macinbox --delete ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:60:81: C: Metrics/LineLength: Line is too long. [82/80] | |
Task.run %W[ VBoxManage unregistervm macinbox --delete ] + [task_opts] | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:63:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage modifyvm macinbox --usbxhci on --memory #{@memory_size} --vram 128 --cpus #{@cpu_count} --firmware efi --chipset ich9 --mouse usbtablet --keyboard usb ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:63:81: C: Metrics/LineLength: Line is too long. [200/80] | |
Task.run %W[ VBoxManage modifyvm macinbox --usbxhci on --memory #{@memory_size} --vram 128 --cpus #{@cpu_count} --firmware efi --chipset ich9 --mouse usbtablet --keyboard usb ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:63:185: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage modifyvm macinbox --usbxhci on --memory #{@memory_size} --vram 128 --cpus #{@cpu_count} --firmware efi --chipset ich9 --mouse usbtablet --keyboard usb ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:64:20: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ VBoxManage setextradata macinbox CustomVideoMode1 1280x800x32 ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:64:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage setextradata macinbox CustomVideoMode1 1280x800x32 ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:64:81: C: Metrics/LineLength: Line is too long. [100/80] | |
Task.run %W[ VBoxManage setextradata macinbox CustomVideoMode1 1280x800x32 ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:64:85: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage setextradata macinbox CustomVideoMode1 1280x800x32 ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:65:20: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ VBoxManage setextradata macinbox VBoxInternal2/EfiGraphicsResolution 1280x800 ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:65:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage setextradata macinbox VBoxInternal2/EfiGraphicsResolution 1280x800 ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:65:81: C: Metrics/LineLength: Line is too long. [116/80] | |
Task.run %W[ VBoxManage setextradata macinbox VBoxInternal2/EfiGraphicsResolution 1280x800 ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:65:101: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage setextradata macinbox VBoxInternal2/EfiGraphicsResolution 1280x800 ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:66:20: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ VBoxManage setextradata macinbox GUI/ScaleFactor 2.0 ] + [task_opts] if @hidpi | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:66:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage setextradata macinbox GUI/ScaleFactor 2.0 ] + [task_opts] if @hidpi | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:66:76: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage setextradata macinbox GUI/ScaleFactor 2.0 ] + [task_opts] if @hidpi | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:66:81: C: Metrics/LineLength: Line is too long. [101/80] | |
Task.run %W[ VBoxManage setextradata macinbox GUI/ScaleFactor 2.0 ] + [task_opts] if @hidpi | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:67:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage storagectl macinbox --name #{"SATA Controller"} --add sata --controller IntelAHCI --hostiocache on ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:67:64: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
Task.run %W[ VBoxManage storagectl macinbox --name #{"SATA Controller"} --add sata --controller IntelAHCI --hostiocache on ] + [task_opts] | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:67:64: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Task.run %W[ VBoxManage storagectl macinbox --name #{"SATA Controller"} --add sata --controller IntelAHCI --hostiocache on ] + [task_opts] | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:67:81: C: Metrics/LineLength: Line is too long. [148/80] | |
Task.run %W[ VBoxManage storagectl macinbox --name #{"SATA Controller"} --add sata --controller IntelAHCI --hostiocache on ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:67:133: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage storagectl macinbox --name #{"SATA Controller"} --add sata --controller IntelAHCI --hostiocache on ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:68:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage storageattach macinbox --storagectl #{"SATA Controller"} --port 0 --device 0 --type hdd --nonrotational on --medium #{@input_vdi} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:68:73: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
Task.run %W[ VBoxManage storageattach macinbox --storagectl #{"SATA Controller"} --port 0 --device 0 --type hdd --nonrotational on --medium #{@input_vdi} ] + [task_opts] | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:68:73: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Task.run %W[ VBoxManage storageattach macinbox --storagectl #{"SATA Controller"} --port 0 --device 0 --type hdd --nonrotational on --medium #{@input_vdi} ] + [task_opts] | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:68:81: C: Metrics/LineLength: Line is too long. [179/80] | |
Task.run %W[ VBoxManage storageattach macinbox --storagectl #{"SATA Controller"} --port 0 --device 0 --type hdd --nonrotational on --medium #{@input_vdi} ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:68:164: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage storageattach macinbox --storagectl #{"SATA Controller"} --port 0 --device 0 --type hdd --nonrotational on --medium #{@input_vdi} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:69:20: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ VBoxManage modifyvm macinbox --boot1 disk ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:69:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage modifyvm macinbox --boot1 disk ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:69:65: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage modifyvm macinbox --boot1 disk ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:70:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage export macinbox -o #{@box_dir}/box.ovf ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:70:73: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage export macinbox -o #{@box_dir}/box.ovf ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:70:81: C: Metrics/LineLength: Line is too long. [88/80] | |
Task.run %W[ VBoxManage export macinbox -o #{@box_dir}/box.ovf ] + [task_opts] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:71:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:74:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Moving the box to the destination..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:75:33: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown_R ENV["SUDO_USER"], nil, @box_dir | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:78:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:80:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:82:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vdi.rb:84:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:11:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:13:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:14:5: C: Metrics/ClassLength: Class has too many lines. [130/100] | |
class CreateHDDFromImage ... | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:14:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateHDDFromImage | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:15:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:16:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [19.39/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:16:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [7/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:17:52: C: Style/AndOr: Use || instead of or. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:17:55: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:17:79: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:17:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:18:52: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:18:55: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:18:79: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:18:81: C: Metrics/LineLength: Line is too long. [104/80] | |
@output_path = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:19:52: C: Style/AndOr: Use || instead of or. | |
@parallels_app = opts[:parallels_path] or raise ArgumentError.new(":parallels_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:19:55: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@parallels_app = opts[:parallels_path] or raise ArgumentError.new(":parallels_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:19:79: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@parallels_app = opts[:parallels_path] or raise ArgumentError.new(":parallels_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:19:81: C: Metrics/LineLength: Line is too long. [110/80] | |
@parallels_app = opts[:parallels_path] or raise ArgumentError.new(":parallels_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:21:52: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:21:55: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:21:79: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:21:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:23:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:23:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:23:81: C: Metrics/LineLength: Line is too long. [96/80] | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:24:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Parallels Desktop not found") unless File.exist? @parallels_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:24:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("Parallels Desktop not found") unless File.exist? @parallels_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:24:81: C: Metrics/LineLength: Line is too long. [98/80] | |
raise Macinbox::Error.new("Parallels Desktop not found") unless File.exist? @parallels_app | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:38:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_hdd_from_image ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:38:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_hdd_from_image ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:38:81: C: Metrics/LineLength: Line is too long. [83/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_hdd_from_image ] | |
^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:38:82: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_hdd_from_image ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:43:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Copying the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:45:19: C: Style/ColonMethodCall: Do not use :: for method calls. | |
Macinbox::copyfiles(from: @input_image, to: @image) | |
^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:50:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Attaching the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:60:7: C: Metrics/AbcSize: Assignment Branch Condition size for install_parallels_tools is too high. [51.15/15] | |
def install_parallels_tools ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:60:7: C: Metrics/MethodLength: Method has too many lines. [90/10] | |
def install_parallels_tools ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:61:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body beginning. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:62:9: C: Metrics/BlockLength: Block has too many lines. [37/25] | |
Logger.info "Installing the Parallels Tools..." do ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:62:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Installing the Parallels Tools..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:63:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:64:81: C: Metrics/LineLength: Line is too long. [86/80] | |
tools_image = "#{@parallels_app}/Contents/Resources/Tools/prl-tools-mac.iso" | |
^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:76:81: C: Metrics/LineLength: Line is too long. [114/80] | |
tools_packages_dir = "#{tools_mountpoint}/Install.app/Contents/Resources/Install.mpkg/Contents/Packages" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:79:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools Audio 10.9.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:80:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools Coherence.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:81:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools CopyPaste.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:82:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools DragDrop.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:83:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools HostTime.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:84:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools InstallationAgent.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:85:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools Network 10.9.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:86:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools SharedFolders.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:87:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools TimeSync.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:88:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools ToolGate 10.9.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:89:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools Utilities.pkg", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:90:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Parallels Tools Video 10.9.pkg" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:97:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/pkgutil --expand #{tools_packages_dir}/#{package} #{tools_expanded_packages_dir}/#{package} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:97:81: C: Metrics/LineLength: Line is too long. [128/80] | |
Task.run %W[ /usr/sbin/pkgutil --expand #{tools_packages_dir}/#{package} #{tools_expanded_packages_dir}/#{package} ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:97:127: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/pkgutil --expand #{tools_packages_dir}/#{package} #{tools_expanded_packages_dir}/#{package} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:98:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/ditto -x -z #{tools_expanded_packages_dir}/#{package}/Payload #{@image_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:98:81: C: Metrics/LineLength: Line is too long. [118/80] | |
Task.run %W[ /usr/bin/ditto -x -z #{tools_expanded_packages_dir}/#{package}/Payload #{@image_mountpoint} ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:98:117: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/ditto -x -z #{tools_expanded_packages_dir}/#{package}/Payload #{@image_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:101:32: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
prl_nettool_source = "/Library/Parallels Guest Tools/prl_nettool" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:107:81: C: Metrics/LineLength: Line is too long. [101/80] | |
prl_fsd_plist = "#{@image_mountpoint}/Library/LaunchDaemons/com.parallels.vm.prl_fsd.plist" | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:108:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/sed -i #{''} s/PARALLELS_ADDITIONAL_ARGS/--share/ #{prl_fsd_plist} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:108:42: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
Task.run %W[ /usr/bin/sed -i #{''} s/PARALLELS_ADDITIONAL_ARGS/--share/ #{prl_fsd_plist} ] | |
^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:108:81: C: Metrics/LineLength: Line is too long. [100/80] | |
Task.run %W[ /usr/bin/sed -i #{''} s/PARALLELS_ADDITIONAL_ARGS/--share/ #{prl_fsd_plist} ] | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:108:99: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/sed -i #{''} s/PARALLELS_ADDITIONAL_ARGS/--share/ #{prl_fsd_plist} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:111:81: C: Metrics/LineLength: Line is too long. [87/80] | |
File.write "#{@image_mountpoint}/private/etc/rc.vagrant", contents, mode: 'a' | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:116:9: W: Lint/NestedMethodDefinition: Method definitions must not be nested. Use lambda instead. | |
def eject_and_reattach_image ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:117:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Reattaching the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:123:9: W: Lint/NestedMethodDefinition: Method definitions must not be nested. Use lambda instead. | |
def convert_image ... | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:123:9: C: Metrics/AbcSize: Assignment Branch Condition size for convert_image is too high. [25.38/15] | |
def convert_image ... | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:123:9: C: Metrics/MethodLength: Method has too many lines. [37/10] | |
def convert_image ... | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:124:11: C: Metrics/BlockLength: Block has too many lines. [35/25] | |
Logger.info "Converting the image to HDD format..." do ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:124:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Converting the image to HDD format..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:125:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:126:42: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
disk_info = Task.backtick %W[ /usr/sbin/fdisk #{@disk.device} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:126:74: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
disk_info = Task.backtick %W[ /usr/sbin/fdisk #{@disk.device} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:128:27: C: Style/RegexpLiteral: Use %r around regular expression. | |
geometry_re = /geometry: (\d+)\/(\d+)\/(\d+) \[(\d+) sectors\]/ | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:132:13: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("failed to determine disk geometry") if match.nil? || match.captures.length != 4 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:132:39: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("failed to determine disk geometry") if match.nil? || match.captures.length != 4 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:132:81: C: Metrics/LineLength: Line is too long. [118/80] | |
raise Macinbox::Error.new("failed to determine disk geometry") if match.nil? || match.captures.length != 4 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:170:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:173:25: C: Style/GlobalVars: Do not introduce global variables. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:173:43: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:174:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{prl_convert} #{@temp_dir}/macinbox.vmdk --allow-no-os --dst=#{@temp_dir} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:174:81: C: Metrics/LineLength: Line is too long. [115/80] | |
Task.run %W[ #{prl_convert} #{@temp_dir}/macinbox.vmdk --allow-no-os --dst=#{@temp_dir} ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:174:100: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{prl_convert} #{@temp_dir}/macinbox.vmdk --allow-no-os --dst=#{@temp_dir} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:179:9: W: Lint/NestedMethodDefinition: Method definitions must not be nested. Use lambda instead. | |
def save_image ... | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:180:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Moving the HDD to the destination..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:181:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown_R ENV["SUDO_USER"], nil, "#{@temp_dir}/macinbox.hdd" | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:185:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:187:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:189:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_hdd_from_image.rb:191:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/install_box.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:9:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/install_box.rb:11:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/install_box.rb:12:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class InstallBox | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:13:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/install_box.rb:14:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [20.54/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:14:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [7/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:15:42: C: Style/AndOr: Use || instead of or. | |
@input_box = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:15:45: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_box = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:15:69: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_box = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:15:81: C: Metrics/LineLength: Line is too long. [94/80] | |
@input_box = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:16:42: C: Style/AndOr: Use || instead of or. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:16:45: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:16:69: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:16:81: C: Metrics/LineLength: Line is too long. [94/80] | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:17:42: C: Style/AndOr: Use || instead of or. | |
@box_format = opts[:box_format] or raise ArgumentError.new(":box_format not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:17:45: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@box_format = opts[:box_format] or raise ArgumentError.new(":box_format not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:17:69: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@box_format = opts[:box_format] or raise ArgumentError.new(":box_format not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:17:81: C: Metrics/LineLength: Line is too long. [96/80] | |
@box_format = opts[:box_format] or raise ArgumentError.new(":box_format not specified") | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:18:42: C: Style/AndOr: Use || instead of or. | |
@boxes_dir = opts[:boxes_dir] or raise ArgumentError.new(":boxes_dir not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:18:45: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@boxes_dir = opts[:boxes_dir] or raise ArgumentError.new(":boxes_dir not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:18:69: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@boxes_dir = opts[:boxes_dir] or raise ArgumentError.new(":boxes_dir not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:18:81: C: Metrics/LineLength: Line is too long. [95/80] | |
@boxes_dir = opts[:boxes_dir] or raise ArgumentError.new(":boxes_dir not specified") | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:22:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("box not found: #{@input_box}") unless File.exist? @input_box | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:22:81: C: Metrics/LineLength: Line is too long. [95/80] | |
raise Macinbox::Error.new("box not found: #{@input_box}") unless File.exist? @input_box | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:23:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("boxes directory not found: #{@boxes_dir}") unless File.exist? @boxes_dir | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:23:81: C: Metrics/LineLength: Line is too long. [107/80] | |
raise Macinbox::Error.new("boxes directory not found: #{@boxes_dir}") unless File.exist? @boxes_dir | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:30:7: C: Metrics/AbcSize: Assignment Branch Condition size for run is too high. [24.35/15] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:33:28: C: Style/RescueModifier: Avoid using rescue in its modifier form. | |
@box_version = Dir["#{@boxes_dir}/#{@box_name}/*/*"].map { |o| o.split('/')[-2].to_i }.sort.last.next rescue 0 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:33:81: C: Metrics/LineLength: Line is too long. [122/80] | |
@box_version = Dir["#{@boxes_dir}/#{@box_name}/*/*"].map { |o| o.split('/')[-2].to_i }.sort.last.next rescue 0 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:33:100: C: Performance/UnneededSort: Use max instead of sort...last. | |
@box_version = Dir["#{@boxes_dir}/#{@box_name}/*/*"].map { |o| o.split('/')[-2].to_i }.sort.last.next rescue 0 | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:35:11: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. | |
raise Macinbox::Error.new("box already exists") if File.exist? target_box_dir | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:35:11: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("box already exists") if File.exist? target_box_dir | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:35:37: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("box already exists") if File.exist? target_box_dir | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:35:81: C: Metrics/LineLength: Line is too long. [87/80] | |
raise Macinbox::Error.new("box already exists") if File.exist? target_box_dir | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:36:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/mkdir -p #{target_box_dir} ] | |
^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:36:55: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/mkdir -p #{target_box_dir} ] | |
^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:37:19: C: Style/ColonMethodCall: Do not use :: for method calls. | |
Macinbox::copyfiles(from: Dir["#{@input_box}/*"], to: target_box_dir, recursive: true) | |
^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:37:81: C: Metrics/LineLength: Line is too long. [96/80] | |
Macinbox::copyfiles(from: Dir["#{@input_box}/*"], to: target_box_dir, recursive: true) | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:38:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/chown -R #{ENV["SUDO_USER"]} #{@boxes_dir}/#{@box_name} ] | |
^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:38:49: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Task.run %W[ /usr/sbin/chown -R #{ENV["SUDO_USER"]} #{@boxes_dir}/#{@box_name} ] | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:38:81: C: Metrics/LineLength: Line is too long. [90/80] | |
Task.run %W[ /usr/sbin/chown -R #{ENV["SUDO_USER"]} #{@boxes_dir}/#{@box_name} ] | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:38:89: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/chown -R #{ENV["SUDO_USER"]} #{@boxes_dir}/#{@box_name} ] | |
^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:39:81: C: Metrics/LineLength: Line is too long. [85/80] | |
Logger.info "Installed box: #{@box_name} (#{@box_format}, #{@box_version})" | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/install_box.rb:42:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:11:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:13:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:14:5: C: Metrics/ClassLength: Class has too many lines. [130/100] | |
class CreateVMDKFromImage ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:14:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateVMDKFromImage | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:15:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:16:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [23.94/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:16:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [9/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:16:7: C: Metrics/PerceivedComplexity: Perceived complexity for initialize is too high. [9/7] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:17:49: C: Style/AndOr: Use || instead of or. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:17:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:17:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:17:81: C: Metrics/LineLength: Line is too long. [103/80] | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:18:49: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:18:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:18:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:18:81: C: Metrics/LineLength: Line is too long. [102/80] | |
@output_path = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:19:49: C: Style/AndOr: Use || instead of or. | |
@vmware_fusion_app = opts[:vmware_path] or raise ArgumentError.new(":vmware_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:19:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@vmware_fusion_app = opts[:vmware_path] or raise ArgumentError.new(":vmware_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:19:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@vmware_fusion_app = opts[:vmware_path] or raise ArgumentError.new(":vmware_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:19:81: C: Metrics/LineLength: Line is too long. [104/80] | |
@vmware_fusion_app = opts[:vmware_path] or raise ArgumentError.new(":vmware_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:22:49: C: Layout/SpaceAroundOperators: Operator or should be surrounded by a single space. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:22:49: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:22:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:22:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:22:81: C: Metrics/LineLength: Line is too long. [102/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:24:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:24:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:24:81: C: Metrics/LineLength: Line is too long. [92/80] | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:25:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("VMware Fusion not found") unless File.exist? @vmware_fusion_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:25:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("VMware Fusion not found") unless File.exist? @vmware_fusion_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:25:81: C: Metrics/LineLength: Line is too long. [98/80] | |
raise Macinbox::Error.new("VMware Fusion not found") unless File.exist? @vmware_fusion_app | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:27:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if @use_qemu | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:28:11: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("qemu-img not found") unless File.exist? "/usr/local/bin/qemu-img" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:28:37: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("qemu-img not found") unless File.exist? "/usr/local/bin/qemu-img" | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:28:78: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("qemu-img not found") unless File.exist? "/usr/local/bin/qemu-img" | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:28:81: C: Metrics/LineLength: Line is too long. [102/80] | |
raise Macinbox::Error.new("qemu-img not found") unless File.exist? "/usr/local/bin/qemu-img" | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:44:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vmdk_from_image ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:44:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vmdk_from_image ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:44:81: C: Metrics/LineLength: Line is too long. [84/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vmdk_from_image ] | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:44:83: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vmdk_from_image ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:49:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Copying the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:51:19: C: Style/ColonMethodCall: Do not use :: for method calls. | |
Macinbox::copyfiles(from: @input_image, to: @image) | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:56:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Attaching the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:66:7: C: Metrics/AbcSize: Assignment Branch Condition size for install_vmware_tools is too high. [25.26/15] | |
def install_vmware_tools ... | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:66:7: C: Metrics/MethodLength: Method has too many lines. [30/10] | |
def install_vmware_tools ... | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:67:81: C: Metrics/LineLength: Line is too long. [83/80] | |
tools_image = "#{@vmware_fusion_app}/Contents/Library/isoimages/darwin.iso" | |
^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:70:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Downloading the VMware Tools..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:71:47: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
bundle_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleVersion ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:71:64: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
bundle_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleVersion ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:71:64: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
bundle_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleVersion ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:71:81: C: Metrics/LineLength: Line is too long. [135/80] | |
bundle_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleVersion ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:71:134: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
bundle_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleVersion ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:72:53: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:72:70: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:72:70: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:72:81: C: Metrics/LineLength: Line is too long. [152/80] | |
bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:72:151: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:73:88: C: Metrics/LineLength: Line is too long. [176/80] | |
darwin_iso_url = "http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/#{bundle_short_version}/#{bundle_version}/packages/com.vmware.fusion.tools.darwin.zip.tar" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:27: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:62: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:68: C: Style/GlobalVars: Do not introduce global variables. | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:81: C: Metrics/LineLength: Line is too long. [95/80] | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:84: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:87: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:75:93: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/curl #{darwin_iso_url} -O ] + ($verbose ? [] : %W[ -s -S ]) | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:76:24: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /usr/bin/tar -xf com.vmware.fusion.tools.darwin.zip.tar com.vmware.fusion.tools.darwin.zip ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:76:27: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/tar -xf com.vmware.fusion.tools.darwin.zip.tar com.vmware.fusion.tools.darwin.zip ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:76:81: C: Metrics/LineLength: Line is too long. [119/80] | |
Task.run %W[ /usr/bin/tar -xf com.vmware.fusion.tools.darwin.zip.tar com.vmware.fusion.tools.darwin.zip ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:76:118: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/tar -xf com.vmware.fusion.tools.darwin.zip.tar com.vmware.fusion.tools.darwin.zip ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:24: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:27: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:42: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:48: C: Style/GlobalVars: Do not introduce global variables. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:64: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:67: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:71: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:77: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:80: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:81: C: Metrics/LineLength: Line is too long. [135/80] | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:77:134: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/unzip ] + ($verbose ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:83:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Installing the VMware Tools..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:90:81: C: Metrics/LineLength: Line is too long. [108/80] | |
tools_package = "#{tools_mountpoint}/Install VMware Tools.app/Contents/Resources/VMware Tools.pkg" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:92:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/pkgutil --expand #{tools_package} #{tools_package_dir} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:92:81: C: Metrics/LineLength: Line is too long. [89/80] | |
Task.run %W[ /usr/sbin/pkgutil --expand #{tools_package} #{tools_package_dir} ] | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:92:88: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/sbin/pkgutil --expand #{tools_package} #{tools_package_dir} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:93:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/ditto -x -z #{tools_package_dir}/files.pkg/Payload #{@image_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:93:81: C: Metrics/LineLength: Line is too long. [105/80] | |
Task.run %W[ /usr/bin/ditto -x -z #{tools_package_dir}/files.pkg/Payload #{@image_mountpoint} ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:93:104: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/ditto -x -z #{tools_package_dir}/files.pkg/Payload #{@image_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:94:81: C: Metrics/LineLength: Line is too long. [117/80] | |
image_vmhgfs_filesystem_resources = "#{@image_mountpoint}/Library/Filesystems/vmhgfs.fs/Contents/Resources" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:96:26: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.ln_s "/Library/Application Support/VMware Tools/mount_vmhgfs", "#{image_vmhgfs_filesystem_resources}/" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:96:81: C: Metrics/LineLength: Line is too long. [122/80] | |
FileUtils.ln_s "/Library/Application Support/VMware Tools/mount_vmhgfs", "#{image_vmhgfs_filesystem_resources}/" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:101:7: C: Metrics/MethodLength: Method has too many lines. [26/10] | |
def set_spc_kextpolicy ... | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:102:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Setting the KextPolicy to allow loading the VMware kernel extensions..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:102:81: C: Metrics/LineLength: Line is too long. [96/80] | |
Logger.info "Setting the KextPolicy to allow loading the VMware kernel extensions..." do | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:103:81: C: Metrics/LineLength: Line is too long. [107/80] | |
image_spc_kextpolicy = "#{@image_mountpoint}/private/var/db/SystemPolicyConfiguration/KextPolicy" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:105:36: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run_with_input %W[ /usr/bin/sqlite3 #{image_spc_kextpolicy} ] do |pipe| | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:105:77: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run_with_input %W[ /usr/bin/sqlite3 #{image_spc_kextpolicy} ] do |pipe| | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:105:81: C: Metrics/LineLength: Line is too long. [88/80] | |
Task.run_with_input %W[ /usr/bin/sqlite3 #{image_spc_kextpolicy} ] do |pipe| | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:114:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:117:34: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run_with_input %W[ /usr/bin/sqlite3 #{image_spc_kextpolicy} ] do |pipe| | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:117:75: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run_with_input %W[ /usr/bin/sqlite3 #{image_spc_kextpolicy} ] do |pipe| | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:117:81: C: Metrics/LineLength: Line is too long. [86/80] | |
Task.run_with_input %W[ /usr/bin/sqlite3 #{image_spc_kextpolicy} ] do |pipe| | |
^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:125:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:134:7: C: Metrics/MethodLength: Method has too many lines. [16/10] | |
def convert_image ... | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:135:71: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Logger.info "Converting the image to VMDK format#{@use_qemu ? " using QEMU" : ""}..." do | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:135:81: C: Metrics/LineLength: Line is too long. [96/80] | |
Logger.info "Converting the image to VMDK format#{@use_qemu ? " using QEMU" : ""}..." do | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:135:87: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Logger.info "Converting the image to VMDK format#{@use_qemu ? " using QEMU" : ""}..." do | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:138:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/local/bin/qemu-img convert -f dmg -O vmdk #{@temp_dir}/macinbox.dmg #{@temp_dir}/macinbox.vmdk ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:138:81: C: Metrics/LineLength: Line is too long. [126/80] | |
Task.run %W[ /usr/local/bin/qemu-img convert -f dmg -O vmdk #{@temp_dir}/macinbox.dmg #{@temp_dir}/macinbox.vmdk ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:138:125: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/local/bin/qemu-img convert -f dmg -O vmdk #{@temp_dir}/macinbox.dmg #{@temp_dir}/macinbox.vmdk ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:141:25: C: Style/GlobalVars: Do not introduce global variables. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:141:43: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:142:13: C: Naming/VariableName: Use snake_case for variable names. | |
rawdiskCreator = "#{@vmware_fusion_app}/Contents/Library/vmware-rawdiskCreator" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:142:81: C: Metrics/LineLength: Line is too long. [91/80] | |
rawdiskCreator = "#{@vmware_fusion_app}/Contents/Library/vmware-rawdiskCreator" | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:143:81: C: Metrics/LineLength: Line is too long. [87/80] | |
vdiskmanager = "#{@vmware_fusion_app}/Contents/Library/vmware-vdiskmanager" | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:145:27: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{rawdiskCreator} create #{@disk.device} fullDevice rawdisk lsilogic ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:145:81: C: Metrics/LineLength: Line is too long. [111/80] | |
Task.run %W[ #{rawdiskCreator} create #{@disk.device} fullDevice rawdisk lsilogic ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:145:96: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{rawdiskCreator} create #{@disk.device} fullDevice rawdisk lsilogic ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:146:27: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{vdiskmanager} -t 0 -r rawdisk.vmdk macinbox.vmdk ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:146:78: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{vdiskmanager} -t 0 -r rawdisk.vmdk macinbox.vmdk ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:146:81: C: Metrics/LineLength: Line is too long. [93/80] | |
Task.run %W[ #{vdiskmanager} -t 0 -r rawdisk.vmdk macinbox.vmdk ] + [task_opts] | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:154:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Moving the VMDK to the destination..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:155:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown ENV["SUDO_USER"], nil, "#{@temp_dir}/macinbox.vmdk" | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:159:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:161:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_vmdk_from_image.rb:163:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:11:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:13:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:14:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateVDIFromImage | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:15:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:17:49: C: Style/AndOr: Use || instead of or. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:17:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:17:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:17:81: C: Metrics/LineLength: Line is too long. [103/80] | |
@input_image = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:18:49: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:18:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:18:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:18:81: C: Metrics/LineLength: Line is too long. [101/80] | |
@output_path = opts[:vdi_path] or raise ArgumentError.new(":vdi_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:20:49: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:20:52: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:20:76: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:20:81: C: Metrics/LineLength: Line is too long. [102/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:22:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:22:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:22:59: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:22:81: C: Metrics/LineLength: Line is too long. [92/80] | |
raise Macinbox::Error.new("input image not found") unless File.exist? @input_image | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:35:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vdi_from_image ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:35:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vdi_from_image ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:35:81: C: Metrics/LineLength: Line is too long. [83/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vdi_from_image ] | |
^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:35:82: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_vdi_from_image ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:40:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Copying the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:42:19: C: Style/ColonMethodCall: Do not use :: for method calls. | |
Macinbox::copyfiles(from: @input_image, to: @image) | |
^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:47:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Attaching the image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:54:7: C: Metrics/MethodLength: Method has too many lines. [23/10] | |
def setup_efi_partition ... | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:55:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Setting up EFI partition..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:59:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/mkdir -p #{efi_mountpoint}/EFI/drivers ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:59:67: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/mkdir -p #{efi_mountpoint}/EFI/drivers ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:60:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/cp /usr/standalone/i386/apfs.efi #{efi_mountpoint}/EFI/drivers/ ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:60:81: C: Metrics/LineLength: Line is too long. [93/80] | |
Task.run %W[ /bin/cp /usr/standalone/i386/apfs.efi #{efi_mountpoint}/EFI/drivers/ ] | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:60:92: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/cp /usr/standalone/i386/apfs.efi #{efi_mountpoint}/EFI/drivers/ ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:75:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:81:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Converting the image to VDI format..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:82:23: C: Style/GlobalVars: Do not introduce global variables. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:82:41: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:83:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage convertfromraw #{@disk.device} #{@temp_dir}/macinbox.vdi --format VDI ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:83:81: C: Metrics/LineLength: Line is too long. [119/80] | |
Task.run %W[ VBoxManage convertfromraw #{@disk.device} #{@temp_dir}/macinbox.vdi --format VDI ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:83:104: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ VBoxManage convertfromraw #{@disk.device} #{@temp_dir}/macinbox.vdi --format VDI ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:88:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Moving the VDI to the destination..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:90:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown ENV["SUDO_USER"], nil, "#{@temp_dir}/macinbox.vdi" | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:94:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:96:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_vdi_from_image.rb:98:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:11:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:13:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:14:5: C: Metrics/ClassLength: Class has too many lines. [195/100] | |
class CreateImageFromInstaller ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:14:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateImageFromInstaller | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:15:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:16:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [47.05/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:16:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [14/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:16:7: C: Metrics/MethodLength: Method has too many lines. [18/10] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:16:7: C: Metrics/PerceivedComplexity: Perceived complexity for initialize is too high. [14/7] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:17:53: C: Style/AndOr: Use || instead of or. | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:17:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:17:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:17:81: C: Metrics/LineLength: Line is too long. [111/80] | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:18:53: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:18:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:18:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:18:81: C: Metrics/LineLength: Line is too long. [107/80] | |
@output_path = opts[:image_path] or raise ArgumentError.new(":image_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:23:53: C: Style/AndOr: Use || instead of or. | |
@disk_size = opts[:disk_size] or raise ArgumentError.new(":disk_size not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:23:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@disk_size = opts[:disk_size] or raise ArgumentError.new(":disk_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:23:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@disk_size = opts[:disk_size] or raise ArgumentError.new(":disk_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:23:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@disk_size = opts[:disk_size] or raise ArgumentError.new(":disk_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:24:53: C: Style/AndOr: Use || instead of or. | |
@fstype = opts[:fstype] or raise ArgumentError.new(":fstype not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:24:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@fstype = opts[:fstype] or raise ArgumentError.new(":fstype not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:24:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@fstype = opts[:fstype] or raise ArgumentError.new(":fstype not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:24:81: C: Metrics/LineLength: Line is too long. [103/80] | |
@fstype = opts[:fstype] or raise ArgumentError.new(":fstype not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:25:53: C: Style/AndOr: Use || instead of or. | |
@short_name = opts[:short_name] or raise ArgumentError.new(":short_name not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:25:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@short_name = opts[:short_name] or raise ArgumentError.new(":short_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:25:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@short_name = opts[:short_name] or raise ArgumentError.new(":short_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:25:81: C: Metrics/LineLength: Line is too long. [107/80] | |
@short_name = opts[:short_name] or raise ArgumentError.new(":short_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:26:53: C: Style/AndOr: Use || instead of or. | |
@full_name = opts[:full_name] or raise ArgumentError.new(":full_name not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:26:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@full_name = opts[:full_name] or raise ArgumentError.new(":full_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:26:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@full_name = opts[:full_name] or raise ArgumentError.new(":full_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:26:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@full_name = opts[:full_name] or raise ArgumentError.new(":full_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:27:53: C: Style/AndOr: Use || instead of or. | |
@password = opts[:password] or raise ArgumentError.new(":password not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:27:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@password = opts[:password] or raise ArgumentError.new(":password not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:27:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@password = opts[:password] or raise ArgumentError.new(":password not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:27:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@password = opts[:password] or raise ArgumentError.new(":password not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:34:46: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:34:53: C: Layout/SpaceAroundOperators: Operator or should be surrounded by a single space. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:34:53: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:34:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:34:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:34:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:36:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Installer app not found") unless File.exist? @installer_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:36:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("Installer app not found") unless File.exist? @installer_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:36:81: C: Metrics/LineLength: Line is too long. [94/80] | |
raise Macinbox::Error.new("Installer app not found") unless File.exist? @installer_app | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:38:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise ArgumentError.new(":vmware_path not specified") if @box_format == "vmware_desktop" && !opts[:vmware_path] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:38:33: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise ArgumentError.new(":vmware_path not specified") if @box_format == "vmware_desktop" && !opts[:vmware_path] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:38:81: C: Metrics/LineLength: Line is too long. [119/80] | |
raise ArgumentError.new(":vmware_path not specified") if @box_format == "vmware_desktop" && !opts[:vmware_path] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:38:81: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise ArgumentError.new(":vmware_path not specified") if @box_format == "vmware_desktop" && !opts[:vmware_path] | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:39:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise ArgumentError.new(":parallels_path not specified") if @box_format == "parallels" && !opts[:parallels_path] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:39:33: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise ArgumentError.new(":parallels_path not specified") if @box_format == "parallels" && !opts[:parallels_path] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:39:81: C: Metrics/LineLength: Line is too long. [120/80] | |
raise ArgumentError.new(":parallels_path not specified") if @box_format == "parallels" && !opts[:parallels_path] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:39:84: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise ArgumentError.new(":parallels_path not specified") if @box_format == "parallels" && !opts[:parallels_path] | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:42:7: C: Metrics/MethodLength: Method has too many lines. [14/10] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:44:9: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. | |
if installer_is_on_root_filesystem | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:60:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_image_from_installer ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:60:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_image_from_installer ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:60:81: C: Metrics/LineLength: Line is too long. [89/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_image_from_installer ] | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:60:88: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_image_from_installer ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:65:37: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
root_device = Task.backtick %W[ /usr/bin/stat -f %d / ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:65:40: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
root_device = Task.backtick %W[ /usr/bin/stat -f %d / ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:65:62: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
root_device = Task.backtick %W[ /usr/bin/stat -f %d / ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:66:45: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
installer_device = Task.backtick %W[ /usr/bin/stat -f %d #{@installer_app} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:66:81: C: Metrics/LineLength: Line is too long. [84/80] | |
installer_device = Task.backtick %W[ /usr/bin/stat -f %d #{@installer_app} ] | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:66:83: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
installer_device = Task.backtick %W[ /usr/bin/stat -f %d #{@installer_app} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:71:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating and attaching wrapper disk image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:78:81: C: Metrics/LineLength: Line is too long. [88/80] | |
@installer_app = "#{@wrapper_disk.mountpoint}/#{File.basename @installer_app}" | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:83:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Creating and attaching a new blank disk image..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:95:7: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
def install_macos ... | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:96:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Installing macOS..." do | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:97:38: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
activity = Logger.prefix + "installer" | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:98:81: C: Metrics/LineLength: Line is too long. [91/80] | |
install_info_plist = "#{@installer_app}/Contents/SharedSupport/InstallInfo.plist" | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:99:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/touch #{@scratch_mountpoint}/.macinbox ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:99:71: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/bin/touch #{@scratch_mountpoint}/.macinbox ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:100:20: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
cmd = %W[ /usr/sbin/installer -verboseR -dumplog -pkg #{install_info_plist} -target #{@scratch_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:100:81: C: Metrics/LineLength: Line is too long. [118/80] | |
cmd = %W[ /usr/sbin/installer -verboseR -dumplog -pkg #{install_info_plist} -target #{@scratch_mountpoint} ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:100:117: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
cmd = %W[ /usr/sbin/installer -verboseR -dumplog -pkg #{install_info_plist} -target #{@scratch_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:101:18: C: Style/GlobalVars: Do not introduce global variables. | |
opts = $verbose ? {} : { :err => [:child, :out] } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:101:36: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
opts = $verbose ? {} : { :err => [:child, :out] } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:101:44: C: Style/SymbolArray: Use %i or %I for an array of symbols. | |
opts = $verbose ? {} : { :err => [:child, :out] } | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:103:13: C: Style/RescueModifier: Avoid using rescue in its modifier form. | |
/^installer:%(.*)$/.match(line)[1].to_f rescue nil | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:105:11: C: Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method. | |
@wrapper_disk.detach! if @wrapper_disk | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:109:7: C: Metrics/MethodLength: Method has too many lines. [12/10] | |
def create_rc_vagrant ... | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:110:81: C: Metrics/LineLength: Line is too long. [96/80] | |
scratch_rc_installer_cleanup = "#{@scratch_mountpoint}/private/etc/rc.installer_cleanup" | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:117:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:118:25: C: Style/NumericLiteralPrefix: Use 0o for octal literals. | |
FileUtils.chmod 0755, scratch_rc_installer_cleanup | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:122:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:123:25: C: Style/NumericLiteralPrefix: Use 0o for octal literals. | |
FileUtils.chmod 0755, @scratch_rc_vagrant | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:126:7: C: Metrics/MethodLength: Method has too many lines. [28/10] | |
def automate_user_account_creation ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:127:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Configuring the primary user account..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:128:81: C: Metrics/LineLength: Line is too long. [112/80] | |
scratch_installer_configuration_file = "#{@scratch_mountpoint}/private/var/db/.InstallerConfiguration" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:153:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:157:7: C: Metrics/MethodLength: Method has too many lines. [21/10] | |
def automate_vagrant_ssh_key_installation ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:158:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if @short_name == "vagrant" | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:158:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
if @short_name == "vagrant" | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:159:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Installing the default insecure vagrant ssh key..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:175:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:182:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Enabling password-less sudo..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:183:81: C: Metrics/LineLength: Line is too long. [106/80] | |
scratch_sudoers_d_user_rule_file = "#{@scratch_mountpoint}/private/etc/sudoers.d/#{@short_name}" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:186:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:187:27: C: Style/NumericLiteralPrefix: Use 0o for octal literals. | |
FileUtils.chmod 0440, scratch_sudoers_d_user_rule_file | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:192:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Enabling sshd..." do | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:193:81: C: Metrics/LineLength: Line is too long. [119/80] | |
scratch_launchd_disabled_plist = "#{@scratch_mountpoint}/private/var/db/com.apple.xpc.launchd/disabled.plist" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:194:18: C: Style/GlobalVars: Do not introduce global variables. | |
opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:194:36: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:195:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/libexec/PlistBuddy -c #{'Add :com.openssh.sshd bool False'} #{scratch_launchd_disabled_plist} ] + [opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:195:53: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
Task.run %W[ /usr/libexec/PlistBuddy -c #{'Add :com.openssh.sshd bool False'} #{scratch_launchd_disabled_plist} ] + [opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:195:81: C: Metrics/LineLength: Line is too long. [132/80] | |
Task.run %W[ /usr/libexec/PlistBuddy -c #{'Add :com.openssh.sshd bool False'} #{scratch_launchd_disabled_plist} ] + [opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:195:122: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /usr/libexec/PlistBuddy -c #{'Add :com.openssh.sshd bool False'} #{scratch_launchd_disabled_plist} ] + [opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:199:7: C: Metrics/MethodLength: Method has too many lines. [15/10] | |
def enable_hidpi ... | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:200:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if @hidpi | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:201:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Enabling HiDPI resolutions..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:202:81: C: Metrics/LineLength: Line is too long. [120/80] | |
scratch_windowserver_preferences = "#{@scratch_mountpoint}/Library/Preferences/com.apple.windowserver.plist" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:212:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:218:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if @user_script | |
^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:219:23: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Running user script..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:220:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{@user_script} #{@scratch_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:220:64: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ #{@user_script} #{@scratch_mountpoint} ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:226:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Saving the image..." do | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:228:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown ENV["SUDO_USER"], nil, @scratch_image | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:232:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:234:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_image_from_installer.rb:236:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:10:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:12:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:13:5: C: Metrics/ClassLength: Class has too many lines. [110/100] | |
class CreateBoxFromVMDK ... | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:13:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateBoxFromVMDK | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:14:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:15:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [30.79/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:15:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [9/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:15:7: C: Metrics/MethodLength: Method has too many lines. [12/10] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:15:7: C: Metrics/PerceivedComplexity: Perceived complexity for initialize is too high. [9/7] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:16:53: C: Style/AndOr: Use || instead of or. | |
@input_vmdk = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:16:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_vmdk = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:16:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_vmdk = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:16:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@input_vmdk = opts[:vmdk_path] or raise ArgumentError.new(":vmdk_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:17:53: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:17:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:17:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:17:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:19:53: C: Style/AndOr: Use || instead of or. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:19:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:19:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:19:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:20:53: C: Style/AndOr: Use || instead of or. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:20:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:20:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:20:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:21:53: C: Style/AndOr: Use || instead of or. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:21:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:21:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:21:81: C: Metrics/LineLength: Line is too long. [108/80] | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:28:53: C: Layout/SpaceAroundOperators: Operator or should be surrounded by a single space. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:28:53: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:28:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:28:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:28:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:30:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("VMDK not found") unless File.exist? @input_vmdk | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:30:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("VMDK not found") unless File.exist? @input_vmdk | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:30:81: C: Metrics/LineLength: Line is too long. [82/80] | |
raise Macinbox::Error.new("VMDK not found") unless File.exist? @input_vmdk | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:31:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Box format not supported: #{@box_format}") unless ["vmware_fusion", "vmware_desktop"].include? @box_format | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:31:81: C: Metrics/LineLength: Line is too long. [141/80] | |
raise Macinbox::Error.new("Box format not supported: #{@box_format}") unless ["vmware_fusion", "vmware_desktop"].include? @box_format | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:31:86: C: Style/WordArray: Use %w or %W for an array of words. | |
raise Macinbox::Error.new("Box format not supported: #{@box_format}") unless ["vmware_fusion", "vmware_desktop"].include? @box_format | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:31:87: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("Box format not supported: #{@box_format}") unless ["vmware_fusion", "vmware_desktop"].include? @box_format | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:31:104: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("Box format not supported: #{@box_format}") unless ["vmware_fusion", "vmware_desktop"].include? @box_format | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:34:7: C: Metrics/MethodLength: Method has too many lines. [93/10] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:35:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vmdk ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:35:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vmdk ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:35:81: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vmdk ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:35:81: C: Metrics/LineLength: Line is too long. [82/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_vmdk ] | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:38:9: C: Metrics/BlockLength: Block has too many lines. [85/25] | |
Logger.info "Assembling the box contents..." do ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:38:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Assembling the box contents..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:39:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:45:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:109:70: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
gui.fitGuestUsingNativeDisplayResolution = "#{@hidpi ? "TRUE" : "FALSE"}" | |
^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:109:79: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
gui.fitGuestUsingNativeDisplayResolution = "#{@hidpi ? "TRUE" : "FALSE"}" | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:110:56: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
gui.viewModeAtPowerOn = "#{@fullscreen ? "fullscreen" : "windowed"}" | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:110:71: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
gui.viewModeAtPowerOn = "#{@fullscreen ? "fullscreen" : "windowed"}" | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:111:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:112:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:117:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:129:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:131:19: C: Style/ColonMethodCall: Do not use :: for method calls. | |
Macinbox::copyfiles(from: @input_vmdk, to: "#{@box_dir}/macinbox.vmdk") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:131:81: C: Metrics/LineLength: Line is too long. [81/80] | |
Macinbox::copyfiles(from: @input_vmdk, to: "#{@box_dir}/macinbox.vmdk") | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:132:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:135:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Moving the box to the destination..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:136:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown ENV["SUDO_USER"], nil, @box_dir | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:139:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:141:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:143:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_vmdk.rb:145:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
module Macinbox | |
^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:2:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:4:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:5:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CheckMacosVersions | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:6:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:8:53: C: Style/AndOr: Use || instead of or. | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:8:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:8:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:8:81: C: Metrics/LineLength: Line is too long. [111/80] | |
@installer_app = opts[:installer_path] or raise ArgumentError.new(":installer_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:10:53: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:10:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:10:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:10:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:12:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("Installer app not found") unless File.exist? @installer_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:12:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("Installer app not found") unless File.exist? @installer_app | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:12:81: C: Metrics/LineLength: Line is too long. [94/80] | |
raise Macinbox::Error.new("Installer app not found") unless File.exist? @installer_app | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:15:7: C: Metrics/AbcSize: Assignment Branch Condition size for run is too high. [18.92/15] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:15:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for run is too high. [8/6] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:15:7: C: Metrics/MethodLength: Method has too many lines. [16/10] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:15:7: C: Metrics/PerceivedComplexity: Perceived complexity for run is too high. [8/7] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:16:81: C: Metrics/LineLength: Line is too long. [89/80] | |
install_info_plist = "#{@installer_app}/Contents/SharedSupport/InstallInfo.plist" | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:17:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("InstallInfo.plist not found in installer app bundle") unless File.exist? install_info_plist | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:17:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("InstallInfo.plist not found in installer app bundle") unless File.exist? install_info_plist | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:17:81: C: Metrics/LineLength: Line is too long. [126/80] | |
raise Macinbox::Error.new("InstallInfo.plist not found in installer app bundle") unless File.exist? install_info_plist | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:19:49: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
installer_os_version = Task.backtick %W[ /usr/libexec/PlistBuddy -c #{'Print :System\ Image\ Info:version'} #{install_info_plist} ] | |
^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:19:79: W: Lint/LiteralInInterpolation: Literal interpolation detected. | |
installer_os_version = Task.backtick %W[ /usr/libexec/PlistBuddy -c #{'Print :System\ Image\ Info:version'} #{install_info_plist} ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:19:81: C: Metrics/LineLength: Line is too long. [139/80] | |
installer_os_version = Task.backtick %W[ /usr/libexec/PlistBuddy -c #{'Print :System\ Image\ Info:version'} #{install_info_plist} ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:19:138: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
installer_os_version = Task.backtick %W[ /usr/libexec/PlistBuddy -c #{'Print :System\ Image\ Info:version'} #{install_info_plist} ] | |
^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:20:43: C: Style/RescueModifier: Avoid using rescue in its modifier form. | |
installer_os_version_components = installer_os_version.split(".") rescue [0, 0, 0] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:20:70: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
installer_os_version_components = installer_os_version.split(".") rescue [0, 0, 0] | |
^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:20:81: C: Metrics/LineLength: Line is too long. [90/80] | |
installer_os_version_components = installer_os_version.split(".") rescue [0, 0, 0] | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:23:81: C: Metrics/LineLength: Line is too long. [91/80] | |
Logger.info "Installer macOS version detected: #{installer_os_version}" if $verbose | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:23:84: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Installer macOS version detected: #{installer_os_version}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:25:41: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
host_os_version = Task.backtick %W[ /usr/bin/sw_vers -productVersion ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:25:44: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
host_os_version = Task.backtick %W[ /usr/bin/sw_vers -productVersion ] | |
^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:25:77: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
host_os_version = Task.backtick %W[ /usr/bin/sw_vers -productVersion ] | |
^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:26:38: C: Style/RescueModifier: Avoid using rescue in its modifier form. | |
host_os_version_components = host_os_version.split(".") rescue [0, 0, 0] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:26:60: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
host_os_version_components = host_os_version.split(".") rescue [0, 0, 0] | |
^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:29:74: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Host macOS version detected: #{host_os_version}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:29:81: C: Metrics/LineLength: Line is too long. [81/80] | |
Logger.info "Host macOS version detected: #{host_os_version}" if $verbose | |
^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:31:81: C: Metrics/LineLength: Line is too long. [117/80] | |
if installer_os_version_major != host_os_version_major || installer_os_version_minor != host_os_version_minor | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:32:81: C: Metrics/LineLength: Line is too long. [134/80] | |
Logger.error "Warning: host OS version (#{host_os_version}) and installer OS version (#{installer_os_version}) do not match" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:33:81: C: Metrics/LineLength: Line is too long. [141/80] | |
# raise Macinbox::Error.new("host OS version (#{host_os_version}) and installer OS version (#{installer_os_version}) do not match") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:38:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:40:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/check_macos_versions.rb:42:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'fileutils' | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:10:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:12:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:13:5: C: Style/Documentation: Missing top-level class documentation comment. | |
class CreateBoxFromHDD | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:14:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:15:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [26.57/15] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:15:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [8/6] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:15:7: C: Metrics/PerceivedComplexity: Perceived complexity for initialize is too high. [8/7] | |
def initialize(opts) ... | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:16:53: C: Style/AndOr: Use || instead of or. | |
@input_hdd = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:16:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@input_hdd = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:16:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@input_hdd = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:16:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@input_hdd = opts[:hdd_path] or raise ArgumentError.new(":hdd_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:17:53: C: Style/AndOr: Use || instead of or. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:17:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:17:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:17:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@output_path = opts[:box_path] or raise ArgumentError.new(":box_path not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:19:53: C: Style/AndOr: Use || instead of or. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:19:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:19:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:19:81: C: Metrics/LineLength: Line is too long. [105/80] | |
@box_name = opts[:box_name] or raise ArgumentError.new(":box_name not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:20:53: C: Style/AndOr: Use || instead of or. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:20:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:20:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:20:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@cpu_count = opts[:cpu_count] or raise ArgumentError.new(":cpu_count not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:21:53: C: Style/AndOr: Use || instead of or. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:21:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:21:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:21:81: C: Metrics/LineLength: Line is too long. [108/80] | |
@memory_size = opts[:memory_size] or raise ArgumentError.new(":memory_size not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:27:46: C: Layout/ExtraSpacing: Unnecessary spacing detected. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:27:53: C: Layout/SpaceAroundOperators: Operator or should be surrounded by a single space. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:27:53: C: Style/AndOr: Use || instead of or. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:27:56: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:27:80: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:27:81: C: Metrics/LineLength: Line is too long. [106/80] | |
@collector = opts[:collector] or raise ArgumentError.new(":collector not specified") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:29:9: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
raise Macinbox::Error.new("HDD not found") unless File.exist? @input_hdd | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:29:35: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise Macinbox::Error.new("HDD not found") unless File.exist? @input_hdd | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:32:7: C: Metrics/AbcSize: Assignment Branch Condition size for run is too high. [26.48/15] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:32:7: C: Metrics/MethodLength: Method has too many lines. [34/10] | |
def run ... | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:33:35: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_hdd ] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:33:38: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_hdd ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:33:80: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_hdd ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:33:81: C: Metrics/LineLength: Line is too long. [81/80] | |
@temp_dir = Task.backtick %W[ /usr/bin/mktemp -d -t create_box_from_hdd ] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:36:9: C: Metrics/BlockLength: Block has too many lines. [26/25] | |
Logger.info "Assembling the box contents..." do ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:36:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Assembling the box contents..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:37:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:44:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:52:73: C: Style/NestedTernaryOperator: Ternary operators must not be nested. Prefer if or else constructs instead. | |
prl.customize ["set", :id, "--startup-view", "#{@gui ? (@fullscreen ? "fullscreen" : "window") : "headless"}"] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:52:87: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
prl.customize ["set", :id, "--startup-view", "#{@gui ? (@fullscreen ? "fullscreen" : "window") : "headless"}"] | |
^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:52:102: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
prl.customize ["set", :id, "--startup-view", "#{@gui ? (@fullscreen ? "fullscreen" : "window") : "headless"}"] | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:52:114: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
prl.customize ["set", :id, "--startup-view", "#{@gui ? (@fullscreen ? "fullscreen" : "window") : "headless"}"] | |
^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:55:1: C: Naming/HeredocDelimiterNaming: Use meaningful heredoc delimiters. | |
EOF | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:57:23: C: Style/GlobalVars: Do not introduce global variables. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:57:41: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
task_opts = $verbose ? {} : { :out => File::NULL } | |
^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:59:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl create macinbox -o macos --no-hdd --dst #{@box_dir} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:59:81: C: Metrics/LineLength: Line is too long. [97/80] | |
Task.run %W[ prlctl create macinbox -o macos --no-hdd --dst #{@box_dir} ] + [task_opts] | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:59:82: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl create macinbox -o macos --no-hdd --dst #{@box_dir} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:62:22: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ prlctl unregister macinbox ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:62:25: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl unregister macinbox ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:62:52: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl unregister macinbox ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:65:19: C: Style/ColonMethodCall: Do not use :: for method calls. | |
Macinbox::copyfiles(from: @input_hdd, to: "#{@box_dir}/macinbox.pvm/macinbox.hdd", recursive: true) | |
^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:65:81: C: Metrics/LineLength: Line is too long. [109/80] | |
Macinbox::copyfiles(from: @input_hdd, to: "#{@box_dir}/macinbox.pvm/macinbox.hdd", recursive: true) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:66:1: C: Layout/TrailingWhitespace: Trailing whitespace detected. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:67:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prl_disk_tool convert --merge --hdd #{@box_dir}/macinbox.pvm/macinbox.hdd ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:67:81: C: Metrics/LineLength: Line is too long. [112/80] | |
Task.run %W[ prl_disk_tool convert --merge --hdd #{@box_dir}/macinbox.pvm/macinbox.hdd ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:67:97: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prl_disk_tool convert --merge --hdd #{@box_dir}/macinbox.pvm/macinbox.hdd ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:68:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --device-add hdd --image #{@box_dir}/macinbox.pvm/macinbox.hdd ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:68:81: C: Metrics/LineLength: Line is too long. [121/80] | |
Task.run %W[ prlctl set macinbox --device-add hdd --image #{@box_dir}/macinbox.pvm/macinbox.hdd ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:68:106: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --device-add hdd --image #{@box_dir}/macinbox.pvm/macinbox.hdd ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:69:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --high-resolution #{@hidpi ? "on" : "off"} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:69:73: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Task.run %W[ prlctl set macinbox --high-resolution #{@hidpi ? "on" : "off"} ] + [task_opts] | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:69:80: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Task.run %W[ prlctl set macinbox --high-resolution #{@hidpi ? "on" : "off"} ] + [task_opts] | |
^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:69:81: C: Metrics/LineLength: Line is too long. [101/80] | |
Task.run %W[ prlctl set macinbox --high-resolution #{@hidpi ? "on" : "off"} ] + [task_opts] | |
^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:69:86: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --high-resolution #{@hidpi ? "on" : "off"} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:70:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --cpus #{@cpu_count} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:70:64: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --cpus #{@cpu_count} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:71:23: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --memsize #{@memory_size} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:71:69: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ prlctl set macinbox --memsize #{@memory_size} ] + [task_opts] | |
^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:71:81: C: Metrics/LineLength: Line is too long. [84/80] | |
Task.run %W[ prlctl set macinbox --memsize #{@memory_size} ] + [task_opts] | |
^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:72:1: C: Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:75:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Logger.info "Moving the box to the destination..." do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:76:31: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.chown ENV["SUDO_USER"], nil, @box_dir | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:79:1: C: Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:81:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:83:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/actions/create_box_from_hdd.rb:85:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/copyfiles.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'macinbox/task' | |
^ | |
~/macinbox/lib/macinbox/copyfiles.rb:3:1: C: Style/Documentation: Missing top-level module documentation comment. | |
module Macinbox | |
^^^^^^ | |
~/macinbox/lib/macinbox/copyfiles.rb:4:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/copyfiles.rb:10:16: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /bin/cp -c ] + flags + src + dest + [{ :err => File::NULL }] | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/copyfiles.rb:10:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/cp -c ] + flags + src + dest + [{ :err => File::NULL }] | |
^ | |
~/macinbox/lib/macinbox/copyfiles.rb:10:30: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/cp -c ] + flags + src + dest + [{ :err => File::NULL }] | |
^ | |
~/macinbox/lib/macinbox/copyfiles.rb:10:59: C: Style/HashSyntax: Use the new Ruby 1.9 hash syntax. | |
Task.run %W[ /bin/cp -c ] + flags + src + dest + [{ :err => File::NULL }] | |
^^^^^^^ | |
~/macinbox/lib/macinbox/copyfiles.rb:11:5: C: Style/RescueStandardError: Avoid rescuing without specifying an error class. | |
rescue | |
^^^^^^ | |
~/macinbox/lib/macinbox/copyfiles.rb:12:16: C: Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w. | |
Task.run %W[ /bin/cp ] + flags + src + dest | |
^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/copyfiles.rb:12:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/cp ] + flags + src + dest | |
^ | |
~/macinbox/lib/macinbox/copyfiles.rb:12:27: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
Task.run %W[ /bin/cp ] + flags + src + dest | |
^ | |
~/macinbox/lib/macinbox/copyfiles.rb:15:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox/version.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
module Macinbox | |
^ | |
~/macinbox/lib/macinbox/version.rb:2:13: C: Style/MutableConstant: Freeze mutable objects assigned to constants. | |
VERSION = "3.3.0" | |
^^^^^^^ | |
~/macinbox/lib/macinbox/version.rb:2:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
VERSION = "3.3.0" | |
^^^^^^^ | |
~/macinbox/lib/macinbox/error.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
module Macinbox | |
^ | |
~/macinbox/lib/macinbox/tty.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
module Macinbox | |
^ | |
~/macinbox/lib/macinbox/tty.rb:4:29: C: Style/CommandLiteral: Use backticks around command string. | |
RED = STDERR.isatty ? %x(/usr/bin/tput setaf 1) : "" | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:4:57: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
RED = STDERR.isatty ? %x(/usr/bin/tput setaf 1) : "" | |
^^ | |
~/macinbox/lib/macinbox/tty.rb:5:31: C: Style/CommandLiteral: Use backticks around command string. | |
GREEN = STDERR.isatty ? %x(/usr/bin/tput setaf 2) : "" | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:5:59: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
GREEN = STDERR.isatty ? %x(/usr/bin/tput setaf 2) : "" | |
^^ | |
~/macinbox/lib/macinbox/tty.rb:6:31: C: Style/CommandLiteral: Use backticks around command string. | |
RESET = STDERR.isatty ? %x(/usr/bin/tput sgr0) : "" | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:6:56: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
RESET = STDERR.isatty ? %x(/usr/bin/tput sgr0) : "" | |
^^ | |
~/macinbox/lib/macinbox/tty.rb:9:38: C: Style/CommandLiteral: Use backticks around command string. | |
CLEAR = STDERR.isatty ? "\r" + %x( /usr/bin/tput el ) : "" | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:9:41: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
CLEAR = STDERR.isatty ? "\r" + %x( /usr/bin/tput el ) : "" | |
^ | |
~/macinbox/lib/macinbox/tty.rb:9:58: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
CLEAR = STDERR.isatty ? "\r" + %x( /usr/bin/tput el ) : "" | |
^ | |
~/macinbox/lib/macinbox/tty.rb:9:63: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
CLEAR = STDERR.isatty ? "\r" + %x( /usr/bin/tput el ) : "" | |
^^ | |
~/macinbox/lib/macinbox/tty.rb:12:19: C: Style/CommandLiteral: Use backticks around command string. | |
INVISIBLE = %x( /usr/bin/tput civis ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:12:19: C: Style/MutableConstant: Freeze mutable objects assigned to constants. | |
INVISIBLE = %x( /usr/bin/tput civis ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:12:22: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
INVISIBLE = %x( /usr/bin/tput civis ) | |
^ | |
~/macinbox/lib/macinbox/tty.rb:12:42: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
INVISIBLE = %x( /usr/bin/tput civis ) | |
^ | |
~/macinbox/lib/macinbox/tty.rb:13:16: C: Style/CommandLiteral: Use backticks around command string. | |
NORMAL = %x( /usr/bin/tput cnorm ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:13:16: C: Style/MutableConstant: Freeze mutable objects assigned to constants. | |
NORMAL = %x( /usr/bin/tput cnorm ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/tty.rb:13:19: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
NORMAL = %x( /usr/bin/tput cnorm ) | |
^ | |
~/macinbox/lib/macinbox/tty.rb:13:39: C: Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters. | |
NORMAL = %x( /usr/bin/tput cnorm ) | |
^ | |
~/macinbox/lib/macinbox/task.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require 'macinbox/error' | |
^ | |
~/macinbox/lib/macinbox/task.rb:8:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. | |
~/macinbox/lib/macinbox/task.rb:9:3: C: Style/Documentation: Missing top-level class documentation comment. | |
class Task | |
^^^^^ | |
~/macinbox/lib/macinbox/task.rb:10:1: C: Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning. | |
~/macinbox/lib/macinbox/task.rb:12:65: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Running command: #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:13:20: C: Style/AndOr: Use || instead of or. | |
system(*cmd) or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$? >> 8}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:13:23: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
system(*cmd) or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$? >> 8}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:13:81: C: Metrics/LineLength: Line is too long. [109/80] | |
system(*cmd) or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$? >> 8}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:13:100: C: Style/SpecialGlobalVars: Prefer $CHILD_STATUS from the stdlib 'English' module (don't forget to require it) over $?. | |
system(*cmd) or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$? >> 8}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:17:51: C: Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations. | |
Logger.info "Running command: sudo -u #{ENV["SUDO_USER"]} #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:17:81: C: Metrics/LineLength: Line is too long. [100/80] | |
Logger.info "Running command: sudo -u #{ENV["SUDO_USER"]} #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:17:93: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Running command: sudo -u #{ENV["SUDO_USER"]} #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:18:14: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:18:22: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^ | |
~/macinbox/lib/macinbox/task.rb:18:32: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:18:51: C: Style/AndOr: Use || instead of or. | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:18:54: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:18:81: C: Metrics/LineLength: Line is too long. [140/80] | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:18:131: C: Style/SpecialGlobalVars: Prefer $CHILD_STATUS from the stdlib 'English' module (don't forget to require it) over $?. | |
system "sudo", "-u", ENV["SUDO_USER"], *cmd or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:21:5: C: Metrics/AbcSize: Assignment Branch Condition size for progress_bar is too high. [33.97/15] | |
def self.progress_bar(activity, percent_done) ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:21:5: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
def self.progress_bar(activity, percent_done) ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:22:59: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
@spinner ||= Enumerator.new { |e| loop { e.yield '|'; e.yield '/'; e.yield '-'; e.yield '\\' } } | |
^ | |
~/macinbox/lib/macinbox/task.rb:22:81: C: Metrics/LineLength: Line is too long. [102/80] | |
@spinner ||= Enumerator.new { |e| loop { e.yield '|'; e.yield '/'; e.yield '-'; e.yield '\\' } } | |
^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:24:27: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
header = activity + ": " + percent_done.round(0).to_s + "% done " | |
^^^^ | |
~/macinbox/lib/macinbox/task.rb:24:63: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
header = activity + ": " + percent_done.round(0).to_s + "% done " | |
^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:25:13: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
bar = "" | |
^^ | |
~/macinbox/lib/macinbox/task.rb:30:20: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
bar_full = "#" * bar_size | |
^^^ | |
~/macinbox/lib/macinbox/task.rb:31:21: C: Style/RescueModifier: Avoid using rescue in its modifier form. | |
bar_empty = @spinner.next + " " * (bar_remainder-1) rescue "" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:31:37: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
bar_empty = @spinner.next + " " * (bar_remainder-1) rescue "" | |
^^^ | |
~/macinbox/lib/macinbox/task.rb:31:57: C: Layout/SpaceAroundOperators: Surrounding space missing for operator -. | |
bar_empty = @spinner.next + " " * (bar_remainder-1) rescue "" | |
^ | |
~/macinbox/lib/macinbox/task.rb:31:68: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
bar_empty = @spinner.next + " " * (bar_remainder-1) rescue "" | |
^^ | |
~/macinbox/lib/macinbox/task.rb:32:15: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
bar = "[" + bar_full + bar_empty + "]" | |
^^^ | |
~/macinbox/lib/macinbox/task.rb:32:44: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
bar = "[" + bar_full + bar_empty + "]" | |
^^^ | |
~/macinbox/lib/macinbox/task.rb:38:81: C: Metrics/LineLength: Line is too long. [123/80] | |
io.print TTY::Line::CLEAR + TTY::Color::GREEN + progress_bar(activity, percent_done) + TTY::Color::RESET if io.isatty | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:41:51: C: Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in default value assignment. | |
def self.run_with_progress(activity, cmd, opts={}) | |
^ | |
~/macinbox/lib/macinbox/task.rb:44:65: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Running command: #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:54:5: C: Metrics/AbcSize: Assignment Branch Condition size for write_file_to_io_with_progress is too high. [19.82/15] | |
def self.write_file_to_io_with_progress(source, destination) ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:54:5: C: Metrics/MethodLength: Method has too many lines. [20/10] | |
def self.write_file_to_io_with_progress(source, destination) ... | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:65:69: C: Layout/SpaceAroundOperators: Surrounding space missing for operator *. | |
bytes_written += destination.write(file.readpartial(1024*1024)) | |
^ | |
~/macinbox/lib/macinbox/task.rb:66:81: C: Metrics/LineLength: Line is too long. [82/80] | |
percent_done = ((bytes_written.to_f / total_size.to_f) * 100).round(1) | |
^^ | |
~/macinbox/lib/macinbox/task.rb:78:65: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Running command: #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:83:65: C: Style/GlobalVars: Do not introduce global variables. | |
Logger.info "Running command: #{Shellwords.join(cmd)}" if $verbose | |
^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:84:21: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
IO.popen(cmd, "w") do |pipe| | |
^^^ | |
~/macinbox/lib/macinbox/task.rb:87:7: C: Style/SpecialGlobalVars: Prefer $CHILD_STATUS from the stdlib 'English' module (don't forget to require it) over $?. | |
$? == 0 or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:87:15: C: Style/AndOr: Use || instead of or. | |
$? == 0 or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:87:18: C: Style/RaiseArgs: Provide an exception class and message as arguments to raise. | |
$? == 0 or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:87:81: C: Metrics/LineLength: Line is too long. [104/80] | |
$? == 0 or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox/task.rb:87:95: C: Style/SpecialGlobalVars: Prefer $CHILD_STATUS from the stdlib 'English' module (don't forget to require it) over $?. | |
$? == 0 or raise Macinbox::Error.new("#{cmd.slice(0)} failed with non-zero exit code: #{$?.to_i}") | |
^^ | |
~/macinbox/lib/macinbox/task.rb:90:1: C: Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body end. | |
~/macinbox/lib/macinbox.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
require "macinbox/actions" | |
^ | |
~/macinbox/lib/macinbox.rb:1:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/actions" | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:2:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/cli" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:3:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/collector" | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:4:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/copyfiles" | |
^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:5:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/error" | |
^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:6:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/logger" | |
^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:7:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/task" | |
^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:8:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/tty" | |
^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:9:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/version" | |
^^^^^^^^^^^^^^^^^^ | |
~/macinbox/lib/macinbox.rb:10:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/virtual_disk" | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
~/macinbox/exe/macinbox:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true. | |
#!/usr/bin/env ruby | |
^ | |
~/macinbox/exe/macinbox:3:9: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require "macinbox/cli" | |
^^^^^^^^^^^^^^ | |
27 files inspected, 1183 offenses detected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment