automateit 0.71101.2 → 0.71102

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- ,da�=r�K-�b��i��W�K��W�d�,��:��¼������T8/��=� h�M �9���*���t��aP��6��pվ��(8+�q���j��*��q���H�8?7?;V>Hy�8�s�΃R�� j]��j1q�7���&���0�������h���3#���6 �T�f��O
1
+ h�ɋ��r ��b6���\�Dn�U��&R�U2˘��ǣQ (}��& ��J���}2���"��u4�/)\ŒJ̽6�����OA�e
2
+ �Z���3Ǩ��1P��{��q5��ʚ��s�NN"v����>`�w�p.�F����ر~�z0����#j
@@ -1,3 +1,9 @@
1
+ 0.71102:
2
+ Date: Fri, 02 Nov 2007 02:59:41 -0700
3
+ Desc:
4
+ - Improved PackageManager::PEAR and PackageManager::PECL, can now :force installation of unstable packages.
5
+ - Refactored PackageManager spec and added :force to get PEAR and PECL to workaround systems that refuse to load the unstable testing packages.
6
+
1
7
  0.71101.2:
2
8
  Date: Thu, 01 Nov 2007 22:37:44 -0700
3
9
  Desc:
data/Rakefile CHANGED
@@ -182,6 +182,16 @@ task :publish do
182
182
  Rake::Task[:after].invoke
183
183
  end
184
184
 
185
+ task :tag do
186
+ automateit
187
+ sh "hg tag #{AutomateIt::VERSION}"
188
+ sh "hg tag -f stable"
189
+ end
190
+
191
+ task :push do
192
+ sh "hg push -r stable ../app_stable"
193
+ end
194
+
185
195
  #---[ Install and uninstall ]-------------------------------------------
186
196
 
187
197
  =begin
@@ -60,14 +60,20 @@ class ::AutomateIt::PackageManager::PEAR < ::AutomateIt::PackageManager::BaseDri
60
60
  # *IMPORTANT*: See documentation at the top of this file for how to correctly
61
61
  # install packages from a specific channel.
62
62
  #
63
+ # Options:
64
+ # * :force -- Force installation, needed when installing unstable packages
65
+ #
63
66
  # See AutomateIt::PackageManager#install
64
67
  def install(*packages)
65
68
  return _install_helper(*packages) do |list, opts|
66
69
  # pear options:
67
70
  # -a install all required dependencies
71
+ # -f force installation
68
72
 
69
73
  cmd = "(pear config-set auto_discover 1; "
70
- cmd << "pear install -a "+list.join(" ")+" < /dev/null)"
74
+ cmd << "pear install -a"
75
+ cmd << " -f" if opts[:force]
76
+ cmd << " "+list.join(" ")+" < /dev/null)"
71
77
  cmd << " > /dev/null" if opts[:quiet]
72
78
  cmd << " 2>&1"
73
79
 
@@ -46,13 +46,19 @@ class ::AutomateIt::PackageManager::PECL < ::AutomateIt::PackageManager::BaseDri
46
46
  return _not_installed_helper?(*packages)
47
47
  end
48
48
 
49
+ # Options:
50
+ # * :force -- Force installation, needed when installing unstable packages
51
+ #
49
52
  # See AutomateIt::PackageManager#install
50
53
  def install(*packages)
51
54
  return _install_helper(*packages) do |list, opts|
52
55
  # pecl options:
53
56
  # -a install all required dependencies
57
+ # -f force installation
54
58
 
55
- cmd = "pecl install -a "+list.join(" ")+" < /dev/null"
59
+ cmd = "pecl install -a"
60
+ cmd << " -f" if opts[:force]
61
+ cmd << " "+list.join(" ")+" < /dev/null"
56
62
  cmd << " > /dev/null" if opts[:quiet]
57
63
  cmd << " 2>&1"
58
64
 
@@ -1,7 +1,7 @@
1
1
  # See AutomateIt::Interpreter for usage information.
2
2
  module AutomateIt # :nodoc:
3
3
  # AutomateIt version
4
- VERSION=Gem::Version.new("0.71101.2")
4
+ VERSION=Gem::Version.new("0.71102")
5
5
 
6
6
  # Instantiates a new Interpreter. See documentation for
7
7
  # Interpreter#setup.
@@ -1,7 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
- cmd = 'gem install -y rake open4 activesupport rspec ruby-breakpoint ruby-debug --no-rdoc --no-ri'
3
+ cmd='sudo gem install -y rake open4 activesupport rspec ruby-breakpoint ruby-debug --no-rdoc --no-ri'
4
4
 
5
5
  # Run it twice because the first one will usually fail. Oh how I hate gem. :/
6
- $cmd
7
- $cmd
6
+ $cmd || $cmd
@@ -20,6 +20,17 @@ else
20
20
  @d.uninstall(@package, :quiet => true)
21
21
  end
22
22
 
23
+ def uninstall_package(packages, opts={})
24
+ opts[:quiet] = true
25
+ return @d.uninstall(packages, opts)
26
+ end
27
+
28
+ def install_package(packages, opts={})
29
+ opts[:quiet] = true
30
+ opts[:force] = [:pecl, :pear].include?(@d.token)
31
+ return @d.install(packages, opts)
32
+ end
33
+
23
34
  # Some specs below leave side-effects which others depend on, although
24
35
  # these are clearly documented within the specs. This is necessary
25
36
  # because doing proper setup/teardown for each test would make it run 5x
@@ -28,18 +39,18 @@ else
28
39
 
29
40
  it "should not install an invalid package" do
30
41
  @d.log.silence(Logger::FATAL) do
31
- lambda{ @d.install(@fake_package, :quiet => true) }.should raise_error(ArgumentError)
42
+ lambda{ install_package(@fake_package) }.should raise_error(ArgumentError)
32
43
  end
33
44
  end
34
45
 
35
46
  it "should install a package" do
36
- @d.install(@package, :quiet => true).should be_true
47
+ install_package(@package).should be_true
37
48
  # Leaves behind an installed package
38
49
  end
39
50
 
40
51
  it "should not re-install an installed package" do
41
52
  # Expects package to be installed
42
- @d.install(@package, :quiet => true).should be_false
53
+ install_package(@package).should be_false
43
54
  end
44
55
 
45
56
  it "should find an installed package" do
@@ -61,11 +72,11 @@ else
61
72
 
62
73
  it "should uninstall a package" do
63
74
  # Expects package to be installed
64
- @d.uninstall(@package, :quiet => true).should be_true
75
+ uninstall_package(@package).should be_true
65
76
  end
66
77
 
67
78
  it "should not uninstall a package that's not installed" do
68
- @d.uninstall(@package, :quiet => true).should be_false
79
+ uninstall_package(@package).should be_false
69
80
  end
70
81
  end
71
82
 
@@ -90,6 +101,8 @@ else
90
101
  targets.each_pair do |driver_token, package|
91
102
  # Run the following from the shell to skip package tests:
92
103
  # export AUTOMATEIT_SPEC_SKIP_PACKAGES=1
104
+ # Or clear it out:
105
+ # unset AUTOMATEIT_SPEC_SKIP_PACKAGES
93
106
  next unless ENV["AUTOMATEIT_SPEC_SKIP_PACKAGES"].nil?
94
107
 
95
108
  driver = INTERPRETER.package_manager[driver_token]
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: automateit
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.71101.2
7
- date: 2007-11-01 00:00:00 -07:00
6
+ version: "0.71102"
7
+ date: 2007-11-02 00:00:00 -07:00
8
8
  summary: AutomateIt is an open source tool for automating the setup and maintenance of servers, applications and their dependencies.
9
9
  require_paths:
10
10
  - lib
metadata.gz.sig CHANGED
Binary file