itamae 1.3.1 → 1.3.2
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 +6 -0
- data/lib/itamae/resource/git.rb +5 -1
- data/lib/itamae/version.txt +1 -1
- data/spec/integration/default_spec.rb +4 -0
- data/spec/integration/recipes/default.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed39f725974639e49b104beff6ed163593b68ef5
|
|
4
|
+
data.tar.gz: fc2124f50f0e4462c59f3fa9f3356fd1d020d19e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06c9264266f724ea43217893168fb7db644f11d5f272c1f2706215a3af182a9663ea3e97bcd98cd033d5981023f52ad13e08f72a0dc0df993aee14965d348a30
|
|
7
|
+
data.tar.gz: 21de2f622a8f455decef223d196466664e94a48da02fe35a14af9ba2c16a27267c561a562b60ee1b4116dfd899c992c55d3e9bbe9a823ed30828792b6c684de2
|
data/CHANGELOG.md
CHANGED
data/lib/itamae/resource/git.rb
CHANGED
|
@@ -9,6 +9,7 @@ module Itamae
|
|
|
9
9
|
define_attribute :destination, type: String, default_name: true
|
|
10
10
|
define_attribute :repository, type: String, required: true
|
|
11
11
|
define_attribute :revision, type: String
|
|
12
|
+
define_attribute :recursive, default: false
|
|
12
13
|
|
|
13
14
|
def pre_action
|
|
14
15
|
case @current_action
|
|
@@ -29,7 +30,10 @@ module Itamae
|
|
|
29
30
|
if run_specinfra(:check_file_is_directory, attributes.destination)
|
|
30
31
|
run_command_in_repo(['git', 'fetch', 'origin'])
|
|
31
32
|
else
|
|
32
|
-
|
|
33
|
+
cmd = ['git', 'clone']
|
|
34
|
+
cmd << '--recursive' if attributes.recursive
|
|
35
|
+
cmd << attributes.repository << attributes.destination
|
|
36
|
+
run_command(cmd)
|
|
33
37
|
new_repository = true
|
|
34
38
|
end
|
|
35
39
|
|
data/lib/itamae/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.3.
|
|
1
|
+
1.3.2
|
|
@@ -109,6 +109,10 @@ describe command('cd /tmp/git_repo && git rev-parse HEAD') do
|
|
|
109
109
|
its(:stdout) { should match(/3116e170b89dc0f7315b69c1c1e1fd7fab23ac0d/) }
|
|
110
110
|
end
|
|
111
111
|
|
|
112
|
+
describe command('cd /tmp/git_repo_submodule/empty_repo && cat README.md') do
|
|
113
|
+
its(:stdout) { should match(/Empty Repo/) }
|
|
114
|
+
end
|
|
115
|
+
|
|
112
116
|
describe file('/tmp/created_by_itamae_user') do
|
|
113
117
|
it { should be_file }
|
|
114
118
|
it { should be_owned_by 'itamae' }
|
|
@@ -211,6 +211,11 @@ git "/tmp/git_repo" do
|
|
|
211
211
|
revision "v0.1.0"
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
+
git "/tmp/git_repo_submodule" do
|
|
215
|
+
repository "https://github.com/mmasaki/fake_repo_including_submodule.git"
|
|
216
|
+
recursive true
|
|
217
|
+
end
|
|
218
|
+
|
|
214
219
|
#####
|
|
215
220
|
|
|
216
221
|
execute "echo -n $HOME > /tmp/created_by_itamae_user" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: itamae
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryota Arai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06
|
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
277
277
|
version: '0'
|
|
278
278
|
requirements: []
|
|
279
279
|
rubyforge_project:
|
|
280
|
-
rubygems_version: 2.
|
|
280
|
+
rubygems_version: 2.4.5
|
|
281
281
|
signing_key:
|
|
282
282
|
specification_version: 4
|
|
283
283
|
summary: Simple Configuration Management Tool
|