Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
67d574d9
Commit
67d574d9
authored
7 years ago
by
UmanShahzad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Break up finding non-installed plugins into separate function.
parent
fe7b1840
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
vagrantplugins.rb
+11
-10
No files found.
vagrant
/.vagrant
plugins.rb
→
vagrantplugins.rb
View file @
67d574d9
# -*- mode: ruby -*-
# vi: set ft=ruby :
def
install_plugins
(
plugins
)
def
install_plugins
(
plugins
)
not_installed
=
[]
not_installed
=
get_not_installed
plugins
plugins
.
each
do
|
plugin
|
unless
Vagrant
.
has_plugin?
(
plugin
)
not_installed
<<
plugin
end
end
if
not_installed
.
any?
if
not_installed
.
any?
puts
"The following required plugins must be installed:"
puts
"The following required plugins must be installed:"
puts
"'
#{
not_installed
.
join
(
"', '"
)
}
'"
puts
"'
#{
not_installed
.
join
(
"', '"
)
}
'"
...
@@ -22,6 +13,16 @@ def install_plugins(plugins)
...
@@ -22,6 +13,16 @@ def install_plugins(plugins)
end
end
end
end
def
get_not_installed
(
plugins
)
not_installed
=
[]
plugins
.
each
do
|
plugin
|
unless
Vagrant
.
has_plugin?
(
plugin
)
not_installed
<<
plugin
end
end
return
not_installed
end
def
install_plugin
(
plugin
)
def
install_plugin
(
plugin
)
system
"vagrant plugin install
#{
plugin
}
"
system
"vagrant plugin install
#{
plugin
}
"
end
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment