-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: Bump version to 1.4.3 action/import: Add add process-level lock for linked clone creation Remove minitest and i18n-tasks dependencies Refactor empty lines and spaces website: Fix invalid closing tag for 404 page Specify CompileForwardedPorts class name explicitely rubocop: Single quotes win ✨ rubocop: Removed unnecessary "return" statements Use #require_relative instead of path expanding Move #setup_i18n and #setup_logging to plugin class docs: Fix typo docs: Add section about linked clone feature docs: Refactor "Configuration" page docs: Fix Parallels Desktop product links docs: Add information about Parallels Desktop 11 docs: Fix invalid margin value in CSS Update README.md
- Loading branch information
Showing
65 changed files
with
612 additions
and
604 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,19 @@ | ||
require "pathname" | ||
require 'pathname' | ||
|
||
require "vagrant-parallels/plugin" | ||
require "vagrant-parallels/version" | ||
require 'vagrant-parallels/plugin' | ||
require 'vagrant-parallels/version' | ||
|
||
module VagrantPlugins | ||
module Parallels | ||
lib_path = Pathname.new(File.expand_path("../vagrant-parallels", __FILE__)) | ||
autoload :Action, lib_path.join("action") | ||
autoload :Errors, lib_path.join("errors") | ||
lib_path = Pathname.new(File.expand_path('../vagrant-parallels', __FILE__)) | ||
autoload :Action, lib_path.join('action') | ||
autoload :Errors, lib_path.join('errors') | ||
|
||
# This returns the path to the source of this plugin. | ||
# | ||
# @return [Pathname] | ||
def self.source_root | ||
@source_root ||= Pathname.new(File.expand_path("../../", __FILE__)) | ||
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__)) | ||
end | ||
|
||
# This initializes the internationalization strings. | ||
def self.setup_i18n | ||
I18n.load_path << File.expand_path("locales/en.yml", Parallels.source_root) | ||
I18n.reload! | ||
end | ||
|
||
# This sets up our log level to be whatever VAGRANT_LOG is. | ||
def self.setup_logging | ||
require "log4r" | ||
|
||
level = nil | ||
begin | ||
level = Log4r.const_get(ENV["VAGRANT_LOG"].upcase) | ||
rescue NameError | ||
# This means that the logging constant wasn't found, | ||
# which is fine. We just keep `level` as `nil`. But | ||
# we tell the user. | ||
level = nil | ||
end | ||
|
||
# Some constants, such as "true" resolve to booleans, so the | ||
# above error checking doesn't catch it. This will check to make | ||
# sure that the log level is an integer, as Log4r requires. | ||
level = nil if !level.is_a?(Integer) | ||
|
||
# Set the logging level on all "vagrant" namespaced | ||
# logs as long as we have a valid level. | ||
if level | ||
logger = Log4r::Logger.new("vagrant_parallels") | ||
logger.outputters = Log4r::Outputter.stderr | ||
logger.level = level | ||
logger = nil | ||
end | ||
end | ||
Parallels.setup_logging | ||
Parallels.setup_i18n | ||
end | ||
end |
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
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
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
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
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
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
Oops, something went wrong.