batali 0.2.24 → 0.2.26
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 +3 -0
- data/README.md +7 -0
- data/lib/batali/origin/git.rb +8 -5
- data/lib/batali/source/git.rb +2 -1
- data/lib/batali/unit_loader.rb +7 -6
- data/lib/batali/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dac0de77697b201893a7f171b36a7e27031936f2
|
4
|
+
data.tar.gz: d7ee1c50669c8a4c8ffcd818813c2fa07a998811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c066c8150764c5cbf92d6e28448f3c0d243c2417dd3371265154822049c8c51ae23c2790c7642722103cf12eceef48d638436c36dac9d18f6dfe796cb756f315
|
7
|
+
data.tar.gz: 42b2598fd903b77feed6e5d1c2c0444ddc364ab3f1301e5a03bf408f9f6729b19b6db90e4ca13e459198be6be66be43ea910aa2c4e498fc581f618a5e3027a79
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -114,6 +114,13 @@ Git sources are defined via cookbook entries:
|
|
114
114
|
cookbook 'example', git: 'git://git.example.com/example-repo.git', ref: 'master'
|
115
115
|
```
|
116
116
|
|
117
|
+
In some crazy instances, you may have a cookbook located in the subdirectory of
|
118
|
+
a git repository:
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
cookbook 'example', git: 'git://git.example.com/example-repo.git', ref: 'master', path: 'my-cookbook'
|
122
|
+
```
|
123
|
+
|
117
124
|
### Least Impact Updates
|
118
125
|
|
119
126
|
After a `batali.manifest` file has been generated, subsequent `resolve` requests
|
data/lib/batali/origin/git.rb
CHANGED
@@ -7,11 +7,10 @@ module Batali
|
|
7
7
|
class Git < Path
|
8
8
|
|
9
9
|
include Batali::Git
|
10
|
+
attribute :path, String, :required => false
|
11
|
+
attribute :subdirectory, String
|
10
12
|
|
11
13
|
def initialize(args={})
|
12
|
-
unless(args[:path])
|
13
|
-
args[:path] = '/dev/null'
|
14
|
-
end
|
15
14
|
super
|
16
15
|
self.identifier = Smash.new(
|
17
16
|
:url => url,
|
@@ -29,7 +28,7 @@ module Batali
|
|
29
28
|
items.first.source = Source::Git.new(
|
30
29
|
:url => url,
|
31
30
|
:ref => ref,
|
32
|
-
:
|
31
|
+
:subdirectory => subdirectory
|
33
32
|
)
|
34
33
|
items
|
35
34
|
end
|
@@ -38,7 +37,11 @@ module Batali
|
|
38
37
|
# @return [Smash] metadata information
|
39
38
|
def load_metadata
|
40
39
|
fetch_repo
|
41
|
-
|
40
|
+
original_path = path.dup
|
41
|
+
self.path = File.join(*[path, subdirectory].compact)
|
42
|
+
result = super
|
43
|
+
self.path = original_path
|
44
|
+
result
|
42
45
|
end
|
43
46
|
|
44
47
|
# @return [String] path to repository
|
data/lib/batali/source/git.rb
CHANGED
@@ -11,12 +11,13 @@ module Batali
|
|
11
11
|
include Bogo::Memoization
|
12
12
|
include Batali::Git
|
13
13
|
|
14
|
+
attribute :subdirectory, String
|
14
15
|
attribute :path, String
|
15
16
|
|
16
17
|
# @return [String] directory containing contents
|
17
18
|
def asset
|
18
19
|
clone_repository
|
19
|
-
self.path = ref_dup
|
20
|
+
self.path = File.join(*[ref_dup, subdirectory].compact)
|
20
21
|
super
|
21
22
|
end
|
22
23
|
|
data/lib/batali/unit_loader.rb
CHANGED
@@ -27,18 +27,19 @@ module Batali
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
file.cookbook.each do |ckbk|
|
30
|
-
if(ckbk.
|
31
|
-
source = Origin::Path.new(
|
32
|
-
:name => ckbk.name,
|
33
|
-
:path => ckbk.path
|
34
|
-
)
|
35
|
-
elsif(ckbk.git)
|
30
|
+
if(ckbk.git)
|
36
31
|
source = Origin::Git.new(
|
37
32
|
:name => ckbk.name,
|
38
33
|
:url => ckbk.git,
|
34
|
+
:subdirectory => ckbk.path,
|
39
35
|
:ref => ckbk.ref || 'master',
|
40
36
|
:cache => cache
|
41
37
|
)
|
38
|
+
elsif(ckbk.path)
|
39
|
+
source = Origin::Path.new(
|
40
|
+
:name => ckbk.name,
|
41
|
+
:path => ckbk.path
|
42
|
+
)
|
42
43
|
end
|
43
44
|
if(source)
|
44
45
|
system.add_unit(source.units.first)
|
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.26
|
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-09-
|
11
|
+
date: 2015-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attribute_struct
|
@@ -242,9 +242,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
244
|
rubyforge_project:
|
245
|
-
rubygems_version: 2.
|
245
|
+
rubygems_version: 2.4.8
|
246
246
|
signing_key:
|
247
247
|
specification_version: 4
|
248
248
|
summary: Magic
|
249
249
|
test_files: []
|
250
|
-
has_rdoc:
|