dapp 0.7.14 → 0.7.15

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
  SHA1:
3
- metadata.gz: 4ce2d9eae2b707e324a8fe198e8812da6342ced8
4
- data.tar.gz: f2cfc51c7fc2aafc0372733f9ac2dbd53ca9d36f
3
+ metadata.gz: b8a256cc61e22e00c9abfc26ff0860c49382b926
4
+ data.tar.gz: 25358da2b7a4a8af4efb38b83bde69c13bb22673
5
5
  SHA512:
6
- metadata.gz: a59386e6321d5dfc75498774ced2c066911b7b2ad34c5412effafcb167ade6f251460dbb3f5038659c4d9d0f7bb90e60ec0e65d3ac160d784d03668fd2e722a4
7
- data.tar.gz: 24000f5eb37272682da2477cbda6eab34fe48bde926dbe1f1354dfca7500d78acbc3c4ae510416b6d8ee4d806f57dbc6348832d65b9cde750a16f80880d5d011
6
+ metadata.gz: fef0d8c1b13a04c091a163a7b22d0f56a747eddbcbfbfcc083b4e89abc69332a52bac3336ed5b2c2ff13818b0261a39407fa030ac16ee4f8708bf1c8c1bbb4f0
7
+ data.tar.gz: 5f268ddd3cbf112b663308dcfe1630ef4dbb4c37cdc314601e616b79e6024a28ae028c7ea6f43cc1eb75b14fb72caa13bf31c6858882e0cd5f99ddb153a2f06f
data/config/en/common.yml CHANGED
@@ -9,23 +9,23 @@ en:
9
9
  commands: "commands:"
10
10
  instructions: "instructions:"
11
11
  container:
12
- launched_command: "Launched command: '%{command}'"
12
+ launched_command: "Launched command: `%{command}`"
13
13
  system_shellout:
14
- launched_command: "Launched system-shellout command: '%{command}'"
14
+ launched_command: "Launched system-shellout command: `%{command}`"
15
15
  process:
16
- artifact_copy: "copying artifact '%{name}'"
17
- artifact_building: "building artifact '%{name}'"
18
- git_artifact_clone: "cloning remote git_artifact '%{name}'"
19
- git_artifact_fetch: "fetching remote git_artifact '%{name}'"
16
+ artifact_copy: "copying artifact `%{name}`"
17
+ artifact_building: "building artifact `%{name}`"
18
+ git_artifact_clone: "cloning remote git_artifact `%{name}`"
19
+ git_artifact_fetch: "fetching remote git_artifact `%{name}`"
20
20
  berks_vendor: 'vendoring cookbooks'
21
21
  chef_cookbooks_stage_berks_vendor: 'vendoring cookbooks for chef cookbooks stage'
22
- waiting_resouce_lock: "waiting for locked resource '%{name}'"
22
+ waiting_resouce_lock: "waiting for locked resource `%{name}`"
23
23
  gitartifact_container_creating: 'creating dappdeps/gitartifact container'
24
24
  base_container_creating: 'creating dappdeps/base container'
25
25
  chefdk_container_creating: 'creating dappdeps/chefdk container'
26
26
  system_shellout_container_starting: 'starting system-shellout container'
27
- image_pull: "pulling image '%{name}'"
28
- image_push: "pushing image '%{name}'"
27
+ image_pull: "pulling image `%{name}`"
28
+ image_push: "pushing image `%{name}`"
29
29
  status:
30
30
  process:
31
31
  pushing: '[PUSHING]'
@@ -47,12 +47,12 @@ en:
47
47
  pull: '[PULL]'
48
48
  tag: '[TAG]'
49
49
  warning:
50
- wrong_using_base_directive: "WARNING: Directive '%{directive}' has declared after dimg_group|dimg|artifact!"
51
- wrong_using_directive: "WARNING: Directive '%{directive}' has declared after dimg_group|dimg!"
52
- excess_builder_instruction: "WARNING: Excessive use of the 'builder' instruction. Builder type will be automatically determined by the first use of any builder."
53
- excess_name_instruction: "WARNING: Excessive use of the 'name' instruction. Given name corresponds to default name."
50
+ wrong_using_base_directive: "WARNING: Directive `%{directive}` has declared after dimg_group|dimg|artifact!"
51
+ wrong_using_directive: "WARNING: Directive `%{directive}` has declared after dimg_group|dimg!"
52
+ excess_builder_instruction: "WARNING: Excessive use of the `builder` instruction. Builder type will be automatically determined by the first use of any builder."
53
+ excess_name_instruction: "WARNING: Excessive use of the `name` instruction. Given name corresponds to default name."
54
54
  another_image_already_tagged: 'WARNING: image with other id already exist.'
55
- tag_ignored: "WARNING: tag '%{tag}' ignored."
55
+ tag_ignored: "WARNING: tag `%{tag}` ignored."
56
56
  dimg_not_found_in_registry: "WARNING: Dimg not found in registry."
57
57
  stage_artifact_rewritten: "WARNING: Artifact stage rewritten from %{conflict_stage} to %{stage}."
58
58
  group:
data/lib/dapp/cli/bp.rb CHANGED
@@ -15,7 +15,7 @@ Options:
15
15
  BANNER
16
16
  option :tmp_dir_prefix,
17
17
  long: '--tmp-dir-prefix PREFIX',
18
- description: 'Tmp directory prefix'
18
+ description: 'Tmp directory prefix (/tmp by default). Used for build process service directories.'
19
19
 
20
20
  option :lock_timeout,
21
21
  long: '--lock-timeout TIMEOUT',
@@ -14,7 +14,7 @@ Options:
14
14
  BANNER
15
15
  option :tmp_dir_prefix,
16
16
  long: '--tmp-dir-prefix PREFIX',
17
- description: 'Tmp directory prefix'
17
+ description: 'Tmp directory prefix (/tmp by default). Used for build process service directories.'
18
18
 
19
19
  option :lock_timeout,
20
20
  long: '--lock-timeout TIMEOUT',
@@ -12,7 +12,7 @@ module Dapp
12
12
  end
13
13
 
14
14
  def tmp_path(*path)
15
- @tmp_path ||= Dir.mktmpdir(project.cli_options[:tmp_dir_prefix] || 'dapp-')
15
+ @tmp_path ||= Dir.mktmpdir('dapp-', project.cli_options[:tmp_dir_prefix] || '/tmp')
16
16
  make_path(@tmp_path, *path).expand_path.tap { |p| p.parent.mkpath }
17
17
  end
18
18
 
@@ -11,7 +11,14 @@ module Dapp
11
11
  end
12
12
 
13
13
  def path
14
- @path ||= Pathname(git("-C #{dimg.home_path} rev-parse --git-dir").stdout.strip).expand_path
14
+ @path ||= begin
15
+ git_repo_path = Pathname(git("-C #{dimg.home_path} rev-parse --git-dir").stdout.strip)
16
+ if git_repo_path.relative?
17
+ File.join(dimg.home_path, git_repo_path)
18
+ else
19
+ git_repo_path
20
+ end
21
+ end
15
22
  end
16
23
 
17
24
  def latest_commit(branch = nil)
@@ -72,8 +72,7 @@ module Dapp
72
72
  raise Error::Build, code: :built_id_not_defined if from.built_id.nil?
73
73
  project.shellout!("docker run #{prepared_options} #{from.built_id} -ec '#{prepared_bash_command}'", log_verbose: true)
74
74
  rescue Error::Shellout => error
75
- project.log_info(desc: { code: :launched_command, data: { command: prepared_commands.join(' && ') }, context: :container },
76
- quiet: !project.log_verbose?)
75
+ project.log_warning(desc: { code: :launched_command, data: { command: prepared_commands.join(' && ') }, context: :container })
77
76
 
78
77
  raise unless project.introspect_error? || project.introspect_before_error?
79
78
  built_id = project.introspect_error? ? commit! : from.built_id
@@ -64,6 +64,7 @@ module Dapp
64
64
  kwargs[:style] = :warning
65
65
  kwargs[:desc] ||= {}
66
66
  kwargs[:desc][:context] ||= :warning
67
+ kwargs[:stream] ||= $stderr
67
68
  log(*args, **kwargs)
68
69
  end
69
70
 
@@ -72,13 +73,13 @@ module Dapp
72
73
  log_warning(*args, **kwargs)
73
74
  end
74
75
 
75
- def log(message = '', desc: nil, inline: false, quiet: false, **kwargs)
76
- return if quiet || log_quiet?
76
+ def log(message = '', desc: nil, inline: false, stream: $stdout, **kwargs)
77
+ return if log_quiet?
77
78
  unless desc.nil?
78
79
  (desc[:data] ||= {})[:msg] = message
79
80
  message = t(**desc)
80
81
  end
81
- print "#{log_format_string(message, **kwargs)}#{"\n" unless inline}"
82
+ stream.print "#{log_format_string(message, **kwargs)}#{"\n" unless inline}"
82
83
  end
83
84
 
84
85
  def log_time
@@ -16,8 +16,7 @@ module Dapp
16
16
  log_warning(
17
17
  desc: { code: :launched_command,
18
18
  data: { command: _to_system_shellout_command(command) },
19
- context: :system_shellout },
20
- quiet: !log_verbose?
19
+ context: :system_shellout }
21
20
  )
22
21
  raise
23
22
  end
data/lib/dapp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Version
2
2
  module Dapp
3
- VERSION = '0.7.14'.freeze
3
+ VERSION = '0.7.15'.freeze
4
4
  BUILD_CACHE_VERSION = 6
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.14
4
+ version: 0.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2016-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout