itamae 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78b2ddcd33e7a561766eee7a9eca3402bea98134
4
- data.tar.gz: 798f438bb9737dc2ca19406127a458de7f720cd2
3
+ metadata.gz: ed39f725974639e49b104beff6ed163593b68ef5
4
+ data.tar.gz: fc2124f50f0e4462c59f3fa9f3356fd1d020d19e
5
5
  SHA512:
6
- metadata.gz: af22254be79638d88283d7cc0e4d65ad959bd075ef1b515bf70bf1fffb664daa9285a7cc375de7bc89296699ab9d5a1bbb1f62dc49ff15715b9c73be250efef2
7
- data.tar.gz: d9c99923c430edc17c7186f4130f0132879c005c45bdfa642ec571e2060fcb6ce2fcc23b0951afe3acc2a466a03d3567a425a1cf96e950a8162250ec00d66508
6
+ metadata.gz: 06c9264266f724ea43217893168fb7db644f11d5f272c1f2706215a3af182a9663ea3e97bcd98cd033d5981023f52ad13e08f72a0dc0df993aee14965d348a30
7
+ data.tar.gz: 21de2f622a8f455decef223d196466664e94a48da02fe35a14af9ba2c16a27267c561a562b60ee1b4116dfd899c992c55d3e9bbe9a823ed30828792b6c684de2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v1.3.2
2
+
3
+ Features
4
+
5
+ - [Add `recursive` attribute to `git` resource (by @mmasaki)](https://github.com/itamae-kitchen/itamae/pull/140)
6
+
1
7
  ## v1.3.1
2
8
 
3
9
  Features
@@ -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
- run_command(['git', 'clone', attributes.repository, attributes.destination])
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
 
@@ -1 +1 @@
1
- 1.3.1
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.1
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-18 00:00:00.000000000 Z
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.2.2
280
+ rubygems_version: 2.4.5
281
281
  signing_key:
282
282
  specification_version: 4
283
283
  summary: Simple Configuration Management Tool