dapp 0.5.4 → 0.5.5
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 +4 -4
- data/config/en/net_status.yml +2 -1
- data/lib/dapp/build/stage/base.rb +1 -1
- data/lib/dapp/build/stage/mod/logging.rb +1 -6
- data/lib/dapp/build/stage/source_base.rb +1 -1
- data/lib/dapp/config/application.rb +4 -1
- data/lib/dapp/controller.rb +4 -5
- data/lib/dapp/git_artifact.rb +1 -1
- data/lib/dapp/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 736bd0b9c90721b086654095099165858735d7b7
|
4
|
+
data.tar.gz: b35661d57687c80f77b802895e1b1266c03e0604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46ccabca9ea0395b300257d38b010e9b0f00a158a403f8142b4c53c25c643520d88c2d080c6ea0d30f3b01e91136f4dfd304685cbd04ba81b71f942c8ba69d6c
|
7
|
+
data.tar.gz: 4009d71698dddb250b37bc0d14dccbd2632bcc28a207920aed6520b3830f5054f9f61474e21a4741ee26a31ec871beacf08b28e5588bfe3469ad09aeefdefaf0
|
data/config/en/net_status.yml
CHANGED
@@ -9,7 +9,7 @@ en:
|
|
9
9
|
git_branch_without_name: "Application has specific revision that isn't associated with a branch name!"
|
10
10
|
ci_environment_required: 'CI environment required (Travis or GitLab CI)!'
|
11
11
|
dappfile:
|
12
|
-
incorrect: "Dappfile
|
12
|
+
incorrect: "Dappfile with '%{error}':\n%{message}"
|
13
13
|
build:
|
14
14
|
from_image_required: 'Missing from_image!'
|
15
15
|
image_already_untagged: "Image `%{name}` already untagged!"
|
@@ -27,5 +27,6 @@ en:
|
|
27
27
|
docker_from_not_defined: "Docker `from` not defined!"
|
28
28
|
artifact_unexpected_attribute: "Artifact doesn't has attribute '%{attr}'!"
|
29
29
|
git_artifact_unexpected_attribute: "'%{type}' git artifact doesn't has attribute '%{attr}'!"
|
30
|
+
app_name_incorrect: "Application has incorrect name '%{name}': doesn't match regex '%{reg}'!"
|
30
31
|
chef:
|
31
32
|
stage_path_overlap: "Cannot install '%{cookbook}' cookbook's path %{from} into %{to}: already exists"
|
@@ -76,7 +76,7 @@ module Dapp
|
|
76
76
|
elsif application.dry_run?
|
77
77
|
application.log_state(name, state: application.t(code: 'state.build'), styles: { status: :success })
|
78
78
|
else
|
79
|
-
application.log_process(name, process: application.t(code: 'status.process.building'), short:
|
79
|
+
application.log_process(name, process: application.t(code: 'status.process.building'), short: should_not_be_detailed?) do
|
80
80
|
image_do_build
|
81
81
|
end
|
82
82
|
end
|
@@ -51,12 +51,7 @@ module Dapp
|
|
51
51
|
image.tagged? && !application.log_verbose? && application.cli_options[:introspect_stage].nil?
|
52
52
|
end
|
53
53
|
|
54
|
-
def
|
55
|
-
return false if next_stage.nil?
|
56
|
-
next_stage.image.tagged? || next_stage.should_be_not_present?
|
57
|
-
end
|
58
|
-
|
59
|
-
def should_be_not_detailed?
|
54
|
+
def should_not_be_detailed?
|
60
55
|
image.send(:bash_commands).empty?
|
61
56
|
end
|
62
57
|
|
@@ -71,7 +71,10 @@ module Dapp
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def _name
|
74
|
-
@_name || @_basename
|
74
|
+
(@_name || @_basename).tap do |name|
|
75
|
+
reg = '^[[[:alnum:]]_.-]*$'
|
76
|
+
raise Error::Config, code: :app_name_incorrect, data: { name: name, reg: reg } unless name =~ /#{reg}/
|
77
|
+
end
|
75
78
|
end
|
76
79
|
|
77
80
|
def _apps
|
data/lib/dapp/controller.rb
CHANGED
@@ -82,11 +82,10 @@ module Dapp
|
|
82
82
|
begin
|
83
83
|
conf.instance_eval File.read(dappfile_path), dappfile_path
|
84
84
|
rescue SyntaxError, StandardError => e
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
raise Error::Dappfile, code: :incorrect, data: { error: e.class.name, path: dappfile_path, message: message }
|
85
|
+
backtrace = e.backtrace.find { |line| line.start_with?(dappfile_path) }
|
86
|
+
message = e.is_a?(NoMethodError) ? e.message[/.*(?= for)/] : e.message
|
87
|
+
message = "#{backtrace[/.*(?=:in)/]}: #{message}" if backtrace
|
88
|
+
raise Error::Dappfile, code: :incorrect, data: { error: e.class.name, message: message }
|
90
89
|
end
|
91
90
|
end
|
92
91
|
config._apps.select { |app| app_filters.any? { |pattern| File.fnmatch(pattern, app._name) } }
|
data/lib/dapp/git_artifact.rb
CHANGED
@@ -92,7 +92,7 @@ module Dapp
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def diff_command(from, to, quiet: false)
|
95
|
-
"diff #{'--quiet' if quiet} #{from}..#{to} #{"--relative=#{cwd}" if cwd} -- #{paths(true)}"
|
95
|
+
"diff --binary --full-index #{'--quiet' if quiet} #{from}..#{to} #{"--relative=#{cwd}" if cwd} -- #{paths(true)}"
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
data/lib/dapp/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.5
|
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-08-
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|