Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

support serveral install options,especially --force option can resolv… #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/rubygems/commands/specific_install_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ def initialize(output=STDOUT)
add_option('-i', '--install-dir INSTALL_DIR', arguments) do |installdir, options|
options[:installdir] = installdir
end

add_option('-f', '--force', arguments) do |force, options|
options[:force] = force
end

add_option('--ignore-dependencies', arguments) do |ignore_dependencies, options|
options[:ignore_dependencies] = ignore_dependencies
end

add_option('--minimal-deps', arguments) do |minimal_deps, options|
options[:minimal_deps] = minimal_deps
end
end

def arguments
Expand Down Expand Up @@ -213,6 +225,9 @@ def install_gemspec
install_options = {}
install_options[:user_install] = options[:userinstall].nil? ? nil : true
install_options[:install_dir] = options[:installdir] if options[:installdir]
install_options[:force] = options[:force].nil? ? nil : true
install_options[:ignore_dependencies] = options[:ignore_dependencies].nil? ? nil : true
install_options[:minimal_deps] = options[:minimal_deps].nil? ? nil : true
inst = Gem::DependencyInstaller.new install_options
inst.install gem
else
Expand Down
2 changes: 1 addition & 1 deletion lib/specific_install/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SpecificInstall
VERSION = "0.3.8"
VERSION = "0.3.9"
end