itamae 1.10.7 → 1.10.8

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: 14acdfa4894556d3fcf3b3463f869b2e6d67b36897da33d4104d6e0309724117
4
- data.tar.gz: cfb6529c9da828e28bc3f9b33563333e87e6764e2570301fc604f1bb58b553df
3
+ metadata.gz: ac9a370a3cfe252c50053194c3051126b9ae6dea24d93500533b62d3b97f63b0
4
+ data.tar.gz: ad316689e12054b23b32925021dbda68f4b9dd1d8cc43a794577802228c7d425
5
5
  SHA512:
6
- metadata.gz: e72d8fd33859995abfe62bbc74f31af2bce16ea7f410b4c9ddef84b1a142a5c92182cf0845bff4043092e571e546cf7e57171c82f73a0ca6d39200d0908d9829
7
- data.tar.gz: 2cd158d444b8553131c38e5962c674a0a84b3e7f3a13637d1765042bfd896a80767f6bdc53cb467981bd3510e7e165cf19edb713d14b957fc1b4f8ba26210077
6
+ metadata.gz: 364c774f5b588aec726159179f7610a127de7c120f58b7ddbb08fcb0acb7406682895cfa6415325b44541cf8ef4b7a3ff8b6d6aa1a141dbefeedd3b2ea9f067b
7
+ data.tar.gz: 3cb245ad1f968348cca7e8c7b1f3c05f80697b1154dbf5ca5c5439ddd086643e0cc8a4b6e1d87c205e761c27798c1258f821976701e13f04c97d3121885315ba
@@ -29,6 +29,8 @@ matrix:
29
29
  include:
30
30
  - rvm: 2.6
31
31
  env: SPEC_RUBYOPT="--jit"
32
+ - rvm: 2.7
33
+ env: SPEC_RUBYOPT="--jit"
32
34
  - rvm: ruby-head
33
35
  env: SPEC_RUBYOPT="--jit"
34
36
  branches:
@@ -1,5 +1,14 @@
1
1
  ## Unreleased
2
- [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.7...master)
2
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.8...master)
3
+
4
+ ## v1.10.8
5
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.7...v1.10.8)
6
+
7
+ Improvements
8
+
9
+ - [Print "(in action_XXX)" as a debug log](https://github.com/itamae-kitchen/itamae/pull/315)
10
+ - [Reduce `check_package_is_installed` calling when package version is not specified](https://github.com/itamae-kitchen/itamae/pull/314)
11
+ - [Simplify Git resource's get_revision method](https://github.com/itamae-kitchen/itamae/pull/313)
3
12
 
4
13
  ## v1.10.7
5
14
  [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.6...v1.10.7)
@@ -195,6 +195,7 @@ module Itamae
195
195
  show_differences
196
196
 
197
197
  method_name = "action_#{action}"
198
+ Itamae.logger.debug "(in #{method_name})"
198
199
  if runner.dry_run?
199
200
  unless respond_to?(method_name)
200
201
  Itamae.logger.error "action #{action.inspect} is unavailable"
@@ -84,11 +84,11 @@ module Itamae
84
84
  end
85
85
 
86
86
  def get_revision(branch)
87
- result = run_command_in_repo("git rev-list #{shell_escape(branch)}", error: false)
88
- unless result.exit_status == 0
89
- fetch_origin!
90
- end
91
- run_command_in_repo("git rev-list #{shell_escape(branch)}").stdout.lines.first.strip
87
+ result = run_command_in_repo("git rev-parse #{shell_escape(branch)}", error: false)
88
+ return result.stdout.strip if result.exit_status == 0
89
+
90
+ fetch_origin!
91
+ run_command_in_repo("git rev-parse #{shell_escape(branch)}").stdout.strip
92
92
  end
93
93
 
94
94
  def fetch_origin!
@@ -24,6 +24,8 @@ module Itamae
24
24
  end
25
25
 
26
26
  def action_install(action_options)
27
+ return if !attributes.version && current.installed
28
+
27
29
  unless run_specinfra(:check_package_is_installed, attributes.name, attributes.version)
28
30
  run_specinfra(:install_package, attributes.name, attributes.version, attributes.options)
29
31
  updated!
@@ -31,7 +33,7 @@ module Itamae
31
33
  end
32
34
 
33
35
  def action_remove(action_options)
34
- if run_specinfra(:check_package_is_installed, attributes.name, nil)
36
+ if current.installed
35
37
  run_specinfra(:remove_package, attributes.name, attributes.options)
36
38
  updated!
37
39
  end
@@ -1,3 +1,3 @@
1
1
  module Itamae
2
- VERSION = "1.10.7"
2
+ VERSION = "1.10.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.7
4
+ version: 1.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-04-05 00:00:00.000000000 Z
13
+ date: 2020-05-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
331
  requirements: []
332
- rubygems_version: 3.0.3
332
+ rubygems_version: 3.1.2
333
333
  signing_key:
334
334
  specification_version: 4
335
335
  summary: Simple Configuration Management Tool