baptize 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzU2MjAxMzk0MmY0MjFmNmU2NTkxYTI0ZTA4NGJmOGYwNjAyYzE3Nw==
4
+ YTg1ZmMwMjhjMjhiZjQ0NGNjZWYwMTQ5MmU2NzdhYzgyZjMxMDNlYg==
5
5
  data.tar.gz: !binary |-
6
- OWY5ZjY4NDAyNWEzMGIwMmU1ZThjYTMxMzIwZGFhMGRlNTRlZDVmMg==
6
+ MmQzNmY4NzZlNTM2NWE5NWI4MjIzMTkyYzZjYmExNWMxZDlkMDZjOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MGE5ZDk0NzU0ZGQxYThmY2NhZGVmNmNmMmJiMmM3M2ViNDNiMzI1MjA0ZDZj
10
- N2E3MTRhYTdjYzc1N2U5MTQ3YjZhMmEwNzk4ZDhlMTg4NDQ3NzEzYzE5NTY0
11
- YzQ4ZWQ1ODUzMmExZTY2ZDM1Y2QwOWFkOGM3N2VmNGNhMDY5MmI=
9
+ ZWI3Njc5ZDY2NDgyNmE2MzRmMGQ4NzEwMDk1ZGZlOTFiOGRkNDdiNjVhYWFl
10
+ YTgyY2IxZjU0YWU2NDdhM2ZlOTllNGRlMDg1Yzc3YWU5NGUxZTY3YzZmYjZi
11
+ ZDU0ZDVmYzYwOTRlMzg4NjIyZmRhZGY0NjM1NzBkMmMyODMwMTU=
12
12
  data.tar.gz: !binary |-
13
- NTA2MDA5ODliMWM4OTNjOTRhNjJjZTg0OTFkMmU0YjY1ODQ5ZDIwZTIxYzM4
14
- OWU5N2I3YTYwOGRlM2FjMjlkNDU3ODk4ZTg5MjBlMDBjNzY4NmE2MjUzZDEw
15
- M2RhMzQ4MDYxNGYwOWE3YmQ0MGUwYTg0YzRkYTYwMGU5NTc1ZDQ=
13
+ MjdiY2E5NmVmMWYzNzcxMmNhZWVhMzk0M2QwNmVmZDViZTc3NTJhYmU2MDRj
14
+ N2VjN2UyMjQ0MjdlNWE0YTgwMWM5MWEyNGJhNjUzZTllZDUxMjU3MjNjYWVi
15
+ ZGZlMzdiYjg5OTc5YjVmMjc2OWNlZDQ2NzJkZGMyZGJkNmRmYmQ=
@@ -48,38 +48,37 @@ module Capistrano
48
48
  end
49
49
  end
50
50
  end # end namespace policies
51
+ end # end namespace baptize
51
52
 
52
- namespace :ssh do
53
- desc "Describe available ssh connections"
54
- task :default do
55
- load_configuration
53
+ namespace :ssh do
54
+ desc "Describe available ssh connections"
55
+ task :default do
56
+ count = 1
57
+ roles.each do |name,servers|
58
+ servers.each do |host|
59
+ puts "cap ssh:#{count} (#{name}) #{host}"
60
+ count = count + 1
61
+ end
62
+ end
63
+ end
64
+
65
+ 1.upto(10).each do |num|
66
+ task num.to_s.to_sym do
56
67
  count = 1
57
68
  roles.each do |name,servers|
58
69
  servers.each do |host|
59
- puts "cap baptize:ssh:#{count} (#{name}) #{host}"
70
+ if count == num
71
+ command = "ssh -i #{ssh_options[:keys]} #{user}@#{host}"
72
+ puts command
73
+ exec command
74
+ end
60
75
  count = count + 1
61
76
  end
62
77
  end
63
78
  end
79
+ end
80
+ end # end namespace ssh
64
81
 
65
- 1.upto(10).each do |num|
66
- task num.to_s.to_sym do
67
- load_configuration
68
- count = 1
69
- roles.each do |name,servers|
70
- servers.each do |host|
71
- if count == num
72
- command = "ssh -i #{ssh_options[:keys]} #{user}@#{host}"
73
- puts "ssh -i #{ssh_options[:keys]} #{user}@#{host}"
74
- exec command
75
- end
76
- count = count + 1
77
- end
78
- end
79
- end
80
- end
81
- end # end namespace ssh
82
- end # end namespace baptize
83
82
  end
84
83
 
85
84
  end
@@ -0,0 +1,26 @@
1
+ module Capistrano
2
+ module Baptize
3
+ module Plugins
4
+ module Gem
5
+
6
+ def gem(package_name, options = {})
7
+ cmd = "gem install #{package_name}"
8
+ cmd << " --version '#{options[:version]}'" if options[:version]
9
+ cmd << " --source #{options[:source]}" if options[:source]
10
+ cmd << " --install-dir #{options[:repository]}" if options[:repository]
11
+ cmd << " --no-rdoc --no-ri" unless options[:build_docs]
12
+ cmd << " --http-proxy #{options[:http_proxy]}" if options[:http_proxy]
13
+ cmd << " -- #{options[:build_flags]}" if options[:build_flags]
14
+ run "TERM= #{cmd}"
15
+ end
16
+
17
+ def has_gem(package_name, options = {})
18
+ version = options[:version] ? "--version '#{options[:version]}'" : ''
19
+ cmd = "gem list '#{package_name}' --installed #{version} > /dev/null"
20
+ raise VerificationFailure, "Gem #{package_name} not installed" unless remote_assert cmd
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baptize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-24 00:00:00.000000000 Z
11
+ date: 2013-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -38,11 +38,13 @@ files:
38
38
  - lib/baptize/install.rb
39
39
  - lib/baptize/plugins/apt.rb
40
40
  - lib/baptize/plugins/base.rb
41
+ - lib/baptize/plugins/gem.rb
41
42
  - lib/baptize/plugins/pecl.rb
42
43
  - lib/baptize/plugins/transfer.rb
43
44
  - README.markdown
44
45
  homepage: http://github.com/troelskn/baptize
45
- licenses: []
46
+ licenses:
47
+ - MIT
46
48
  metadata: {}
47
49
  post_install_message:
48
50
  rdoc_options: []