autoproj 2.0.0.b7 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -0
  3. data/.gitignore +8 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +6 -0
  6. data/README.md +4 -0
  7. data/Rakefile +40 -81
  8. data/autoproj.gemspec +29 -0
  9. data/lib/autoproj/cli/cache.rb +7 -2
  10. data/lib/autoproj/cli/main.rb +46 -25
  11. data/lib/autoproj/cli/main_test.rb +6 -4
  12. data/lib/autoproj/cli/status.rb +2 -2
  13. data/lib/autoproj/configuration.rb +5 -0
  14. data/lib/autoproj/git_server_configuration.rb +117 -0
  15. data/lib/autoproj/osdeps.rb +14 -914
  16. data/lib/autoproj/package_managers/apt_dpkg_manager.rb +70 -0
  17. data/lib/autoproj/package_managers/emerge_manager.rb +14 -0
  18. data/lib/autoproj/package_managers/gem_manager.rb +313 -0
  19. data/lib/autoproj/package_managers/homebrew_manager.rb +44 -0
  20. data/lib/autoproj/package_managers/manager.rb +45 -0
  21. data/lib/autoproj/package_managers/pacman_manager.rb +14 -0
  22. data/lib/autoproj/package_managers/pip_manager.rb +86 -0
  23. data/lib/autoproj/package_managers/pkg_manager.rb +14 -0
  24. data/lib/autoproj/package_managers/port_manager.rb +14 -0
  25. data/lib/autoproj/package_managers/shell_script_manager.rb +207 -0
  26. data/lib/autoproj/package_managers/unknown_os_manager.rb +42 -0
  27. data/lib/autoproj/package_managers/yum_manager.rb +56 -0
  28. data/lib/autoproj/package_managers/zypper_manager.rb +43 -0
  29. data/lib/autoproj/package_manifest.rb +1 -1
  30. data/lib/autoproj/test.rb +13 -14
  31. data/lib/autoproj/variable_expansion.rb +4 -2
  32. data/lib/autoproj/version.rb +1 -1
  33. data/lib/autoproj/workspace.rb +5 -1
  34. data/manifest.xml +20 -0
  35. metadata +73 -87
  36. data/.gemtest +0 -0
  37. data/Manifest.txt +0 -105
  38. data/test/data/empty_manifest.xml +0 -2
  39. data/test/data/full_manifest.xml +0 -19
  40. data/test/data/invalid_manifest.xml +0 -3
  41. data/test/data/os_release.with_complex_version_field +0 -3
  42. data/test/data/os_release.with_duplicate_values +0 -3
  43. data/test/data/os_release.with_missing_optional_fields +0 -2
  44. data/test/data/os_release.with_quoted_and_unquoted_fields +0 -2
  45. data/test/data/test_manifest/autoproj/local_set/local.autobuild +0 -0
  46. data/test/data/test_manifest/autoproj/local_set/source.yml +0 -1
  47. data/test/data/test_manifest/autoproj/manifest +0 -7
  48. data/test/ops/test_configuration.rb +0 -20
  49. data/test/ops/test_snapshot.rb +0 -26
  50. data/test/package_managers/apt-dpkg-status +0 -41
  51. data/test/package_managers/apt-dpkg-status.installed-last +0 -27
  52. data/test/package_managers/apt-dpkg-status.noninstalled-last +0 -12
  53. data/test/package_managers/test_apt_dpkg_manager.rb +0 -41
  54. data/test/package_managers/test_gem.rb +0 -156
  55. data/test/package_managers/test_pip.rb +0 -42
  56. data/test/test_manifest.rb +0 -48
  57. data/test/test_os_dependencies.rb +0 -586
  58. data/test/test_package.rb +0 -30
  59. data/test/test_package_manifest.rb +0 -65
  60. data/test/test_vcs_definition.rb +0 -46
