batali 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +10 -0
- data/batali.gemspec +1 -1
- data/bin/batali +8 -0
- data/lib/batali/command/display.rb +47 -0
- data/lib/batali/command/install.rb +1 -1
- data/lib/batali/command/resolve.rb +1 -1
- data/lib/batali/command.rb +9 -0
- data/lib/batali/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95116c2d6a246d0c41771808a3de9097db08e4f5
|
4
|
+
data.tar.gz: ba3506822b97ffe1fa18c200f734b395b876e03e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc4ac9054ff2bbb0e9e07c98a25cb44714c1f303da5714a85b633bc76a75867c39be50e9f7c44fc35ee9c3447afcf4cec346ae25db475500f1c46621a7f0deea
|
7
|
+
data.tar.gz: 41d22ff1c595f21414abae181d63a6a49ff870d3e2f4a9250fa3d26679cd7f2fbe3471e9cd6ee08e73f0486a2387013ae9afff2ebc970ca140a89bd18563c484
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -95,6 +95,16 @@ Paths are defined via cookbook entries:
|
|
95
95
|
cookbook 'example', path: '/path/to/example'
|
96
96
|
```
|
97
97
|
|
98
|
+
A short cut is also available when you're Batali file is
|
99
|
+
located at the root of the cookbook you want to add:
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
metadata
|
103
|
+
```
|
104
|
+
|
105
|
+
This will extract the name from the `metadata` file and automatically
|
106
|
+
set the path `'.'`.
|
107
|
+
|
98
108
|
##### Git
|
99
109
|
|
100
110
|
Git sources are defined via cookbook entries:
|
data/batali.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.add_runtime_dependency 'attribute_struct', '~> 0.2.14'
|
14
14
|
s.add_runtime_dependency 'grimoire', '~> 0.2.6'
|
15
15
|
s.add_runtime_dependency 'bogo', '~> 0.1.20'
|
16
|
-
s.add_runtime_dependency 'bogo-cli', '~> 0.1.
|
16
|
+
s.add_runtime_dependency 'bogo-cli', '~> 0.1.23'
|
17
17
|
s.add_runtime_dependency 'bogo-config', '~> 0.1.10'
|
18
18
|
s.add_runtime_dependency 'bogo-ui', '~> 0.1.6'
|
19
19
|
s.add_runtime_dependency 'http', '~> 0.8.2'
|
data/bin/batali
CHANGED
@@ -16,6 +16,14 @@ Bogo::Cli::Setup.define do
|
|
16
16
|
on :f, :file, 'Path to Batali file'
|
17
17
|
end
|
18
18
|
|
19
|
+
command 'display' do
|
20
|
+
description 'Display manifest information'
|
21
|
+
self.instance_exec(&global_opts)
|
22
|
+
run do |opts, args|
|
23
|
+
Batali::Command::Display.new({:display => opts.to_hash}, args).execute!
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
19
27
|
command 'install' do
|
20
28
|
description 'Install cookbooks from manifest'
|
21
29
|
self.instance_exec(&global_opts)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'batali'
|
2
|
+
|
3
|
+
module Batali
|
4
|
+
class Command
|
5
|
+
|
6
|
+
# Display manifest information
|
7
|
+
class Display < Batali::Command
|
8
|
+
|
9
|
+
# Display information from manifest
|
10
|
+
def execute!
|
11
|
+
ui.puts ui.color('Batali manifest information:', :bold) + "\n"
|
12
|
+
display(arguments)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Display manifest information
|
16
|
+
#
|
17
|
+
# @param names [Array<String>] limit to given cookbooks
|
18
|
+
# @return [NilClass]
|
19
|
+
def display(ckbk_names)
|
20
|
+
info = Smash.new.tap do |ckbks|
|
21
|
+
manifest.cookbook.sort_by(&:name).each do |ckbk|
|
22
|
+
ckbks[ckbk.name] ||= []
|
23
|
+
ckbks[ckbk.name].push(ckbk)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
info.each do |name, ckbks|
|
27
|
+
next unless ckbk_names.empty? || ckbk_names.include?(name)
|
28
|
+
ui.puts " #{ui.color(name, :bold)}:"
|
29
|
+
ckbks.each do |ckbk|
|
30
|
+
ui.puts " Version: #{ckbk.version}"
|
31
|
+
case ckbk.source
|
32
|
+
when Batali::Source::Site
|
33
|
+
ui.puts " Source: #{URI.parse(ckbk.source.url).host}"
|
34
|
+
when Batali::Source::Git
|
35
|
+
ui.puts " Source: #{ckbk.source.url}"
|
36
|
+
ui.puts " Reference: #{ckbk.source.ref}"
|
37
|
+
when Batali::Source::Path
|
38
|
+
ui.puts " Source: #{ckbk.source.path}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
@@ -28,7 +28,7 @@ module Batali
|
|
28
28
|
end
|
29
29
|
asset_path = unit.source.asset
|
30
30
|
final_path = File.join(install_path, unit.name)
|
31
|
-
if(
|
31
|
+
if(infrastructure?)
|
32
32
|
final_path << "-#{unit.version}"
|
33
33
|
end
|
34
34
|
begin
|
@@ -29,7 +29,7 @@ module Batali
|
|
29
29
|
:system => system,
|
30
30
|
:score_keeper => score_keeper
|
31
31
|
)
|
32
|
-
if(
|
32
|
+
if(infrastructure?)
|
33
33
|
infrastructure_resolution(solv)
|
34
34
|
else
|
35
35
|
single_path_resolution(solv)
|
data/lib/batali/command.rb
CHANGED
@@ -10,6 +10,7 @@ module Batali
|
|
10
10
|
include Bogo::Memoization
|
11
11
|
|
12
12
|
autoload :Configure, 'batali/command/configure'
|
13
|
+
autoload :Display, 'batali/command/display'
|
13
14
|
autoload :Install, 'batali/command/install'
|
14
15
|
autoload :Resolve, 'batali/command/resolve'
|
15
16
|
autoload :Update, 'batali/command/update'
|
@@ -72,5 +73,13 @@ module Batali
|
|
72
73
|
end
|
73
74
|
end
|
74
75
|
|
76
|
+
# @return [TrueClass, FalseClass] infrastructure mode
|
77
|
+
def infrastructure?
|
78
|
+
config[:infrastructure] || (
|
79
|
+
config[:infrastructure].nil? &&
|
80
|
+
manifest.infrastructure
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
75
84
|
end
|
76
85
|
end
|
data/lib/batali/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: batali
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attribute_struct
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.
|
61
|
+
version: 0.1.23
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.
|
68
|
+
version: 0.1.23
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bogo-config
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/batali/chefspec.rb
|
197
197
|
- lib/batali/command.rb
|
198
198
|
- lib/batali/command/configure.rb
|
199
|
+
- lib/batali/command/display.rb
|
199
200
|
- lib/batali/command/install.rb
|
200
201
|
- lib/batali/command/resolve.rb
|
201
202
|
- lib/batali/command/update.rb
|
@@ -244,3 +245,4 @@ signing_key:
|
|
244
245
|
specification_version: 4
|
245
246
|
summary: Magic
|
246
247
|
test_files: []
|
248
|
+
has_rdoc:
|