itamae 1.13.1 → 1.14.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe0f84c4cba9521d5565bbb6a4dd6d665a74db6b18d69fb31d2b4486af07b1de
4
- data.tar.gz: b4a8e95a18c6c3bb45011de13d46eed4a369aae7c2ce14d873504a5f681336e4
3
+ metadata.gz: debb90e8d8638159b905091113dcc1ad56712b698106eb2d203b1f0e1200a62b
4
+ data.tar.gz: 4fa5db8123957e48ed172858de9d5decb08bb05838b1eafd119d0427915d703d
5
5
  SHA512:
6
- metadata.gz: 344b69e231945022ff4339df1934e4e79c31375957e9c370eafffcdbbeb4347d4593731fb0b71dd56f6b178a325a695a403bd5368429004c1f0f0cd321198220
7
- data.tar.gz: db79a8ae7ea735a2a7dd8e1988a521500853d5e36ee4348bda70ce6c123ad5ce1dda0ef792db199448e77950ccdeaee9ae6d865149c0276741a458f5fb2239e9
6
+ metadata.gz: 550f1580b5fc523622247738a3e3cbbc0a61996144f3f8a088f05ea2f061154fb4e1e20ea598d4a62891bb99234b1ef45c8867c191ddf5aa5a285d2410e70192
7
+ data.tar.gz: b99054cf2c631b478bdbe18879d4db7d4e61d5d4864745c29e54d06d8f12c9f78ceae8cf484857d8e7ce7d3a9c5674985f0d536a3f26db5e2c21fa68989d98b4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Unreleased
2
- [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.13.1...master)
2
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.14.0...master)
3
+
4
+ # v1.14.0
5
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.13.1...v1.14.0)
6
+
7
+ Bugfixes
8
+
9
+ - [Execute local_ruby_block code inside of chdir-ed block if cwd presented](https://github.com/itamae-kitchen/itamae/pull/355)
10
+
3
11
 
4
12
  ## v1.13.1
5
13
  [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.13.0...v1.13.1)
@@ -5,7 +5,13 @@ module Itamae
5
5
  define_attribute :block, type: Proc
6
6
 
7
7
  def action_run(options)
8
- attributes.block.call
8
+ if attributes[:cwd]
9
+ Dir.chdir(attributes[:cwd]) do
10
+ attributes.block.call
11
+ end
12
+ else
13
+ attributes.block.call
14
+ end
9
15
  end
10
16
  end
11
17
  end
@@ -1,3 +1,3 @@
1
1
  module Itamae
2
- VERSION = "1.13.1"
2
+ VERSION = "1.14.0"
3
3
  end
@@ -527,6 +527,15 @@ local_ruby_block 'execute run_command' do
527
527
  end
528
528
  end
529
529
 
530
+ local_ruby_block "pwd with cwd attribute" do
531
+ cwd "/tmp"
532
+ block do
533
+ unless `pwd`.chomp == "/tmp"
534
+ raise "working directory mismatched"
535
+ end
536
+ end
537
+ end
538
+
530
539
  execute "touch /tmp/subscribed_from_parent" do
531
540
  action :nothing
532
541
  subscribes :run, 'execute[subscribed from parent]'
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.1
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  - Yusuke Nakamura
9
9
  - sue445
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-06-21 00:00:00.000000000 Z
13
+ date: 2022-07-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -200,7 +200,7 @@ dependencies:
200
200
  - - ">="
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
- description:
203
+ description:
204
204
  email:
205
205
  - ryota.arai@gmail.com
206
206
  - yusuke1994525@gmail.com
@@ -317,7 +317,7 @@ metadata:
317
317
  source_code_uri: https://github.com/itamae-kitchen/itamae
318
318
  changelog_uri: https://github.com/itamae-kitchen/itamae/blob/master/CHANGELOG.md
319
319
  rubygems_mfa_required: 'true'
320
- post_install_message:
320
+ post_install_message:
321
321
  rdoc_options: []
322
322
  require_paths:
323
323
  - lib
@@ -332,8 +332,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
332
  - !ruby/object:Gem::Version
333
333
  version: '0'
334
334
  requirements: []
335
- rubygems_version: 3.3.7
336
- signing_key:
335
+ rubygems_version: 3.2.3
336
+ signing_key:
337
337
  specification_version: 4
338
338
  summary: Simple Configuration Management Tool
339
339
  test_files: