itamae 1.10.3 → 1.10.4

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: 942ff87322e63633982fa6f7720817a6ea7b5752e5d98f6ab2430e081f096424
4
- data.tar.gz: 4c8cef5f50960239692a9e5a5002f1bc79dbe958a7ac2f3e2cd15f414b410def
3
+ metadata.gz: 82dd01a32c405393a246ff76a24d38dd8c8d2be8e9d12d7caee8d4b2217422b0
4
+ data.tar.gz: 90fb7f261a2bebf3ce508f02aeff0f85aafb85aa9be8f3ee269a6c7331601eb4
5
5
  SHA512:
6
- metadata.gz: '0391d1154a6e21eaaad3d9e96a494fc18a3f55b7e26254f28da43632be101e5128c08ccc54e4aa5adccf2f5723754cf810bb235890215498c9c1b959b3d28924'
7
- data.tar.gz: 4135bdda547710499879432c71ad02d549f1e9cdf6c16be89ab97592c59dfd334c8830b93ddbeaa50d4dc400842f03874d643795f6cb349f0f3cb30249e90dfb
6
+ metadata.gz: bdc1dd2ca515d96d8f533b76eea22f870a0b4801d2ac99609db426d010cf903898c260fc0a70e3a37b14491e27c7760052a43442ba1d9f8da3f0928371a3120b
7
+ data.tar.gz: 1acf2132716dbd46c378c8093a3c21d00bb2fe210030634264e8cbcc8830a3a3760ba467857c55221a1a46501dcc92fd60494a931f14f39aa71cd1f79bd54c7c
@@ -1,5 +1,19 @@
1
1
  ## Unreleased
2
- [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.3...master)
2
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.4...master)
3
+
4
+ ## v1.10.4
5
+ [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.3...v1.10.4)
6
+
7
+ Bugfixes
8
+
9
+ - [Suppress Ruby warnings (by @pocke)](https://github.com/itamae-kitchen/itamae/pull/284)
10
+ - [Suppress Ruby warning (by @pocke)](https://github.com/itamae-kitchen/itamae/pull/287)
11
+ - [Run test cases correctly (by @pocke)](https://github.com/itamae-kitchen/itamae/pull/289)
12
+
13
+ Improvements
14
+
15
+ - [Add description to --tag option of docker subcommand (by @pocke)](https://github.com/itamae-kitchen/itamae/pull/286)
16
+ - [Refine `itamae docker`'s created message (by @pocke)](https://github.com/itamae-kitchen/itamae/pull/288)
3
17
 
4
18
  ## v1.10.3
5
19
  [full changelog](https://github.com/itamae-kitchen/itamae/compare/v1.10.2...v1.10.3)
data/Rakefile CHANGED
@@ -69,7 +69,7 @@ namespace :spec do
69
69
  RSpec::Core::RakeTask.new(target.to_sym) do |t|
70
70
  ENV['DOCKER_CONTAINER'] = container_name
71
71
  t.ruby_opts = '-I ./spec/integration'
72
- t.pattern = "spec/integration/[default|docker]_spec.rb"
72
+ t.pattern = "spec/integration/{default,docker}_spec.rb"
73
73
  end
74
74
  end
75
75
 
@@ -9,7 +9,7 @@ module Specinfra
9
9
  module Configuration
10
10
  def self.sudo_password
11
11
  return ENV['SUDO_PASSWORD'] if ENV['SUDO_PASSWORD']
12
- return @sudo_password if @sudo_password
12
+ return @sudo_password if defined?(@sudo_password)
13
13
 
14
14
  # TODO: Fix this dirty hack
15
15
  return nil unless caller.any? {|call| call.include?('channel_data') }
@@ -292,7 +292,9 @@ module Itamae
292
292
  /\A(?<repo>.+?)(?:|:(?<tag>[^:]+))\z/.match(@options[:tag]) do |m|
293
293
  image.tag(repo: m[:repo], tag: m[:tag])
294
294
  end
295
- Itamae.logger.info "Image created: #{image.id}"
295
+ log_message = "Image created: #{image.id}"
296
+ log_message << ", and tagged as #{@options[:tag]}" if @options[:tag]
297
+ Itamae.logger.info log_message
296
298
  end
297
299
 
298
300
  private
@@ -64,7 +64,7 @@ module Itamae
64
64
  option :image, type: :string, desc: "This option or 'container' option is required."
65
65
  option :container, type: :string, desc: "This option or 'image' option is required."
66
66
  option :tls_verify_peer, type: :boolean, default: true
67
- option :tag, type: :string
67
+ option :tag, type: :string, desc: 'Tag name of created docker image.'
68
68
  def docker(*recipe_files)
69
69
  if recipe_files.empty?
70
70
  raise "Please specify recipe files."
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  class Definition < Resource::Base
5
3
  class << self
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'logger'
3
2
  require 'ansi/code'
4
3
 
@@ -72,6 +71,10 @@ module Itamae
72
71
  class Formatter
73
72
  attr_accessor :colored
74
73
 
74
+ def initialize
75
+ @color = nil
76
+ end
77
+
75
78
  def call(severity, datetime, progname, msg)
76
79
  log = "%s : %s" % ["%5s" % severity, msg2str(msg)]
77
80
 
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'hashie'
3
2
  require 'json'
4
3
  require 'schash'
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  class Notification < Struct.new(:defined_in_resource, :action, :target_resource_desc, :timing)
5
3
  def self.create(*args)
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  class Recipe
5
3
  NotFoundError = Class.new(StandardError)
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'itamae/resource/base'
3
2
  require 'itamae/resource/file'
4
3
  require 'itamae/resource/package'
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'shellwords'
3
2
  require 'hashie'
4
3
 
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Directory < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Execute < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class File < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class GemPackage < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Git < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Group < Base
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'uri'
3
2
  require 'net/https'
4
3
 
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Link < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class LocalRubyBlock < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Package < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class RemoteDirectory < Base
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class RemoteFile < File
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class Service < Base
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'erb'
3
2
  require 'tempfile'
4
3
 
@@ -1,5 +1,3 @@
1
- require 'itamae'
2
-
3
1
  module Itamae
4
2
  module Resource
5
3
  class User < Base
@@ -1,4 +1,3 @@
1
- require 'itamae'
2
1
  require 'json'
3
2
  require 'yaml'
4
3
 
@@ -1,3 +1,3 @@
1
1
  module Itamae
2
- VERSION = "1.10.3"
2
+ VERSION = "1.10.4"
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.3
4
+ version: 1.10.4
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: 2019-01-18 00:00:00.000000000 Z
13
+ date: 2019-05-10 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.1
332
+ rubygems_version: 3.0.3
333
333
  signing_key:
334
334
  specification_version: 4
335
335
  summary: Simple Configuration Management Tool