Geminstaller C0 Coverage Information - RCov

spec/fixture/rubygems_dist/rubygems-trunk/lib/rubygems/install_update_options.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
spec/fixture/rubygems_dist/rubygems-trunk/lib/rubygems/install_update_options.rb 117 83
70.09%
59.04%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 #--
2 # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
3 # All rights reserved.
4 # See LICENSE.txt for permissions.
5 #++
6 
7 require 'rubygems'
8 require 'rubygems/security'
9 
10 ##
11 # Mixin methods for install and update options for Gem::Commands
12 
13 module Gem::InstallUpdateOptions
14 
15   ##
16   # Add the install/update options to the option parser.
17 
18   def add_install_update_options
19     OptionParser.accept Gem::Security::Policy do |value|
20       value = Gem::Security::Policies[value]
21       raise OptionParser::InvalidArgument, value if value.nil?
22       value
23     end
24 
25     add_option(:"Install/Update", '-i', '--install-dir DIR',
26                'Gem repository directory to get installed',
27                'gems') do |value, options|
28       options[:install_dir] = File.expand_path(value)
29     end
30 
31     add_option(:"Install/Update", '-n', '--bindir DIR',
32 	       'Directory where binary files are',
33 	       'located') do |value, options|
34       options[:bin_dir] = File.expand_path(value)
35     end
36 
37     add_option(:"Install/Update", '-d', '--[no-]rdoc',
38                'Generate RDoc documentation for the gem on',
39                'install') do |value, options|
40       options[:generate_rdoc] = value
41     end
42 
43     add_option(:"Install/Update", '--[no-]ri',
44                'Generate RI documentation for the gem on',
45                'install') do |value, options|
46       options[:generate_ri] = value
47     end
48 
49     add_option(:"Install/Update", '-E', '--[no-]env-shebang',
50                "Rewrite the shebang line on installed",
51                "scripts to use /usr/bin/env") do |value, options|
52       options[:env_shebang] = value
53     end
54 
55     add_option(:"Install/Update", '-f', '--[no-]force',
56                'Force gem to install, bypassing dependency',
57                'checks') do |value, options|
58       options[:force] = value
59     end
60 
61     add_option(:"Install/Update", '-t', '--[no-]test',
62                'Run unit tests prior to installation') do |value, options|
63       options[:test] = value
64     end
65 
66     add_option(:"Install/Update", '-w', '--[no-]wrappers',
67                'Use bin wrappers for executables',
68                'Not available on dosish platforms') do |value, options|
69       options[:wrappers] = value
70     end
71 
72     add_option(:"Install/Update", '-P', '--trust-policy POLICY',
73                Gem::Security::Policy,
74                'Specify gem trust policy') do |value, options|
75       options[:security_policy] = value
76     end
77 
78     add_option(:"Install/Update", '--ignore-dependencies',
79                'Do not install any required dependent gems') do |value, options|
80       options[:ignore_dependencies] = value
81     end
82 
83     add_option(:"Install/Update", '-y', '--include-dependencies',
84                'Unconditionally install the required',
85                'dependent gems') do |value, options|
86       options[:include_dependencies] = value
87     end
88 
89     add_option(:"Install/Update",       '--[no-]format-executable',
90                'Make installed executable names match ruby.',
91                'If ruby is ruby18, foo_exec will be',
92                'foo_exec18') do |value, options|
93       options[:format_executable] = value
94     end
95 
96     add_option(:"Install/Update",       '--[no-]user-install',
97                'Install in user\'s home directory instead',
98                'of GEM_HOME.') do |value, options|
99       options[:user_install] = value
100     end
101 
102     add_option(:"Install/Update", "--development",
103                 "Install any additional development",
104                 "dependencies") do |value, options|
105       options[:development] = true
106     end
107   end
108 
109   ##
110   # Default options for the gem install command.
111 
112   def install_update_defaults_str
113     '--rdoc --no-force --no-test --wrappers'
114   end
115 
116 end
117 

Generated on Mon May 10 23:40:28 -0700 2010 with rcov 0.9.8