spiceweasel 0.5 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -31,6 +31,10 @@ This is the current, previous and future development milestones and contains the
31
31
  ===
32
32
  * support JSON and YAML
33
33
 
34
+ 0.6
35
+ ===
36
+ * add support for cookbook options
37
+
34
38
  BACKLOG
35
39
  =======
36
40
  * convert to a knife plugin (knife batchload from file infrastructure.yml)
data/README.md CHANGED
@@ -28,7 +28,8 @@ From the `example.json`:
28
28
  {"apache2":[]},
29
29
  {"apt":
30
30
  [
31
- "1.1.0"
31
+ "1.1.0",
32
+ "-B testing"
32
33
  ]
33
34
  },
34
35
  {"mysql":[]}
@@ -81,6 +82,7 @@ From the `example.yml`:
81
82
  - apache2:
82
83
  - apt:
83
84
  - 1.1.0
85
+ - -B testing
84
86
  - mysql:
85
87
 
86
88
  roles:
@@ -108,18 +110,19 @@ From the `example.yml`:
108
110
 
109
111
  Cookbooks
110
112
  ---------
111
- The `cookbooks` section of the JSON or YAML file currently supports `knife cookbook upload FOO` where `FOO` is the name of the cookbook in the `cookbooks` directory. If a version is passed, it is validated against an existing cookbook `metadata.rb` and if none is found, the missing cookbook is downloaded. The YAML snippet
113
+ The `cookbooks` section of the JSON or YAML file currently supports `knife cookbook upload FOO` where `FOO` is the name of the cookbook in the `cookbooks` directory. If a version is passed, it is validated against an existing cookbook `metadata.rb` and if none is found, the missing cookbook is downloaded. You may pass any additional arguments (ie. a Git branch) if necessary. The YAML snippet
112
114
 
113
115
  cookbooks:
114
116
  - apache2:
115
117
  - apt:
116
118
  - 1.1.0
119
+ - -B testing
117
120
  - mysql:
118
121
 
119
122
  produces the knife commands
120
123
 
121
124
  knife cookbook upload apache2
122
- knife cookbook site vendor apt 1.1.0
125
+ knife cookbook site vendor apt 1.1.0 -B testing
123
126
  knife cookbook upload apt
124
127
  knife cookbook upload mysql
125
128
 
data/bin/spiceweasel CHANGED
@@ -105,8 +105,10 @@ cookbooks = input['cookbooks'] || []
105
105
  cookbook_list = []
106
106
  cookbooks.each do |cookbook|
107
107
  cb = cookbook.keys.first
108
- #get the version if available
109
- version = cookbook[cb]
108
+ if cookbook[cb] and cookbook[cb].length > 0
109
+ version = cookbook[cb][0] || ""
110
+ args = cookbook[cb][1] || ""
111
+ end
110
112
  delete += "knife cookbook delete #{cb} #{version} -y\n"
111
113
  if File.directory?("cookbooks")
112
114
  if version and File.directory?("cookbooks/#{cb}")
@@ -117,7 +119,7 @@ cookbooks.each do |cookbook|
117
119
  exit(-1)
118
120
  end
119
121
  elsif !File.directory?("cookbooks/#{cb}")
120
- create += "knife cookbook site vendor #{cb} #{version}\n"
122
+ create += "knife cookbook site vendor #{cb} #{version} #{args}\n"
121
123
  end
122
124
  else
123
125
  STDERR.puts "cookbooks directory not found, validation and downloading skipped"
data/example.json CHANGED
@@ -4,7 +4,8 @@
4
4
  {"apache2":[]},
5
5
  {"apt":
6
6
  [
7
- "1.1.0"
7
+ "1.1.0",
8
+ "-B testing"
8
9
  ]
9
10
  },
10
11
  {"mysql":[]}
data/example.yml CHANGED
@@ -2,6 +2,7 @@ cookbooks:
2
2
  - apache2:
3
3
  - apt:
4
4
  - 1.1.0
5
+ - -B testing
5
6
  - mysql:
6
7
 
7
8
  roles:
@@ -1,3 +1,3 @@
1
1
  module Spiceweasel
2
- VERSION = "0.5"
2
+ VERSION = "0.6.1"
3
3
  end
data/spiceweasel.gemspec CHANGED
@@ -1,6 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
+ require "json"
4
+ require "mixlib/cli"
3
5
  require "spiceweasel/version"
6
+ require "yaml"
7
+
4
8
 
5
9
  Gem::Specification.new do |s|
6
10
  s.name = "spiceweasel"
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spiceweasel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 5
9
- version: "0.5"
8
+ - 6
9
+ - 1
10
+ version: 0.6.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Matt Ray
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-03-14 00:00:00 -10:00
18
+ date: 2011-03-30 00:00:00 -05:00
18
19
  default_executable:
19
20
  dependencies: []
20
21