supply_drop 0.15.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -125,4 +125,12 @@ If you write anything complicated, write a test for it. Test that your changes w
125
125
  * Dave Pirotte [dpirotte](https://github.com/dpirotte "github")
126
126
  * Mike Pilat [mikepilat](https://github.com/mikepilat "github")
127
127
  * Dan Manges [dan-manges](https://github.com/dan-manges "github") (one soda's worth)
128
- * Brian Cosgrove [cosgroveb](https://github.com/cosgroveb "github")
128
+ * Brian Cosgrove [cosgroveb](https://github.com/cosgroveb "github")
129
+
130
+ Copyright (c) 2012-2013 Tony Pitluga
131
+
132
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
133
+
134
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
135
+
136
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -36,14 +36,14 @@ module SupplyDrop
36
36
  #
37
37
  def ssh_options(options)
38
38
  mapped_options = options.map do |key, value|
39
- next unless value
39
+ next if value.nil?
40
40
 
41
41
  case key
42
42
  when :auth_methods then opt_auth_methods(value)
43
43
  when :bind_address then opt('BindAddress', value)
44
44
  when :compression then opt('Compression', value ? 'yes' : 'no')
45
45
  when :compression_level then opt('CompressionLevel', value.to_i)
46
- when :config then "-F '#{value}'"
46
+ when :config then value ? "-F '#{value}'" : nil
47
47
  when :encryption then opt('Ciphers', [value].flatten.join(','))
48
48
  when :forward_agent then opt('ForwardAgent', value)
49
49
  when :global_known_hosts_file then opt('GlobalKnownHostsFile', value)
@@ -37,6 +37,22 @@ Capistrano::Configuration.instance.load do
37
37
  run "mkdir -p #{puppet_destination}"
38
38
  run "#{sudo} yum -y install puppet rsync"
39
39
  end
40
+
41
+ namespace :puppetlabs do
42
+
43
+ desc "setup the puppetlabs repo, then install via the normal method"
44
+ task :ubuntu do
45
+ run "echo deb http://apt.puppetlabs.com/ $(lsb_release -sc) main | #{sudo} tee /etc/apt/sources.list.d/puppet.list"
46
+ run "echo deb http://apt.puppetlabs.com/ $(lsb_release -sc) dependancies | #{sudo} tee -a /etc/apt/sources.list.d/puppet.list"
47
+ run "#{sudo} apt-key adv --keyserver keyserver.ubuntu.com --recv 4BD6EC30"
48
+ puppet.bootstrap.ubuntu
49
+ end
50
+
51
+ desc "setup the puppetlabs repo, then install via the normal method"
52
+ task :redhat do
53
+ logger.info "PuppetLabs::RedHat bootstrap is not implemented yet"
54
+ end
55
+ end
40
56
  end
41
57
 
42
58
  desc "checks the syntax of all *.pp and *.erb files"
@@ -75,6 +91,19 @@ Capistrano::Configuration.instance.load do
75
91
  end
76
92
  end
77
93
 
94
+ desc "an atomic way to noop and apply changes while maintaining a lock"
95
+ task :noop_apply, :except => { :nopuppet => true } do
96
+ supply_drop.lock
97
+ transaction do
98
+ on_rollback { supply_drop.unlock }
99
+ supply_drop.prepare
100
+ update_code
101
+ supply_drop.noop
102
+ supply_drop.apply if Capistrano::CLI.ui.agree("Apply? (yes/no) ")
103
+ supply_drop.unlock
104
+ end
105
+ end
106
+
78
107
  desc "applies the current puppet config to the server"
79
108
  task :apply, :except => { :nopuppet => true } do
80
109
  supply_drop.lock
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supply_drop
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
- - 15
7
+ - 16
9
8
  - 0
10
- version: 0.15.0
9
+ version: 0.16.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Tony Pitluga
@@ -16,17 +15,16 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2013-02-05 00:00:00 Z
18
+ date: 2013-07-26 00:00:00 -07:00
19
+ default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: capistrano
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 49
30
28
  segments:
31
29
  - 2
32
30
  - 5
@@ -47,7 +45,6 @@ extra_rdoc_files: []
47
45
  files:
48
46
  - README.md
49
47
  - Rakefile
50
- - lib/supply_drop.rb
51
48
  - lib/supply_drop/async_enumerable.rb
52
49
  - lib/supply_drop/plugin.rb
53
50
  - lib/supply_drop/rsync.rb
@@ -58,36 +55,34 @@ files:
58
55
  - lib/supply_drop/writer/batched.rb
59
56
  - lib/supply_drop/writer/file.rb
60
57
  - lib/supply_drop/writer/streaming.rb
58
+ - lib/supply_drop.rb
59
+ has_rdoc: true
61
60
  homepage: http://github.com/pitluga/supply_drop
62
- licenses: []
63
-
61
+ licenses:
62
+ - MIT
64
63
  post_install_message:
65
64
  rdoc_options: []
66
65
 
67
66
  require_paths:
68
67
  - lib
69
68
  required_ruby_version: !ruby/object:Gem::Requirement
70
- none: false
71
69
  requirements:
72
70
  - - ">="
73
71
  - !ruby/object:Gem::Version
74
- hash: 3
75
72
  segments:
76
73
  - 0
77
74
  version: "0"
78
75
  required_rubygems_version: !ruby/object:Gem::Requirement
79
- none: false
80
76
  requirements:
81
77
  - - ">="
82
78
  - !ruby/object:Gem::Version
83
- hash: 3
84
79
  segments:
85
80
  - 0
86
81
  version: "0"
87
82
  requirements: []
88
83
 
89
84
  rubyforge_project:
90
- rubygems_version: 1.8.24
85
+ rubygems_version: 1.3.6
91
86
  signing_key:
92
87
  specification_version: 3
93
88
  summary: Masterless puppet with capistrano