data/.gemtest DELETED
File without changes
data/Manifest.txt DELETED
@@ -1,105 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.md
4
- Rakefile
5
- bin/alocate
6
- bin/amake
7
- bin/aup
8
- bin/autoproj
9
- bin/autoproj_bootstrap
10
- bin/autoproj_bootstrap.in
11
- lib/autoproj.rb
12
- lib/autoproj/autobuild.rb
13
- lib/autoproj/base.rb
14
- lib/autoproj/build_option.rb
15
- lib/autoproj/cli.rb
16
- lib/autoproj/cli/base.rb
17
- lib/autoproj/cli/bootstrap.rb
18
- lib/autoproj/cli/build.rb
19
- lib/autoproj/cli/cache.rb
20
- lib/autoproj/cli/clean.rb
21
- lib/autoproj/cli/commit.rb
22
- lib/autoproj/cli/doc.rb
23
- lib/autoproj/cli/envsh.rb
24
- lib/autoproj/cli/inspection_tool.rb
25
- lib/autoproj/cli/locate.rb
26
- lib/autoproj/cli/log.rb
27
- lib/autoproj/cli/main.rb
28
- lib/autoproj/cli/main_test.rb
29
- lib/autoproj/cli/osdeps.rb
30
- lib/autoproj/cli/query.rb
31
- lib/autoproj/cli/reconfigure.rb
32
- lib/autoproj/cli/reset.rb
33
- lib/autoproj/cli/show.rb
34
- lib/autoproj/cli/snapshot.rb
35
- lib/autoproj/cli/status.rb
36
- lib/autoproj/cli/switch_config.rb
37
- lib/autoproj/cli/tag.rb
38
- lib/autoproj/cli/test.rb
39
- lib/autoproj/cli/update.rb
40
- lib/autoproj/cli/versions.rb
41
- lib/autoproj/configuration.rb
42
- lib/autoproj/default.osdeps
43
- lib/autoproj/environment.rb
44
- lib/autoproj/exceptions.rb
45
- lib/autoproj/gitorious.rb
46
- lib/autoproj/installation_manifest.rb
47
- lib/autoproj/manifest.rb
48
- lib/autoproj/metapackage.rb
49
- lib/autoproj/ops/build.rb
50
- lib/autoproj/ops/cache.rb
51
- lib/autoproj/ops/configuration.rb
52
- lib/autoproj/ops/import.rb
53
- lib/autoproj/ops/loader.rb
54
- lib/autoproj/ops/main_config_switcher.rb
55
- lib/autoproj/ops/snapshot.rb
56
- lib/autoproj/ops/tools.rb
57
- lib/autoproj/options.rb
58
- lib/autoproj/osdeps.rb
59
- lib/autoproj/package_definition.rb
60
- lib/autoproj/package_manifest.rb
61
- lib/autoproj/package_selection.rb
62
- lib/autoproj/package_set.rb
63
- lib/autoproj/query.rb
64
- lib/autoproj/reporter.rb
65
- lib/autoproj/system.rb
66
- lib/autoproj/templates/create-set/packages.autobuild
67
- lib/autoproj/templates/create-set/source.yml
68
- lib/autoproj/test.rb
69
- lib/autoproj/variable_expansion.rb
70
- lib/autoproj/vcs_definition.rb
71
- lib/autoproj/version.rb
72
- lib/autoproj/workspace.rb
73
- samples/autoproj/README.txt
74
- samples/autoproj/init.rb
75
- samples/autoproj/manifest
76
- samples/autoproj/overrides.rb
77
- samples/autoproj/overrides.yml
78
- samples/manifest.xml
79
- samples/osdeps.yml
80
- shell/autoproj_bash
81
- shell/autoproj_sh
82
- shell/autoproj_zsh
83
- test/data/empty_manifest.xml
84
- test/data/full_manifest.xml
85
- test/data/invalid_manifest.xml
86
- test/data/os_release.with_complex_version_field
87
- test/data/os_release.with_duplicate_values
88
- test/data/os_release.with_missing_optional_fields
89
- test/data/os_release.with_quoted_and_unquoted_fields
90
- test/data/test_manifest/autoproj/local_set/local.autobuild
91
- test/data/test_manifest/autoproj/local_set/source.yml
92
- test/data/test_manifest/autoproj/manifest
93
- test/ops/test_configuration.rb
94
- test/ops/test_snapshot.rb
95
- test/package_managers/apt-dpkg-status
96
- test/package_managers/apt-dpkg-status.installed-last
97
- test/package_managers/apt-dpkg-status.noninstalled-last
98
- test/package_managers/test_apt_dpkg_manager.rb
99
- test/package_managers/test_gem.rb
100
- test/package_managers/test_pip.rb
101
- test/test_manifest.rb
102
- test/test_os_dependencies.rb
103
- test/test_package.rb
104
- test/test_package_manifest.rb
105
- test/test_vcs_definition.rb
@@ -1,2 +0,0 @@
1
- <project>
2
- </project>
@@ -1,19 +0,0 @@
1
- <package>
2
- <description brief="short_doc">
3
- full_doc
4
- </description>
5
- <author>Author1/author1@email,Author2/author2@email</author>
6
- <author>Author3</author>
7
-
8
- <license>BSD</license>
9
- <url>the_url</url>
10
- <logo>the_logo</logo>
11
- <depend package="dep1"/>
12
- <depend package="dep2"/>
13
- <depend package="opt_dep1" optional="1"/>
14
- <depend_optional package="opt_dep2"/>
15
- <rosdep name="osdep1"/>
16
-
17
- <tags>tag1,tag2</tags>
18
- <tags>tag3</tags>
19
- </package>
@@ -1,3 +0,0 @@
1
- <package>
2
- <bla
3
- </package>
@@ -1,3 +0,0 @@
1
- ID="name"
2
- VERSION_ID="version_id"
3
- VERSION="version, codename (codename_bis)"
@@ -1,3 +0,0 @@
1
- ID="id"
2
- VERSION="codename (version_id)"
3
- VERSION_ID=version_id
@@ -1,2 +0,0 @@
1
- ID='name'
2
- VERSION_ID='version_id'
@@ -1,2 +0,0 @@
1
- ID=name
2
- VERSION_ID="version_id"
@@ -1 +0,0 @@
1
- name: local_set
@@ -1,7 +0,0 @@
1
- package_sets:
2
- - ./local_set
3
- - type: git
4
- url: remote2.git
5
- branch: next
6
-
7
-
@@ -1,20 +0,0 @@
1
- require 'autoproj/test'
2
- require 'autoproj/ops/configuration'
3
-
4
- describe Autoproj::Ops::Configuration do
5
- describe "#sort_package_sets_by_import_order" do
6
- attr_reader :ops
7
-
8
- before do
9
- @ops = Autoproj::Ops::Configuration.new(nil, nil)
10
- end
11
-
12
- it "should handle standalone package sets that are both explicit and dependencies of other package sets gracefully (issue#30)" do
13
- pkg_set0 = flexmock('set0', imports: [], explicit?: true)
14
- pkg_set1 = flexmock('set1', imports: [pkg_set0], explicit?: true)
15
- root_pkg_set = flexmock('root', imports: [pkg_set0, pkg_set1], explicit?: true)
16
- assert_equal [pkg_set0, pkg_set1, root_pkg_set],
17
- ops.sort_package_sets_by_import_order([pkg_set1, pkg_set0], root_pkg_set)
18
- end
19
- end
20
- end
@@ -1,26 +0,0 @@
1
- require 'autoproj/test'
2
-
3
- module Autoproj
4
- module Ops
5
- describe Snapshot do
6
- attr_reader :manifest
7
- before do
8
- @manifest = create_bootstrap
9
- end
10
-
11
- describe ".update_log_available?" do
12
- it "returns false if the main configuration is not managed by git" do
13
- assert !Snapshot.update_log_available?(manifest)
14
- end
15
- it "returns true if the main configuration is managed by git even if it is not declared" do
16
- system("git", "init", chdir: Autoproj.config_dir, STDOUT => :close)
17
- assert Snapshot.update_log_available?(manifest)
18
- end
19
- it "returns true if the main configuration is managed by git and it is declared" do
20
- manifest.main_package_set.vcs = VCSDefinition.from_raw('type' => 'git', 'url' => Autoproj.config_dir)
21
- assert Snapshot.update_log_available?(manifest)
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,41 +0,0 @@
1
- Package: noninstalled-package
2
- Status: bla
3
- Priority: optional
4
- Section: unknown
5
- Installed-Size: 17480
6
- Maintainer: Ruben Smits
7
- Architecture: amd64
8
- Version: 0.2.3-s1336530597~oneiric
9
- Depends: ros-electric-ros (= 1.6.9-s1336528271~oneiric), ros-electric-common-rosdeps (= 1.0.2-s1336530376~oneiric), build-essential, python-yaml, cmake, subversion, python-sip-dev, libc6, libeigen3-dev, libcppunit-dev, pkg-config
10
- Description: orocos_kinematics_dynamics
11
- orocos_kinematics_dynamics
12
- Wg-Rosdistro: electric
13
-
14
- Package: installed-package
15
- Status: install ok installed
16
- Priority: optional
17
- Section: x11
18
- Installed-Size: 114
19
- Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
20
- Architecture: amd64
21
- Version: 1:12.9.0-0ubuntu0.1
22
- Provides: xorg-driver-input
23
- Depends: libc6 (>= 2.7), xorg-input-abi-16, xserver-xorg-core (>= 2:1.10.99.901), xserver-xorg-input-mouse, udev
24
- Description: X.Org X server -- VMMouse input driver to use with VMWare
25
- This package provides the driver for the X11 vmmouse input device.
26
- .
27
- The VMMouse driver enables support for the special VMMouse protocol
28
- that is provided by VMware virtual machines to give absolute pointer
29
- positioning.
30
- .
31
- The vmmouse driver is capable of falling back to the standard "mouse"
32
- driver if a VMware virtual machine is not detected. This allows for
33
- dual-booting of an operating system from a virtual machine to real hardware
34
- without having to edit xorg.conf every time.
35
- .
36
- More information about X.Org can be found at:
37
- <URL:http://www.X.org>
38
- .
39
- This package is built from the X.org xf86-input-vmmouse driver module.
40
- Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
41
-
@@ -1,27 +0,0 @@
1
- Package: installed-package
2
- Status: install ok installed
3
- Priority: optional
4
- Section: x11
5
- Installed-Size: 114
6
- Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
7
- Architecture: amd64
8
- Version: 1:12.9.0-0ubuntu0.1
9
- Provides: xorg-driver-input
10
- Depends: libc6 (>= 2.7), xorg-input-abi-16, xserver-xorg-core (>= 2:1.10.99.901), xserver-xorg-input-mouse, udev
11
- Description: X.Org X server -- VMMouse input driver to use with VMWare
12
- This package provides the driver for the X11 vmmouse input device.
13
- .
14
- The VMMouse driver enables support for the special VMMouse protocol
15
- that is provided by VMware virtual machines to give absolute pointer
16
- positioning.
17
- .
18
- The vmmouse driver is capable of falling back to the standard "mouse"
19
- driver if a VMware virtual machine is not detected. This allows for
20
- dual-booting of an operating system from a virtual machine to real hardware
21
- without having to edit xorg.conf every time.
22
- .
23
- More information about X.Org can be found at:
24
- <URL:http://www.X.org>
25
- .
26
- This package is built from the X.org xf86-input-vmmouse driver module.
27
- Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
@@ -1,12 +0,0 @@
1
- Package: noninstalled-package
2
- Status: bla
3
- Priority: optional
4
- Section: unknown
5
- Installed-Size: 17480
6
- Maintainer: Ruben Smits
7
- Architecture: amd64
8
- Version: 0.2.3-s1336530597~oneiric
9
- Depends: ros-electric-ros (= 1.6.9-s1336528271~oneiric), ros-electric-common-rosdeps (= 1.0.2-s1336530376~oneiric), build-essential, python-yaml, cmake, subversion, python-sip-dev, libc6, libeigen3-dev, libcppunit-dev, pkg-config
10
- Description: orocos_kinematics_dynamics
11
- orocos_kinematics_dynamics
12
- Wg-Rosdistro: electric
@@ -1,41 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__))
2
- require 'test/unit'
3
- require 'autoproj'
4
- require 'flexmock/test_unit'
5
-
6
- class TC_OSDependencies_AptDpkgManager < Test::Unit::TestCase
7
- def test_status_file_parsing
8
- file = File.expand_path("apt-dpkg-status", File.dirname(__FILE__))
9
- mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
10
- assert mng.installed?('installed-package')
11
- assert !mng.installed?('noninstalled-package')
12
- end
13
-
14
- def test_status_file_parsing_is_robust_to_invalid_utf8
15
- Tempfile.open 'osdeps_aptdpkg' do |io|
16
- io.puts "Package: \x80\nStatus: installed ok install\n\nPackage: installed\nStatus: installed ok install"
17
- io.flush
18
- mng = Autoproj::PackageManagers::AptDpkgManager.new(io.path)
19
- mng.installed?('installed')
20
- end
21
- end
22
-
23
- def test_status_file_parsing_last_entry_installed
24
- file = File.expand_path("apt-dpkg-status.installed-last", File.dirname(__FILE__))
25
- mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
26
- assert mng.installed?('installed-package')
27
- end
28
-
29
- def test_status_file_parsing_last_entry_not_installed
30
- file = File.expand_path("apt-dpkg-status.noninstalled-last", File.dirname(__FILE__))
31
- mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
32
- assert !mng.installed?('noninstalled-package')
33
- end
34
-
35
- def test_status_file_parsing_not_there_means_not_installed
36
- file = File.expand_path("apt-dpkg-status.noninstalled-last", File.dirname(__FILE__))
37
- mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
38
- assert !mng.installed?('non-existent-package')
39
- end
40
- end
41
-
@@ -1,156 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__))
2
- require 'test/unit'
3
- require 'autoproj'
4
- require 'flexmock/test_unit'
5
-
6
- class TC_OSDependencies_Gem < Test::Unit::TestCase
7
- include Autoproj
8
- FOUND_PACKAGES = Autoproj::OSDependencies::FOUND_PACKAGES
9
- FOUND_NONEXISTENT = Autoproj::OSDependencies::FOUND_NONEXISTENT
10
-
11
- attr_reader :gem_manager
12
- attr_reader :gem_fetcher
13
- attr_reader :gem_spec
14
-
15
- def setup
16
- Autoproj::OSDependencies.operating_system = [['test', 'debian', 'default'], ['v1.0', 'v1', 'default']]
17
-
18
- @gem_manager = PackageManagers::GemManager.new
19
- @gem_fetcher = flexmock("fake gem fetcher")
20
- gem_manager.gem_fetcher = gem_fetcher
21
- @gem_spec = flexmock(Gem::Specification)
22
- Autobuild.programs['gem'] = 'mygem'
23
- super
24
- end
25
-
26
- def teardown
27
- super
28
- PackageManagers::GemManager.with_prerelease = false
29
- PackageManagers::GemManager.with_doc = false
30
- Autobuild.programs['gem'] = nil
31
- end
32
-
33
- def test_filter_uptodate_packages_passes_prerelease_flag
34
- fake_installed_package = flexmock("fake installed pgk0", :version => Gem::Version.new("1.0.0"))
35
- PackageManagers::GemManager.with_prerelease = true
36
-
37
- dep = Gem::Dependency.new("pkg0", Gem::Requirement.new('>= 0.9'))
38
- gem_spec.should_receive(:find_by_name).with('pkg0', Gem::Requirement.new('>= 0.9')).and_return(fake_installed_package)
39
- gem_fetcher.should_receive("find_matching").with(dep, true, true, true).
40
- and_return([[["pkg0", Gem::Version.new("1.1.0")], nil]])
41
- assert_equal [['pkg0', '>= 0.9']], gem_manager.filter_uptodate_packages([['pkg0', '>= 0.9']])
42
- end
43
-
44
- def test_filter_uptodate_packages_with_no_installed_package
45
- dep = Gem::Dependency.new("pkg0", Gem::Requirement.new('>= 0'))
46
- gem_spec.should_receive(:find_by_name).with('pkg0', Gem::Requirement.new('>= 0')).and_raise(Gem::LoadError)
47
- gem_fetcher.should_receive("find_matching").with(dep, true, true, false).
48
- and_return([[["pkg0", Gem::Version.new("1.0.0")], nil]])
49
- assert_equal [['pkg0']], gem_manager.filter_uptodate_packages([['pkg0']])
50
- end
51
-
52
- def test_filter_uptodate_packages_passes_version_specification
53
- dep = Gem::Dependency.new("pkg0", Gem::Requirement.new('>= 0.9'))
54
- gem_spec.should_receive(:find_by_name).with('pkg0', Gem::Requirement.new('>= 0.9')).and_raise(Gem::LoadError)
55
- gem_fetcher.should_receive("find_matching").with(dep, true, true, false).
56
- and_return([[["pkg0", Gem::Version.new("1.0.0")], nil]])
57
- assert_equal [['pkg0', '>= 0.9']], gem_manager.filter_uptodate_packages([['pkg0', '>= 0.9']])
58
- end
59
-
60
- def test_filter_uptodate_packages_with_outdated_package
61
- fake_installed_package = flexmock("fake installed pgk0", :version => Gem::Version.new("1.0.0"))
62
-
63
- dep = Gem::Dependency.new("pkg0", Gem::Requirement.new('>= 0.9'))
64
- gem_spec.should_receive(:find_by_name).with('pkg0', Gem::Requirement.new('>= 0.9')).and_return(fake_installed_package)
65
- gem_fetcher.should_receive("find_matching").with(dep, true, true, false).
66
- and_return([[["pkg0", Gem::Version.new("1.1.0")], nil]])
67
- assert_equal [['pkg0', '>= 0.9']], gem_manager.filter_uptodate_packages([['pkg0', '>= 0.9']])
68
- end
69
-
70
- def test_filter_uptodate_packages_with_same_package
71
- fake_installed_package = flexmock("fake installed pgk0", :version => Gem::Version.new("1.0.0"))
72
-
73
- dep = Gem::Dependency.new("pkg0", Gem::Requirement.new('>= 0'))
74
- gem_spec.should_receive(:find_by_name).with('pkg0', Gem::Requirement.new('>= 0')).and_return(fake_installed_package)
75
- gem_fetcher.should_receive("find_matching").with(dep, true, true, false).
76
- and_return([[["pkg0", Gem::Version.new("1.0.0")], nil]])
77
- assert_equal [], gem_manager.filter_uptodate_packages([['pkg0']])
78
- end
79
-
80
- def test_filter_uptodate_packages_with_newer_installed_package
81
- fake_installed_package = flexmock("fake installed pgk0", :version => Gem::Version.new("1.1.0"))
82
-
83
- dep = Gem::Dependency.new("pkg0", Gem::Requirement.new('>= 0.9'))
84
- gem_spec.should_receive(:find_by_name).with('pkg0', Gem::Requirement.new('>= 0.9')).and_return(fake_installed_package)
85
- gem_fetcher.should_receive("find_matching").with(dep, true, true, false).
86
- and_return([[["pkg0", Gem::Version.new("1.0.0")], nil]])
87
- assert_equal [], gem_manager.filter_uptodate_packages([['pkg0', '>= 0.9']])
88
- end
89
-
90
- # Helper to have a shortcut for the default install options
91
- def default_install_options
92
- Autoproj::PackageManagers::GemManager.default_install_options
93
- end
94
-
95
- def test_install_packages
96
- PackageManagers::GemManager.with_prerelease = false
97
- PackageManagers::GemManager.with_doc = false
98
- subprocess = flexmock(Autobuild::Subprocess)
99
-
100
- packages = [['pkg0'], ['pkg1', '>= 0.5'], ['pkg2'], ['pkg3', '>= 0.9']]
101
- subprocess.should_receive(:run).
102
- with(any, any, any, any, 'mygem', 'install', *default_install_options, '--no-rdoc', '--no-ri', 'pkg0', 'pkg2').once
103
- subprocess.should_receive(:run).
104
- with(any, any, any, any, 'mygem', 'install', *default_install_options, '--no-rdoc', '--no-ri', 'pkg1', '-v', '>= 0.5').once
105
- subprocess.should_receive(:run).
106
- with(any, any, any, any, 'mygem', 'install', *default_install_options, '--no-rdoc', '--no-ri', 'pkg3', '-v', '>= 0.9').once
107
- gem_manager.install(packages)
108
- end
109
-
110
- def test_install_packages_with_doc
111
- PackageManagers::GemManager.with_prerelease = false
112
- PackageManagers::GemManager.with_doc = true
113
- subprocess = flexmock(Autobuild::Subprocess)
114
-
115
- packages = [['pkg0']]
116
- subprocess.should_receive(:run).
117
- with(any, any, any, any, 'mygem', 'install', *default_install_options, 'pkg0').once
118
- gem_manager.install([['pkg0']])
119
- end
120
-
121
- def test_install_packages_with_prerelease
122
- PackageManagers::GemManager.with_prerelease = true
123
- PackageManagers::GemManager.with_doc = true
124
- subprocess = flexmock(Autobuild::Subprocess)
125
-
126
- subprocess.should_receive(:run).
127
- with(any, any, any, any, 'mygem', 'install', *default_install_options, '--prerelease', 'pkg0').once
128
- gem_manager.install([['pkg0']])
129
- end
130
-
131
- def test_install_packages_disabled_and_silent
132
- PackageManagers::GemManager.with_prerelease = true
133
- PackageManagers::GemManager.with_doc = true
134
- subprocess = flexmock(Autobuild::Subprocess)
135
- gem_manager.enabled = false
136
- gem_manager.silent = true
137
-
138
- subprocess.should_receive(:run).never
139
- flexmock(STDIN).should_receive(:readline).never.and_return
140
- gem_manager.install([['pkg0']])
141
- end
142
-
143
- def test_install_packages_disabled_and_not_silent
144
- PackageManagers::GemManager.with_prerelease = true
145
- PackageManagers::GemManager.with_doc = true
146
- subprocess = flexmock(Autobuild::Subprocess)
147
- gem_manager.enabled = false
148
- gem_manager.silent = false
149
-
150
- subprocess.should_receive(:run).never
151
- flexmock(STDIN).should_receive(:readline).once.and_return
152
- gem_manager.install([['pkg0']])
153
- end
154
- end
155
-
156
-