rbld 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cli/lib/commands/rbld_commit.rb +1 -1
- data/cli/lib/data/version +1 -1
- data/cli/lib/rbld_commands.rb +16 -5
- data/cli/lib/rbld_print.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a5ab4410529f2d2b3482b9d732b08044f5f3de
|
4
|
+
data.tar.gz: ba25955d34d8888761ebd233728ada0cfcca0178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26cd599a7e8003b475b7a209cac0bccc61ce35e6307e735db5eaa0c6ce47d950105f21fc1ca9a02a15f300db239c12bf0fab8df956ffa1442b0b08df9bef57a2
|
7
|
+
data.tar.gz: e9d7a83df474d789a99a9498e79a44f0575899e4cc0a3246a232f763182e1239534db0f79adf1229b5f4cb018321dbb9a62fc658dd52270335bb25b98e4b1b56
|
data/cli/lib/data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.7
|
data/cli/lib/rbld_commands.rb
CHANGED
@@ -7,10 +7,13 @@ require_relative 'rbld_plugins'
|
|
7
7
|
module Rebuild::CLI
|
8
8
|
extend Rebuild::Utils::Errors
|
9
9
|
|
10
|
+
name_error = "Invalid %s, it may contain lowercase and uppercase letters, digits, underscores, periods and dashes"
|
11
|
+
|
10
12
|
rebuild_errors \
|
11
13
|
EnvironmentNameEmpty: 'Environment name not specified',
|
12
14
|
EnvironmentNameWithoutTagExpected: 'Environment tag must not be specified',
|
13
|
-
|
15
|
+
TagNameError: "#{name_error} and may not start with a period or a dash.",
|
16
|
+
EnvironmentNameError: "#{name_error} and may not start or end with a dash, period or underscore.",
|
14
17
|
HandlerClassNameError: '%s'
|
15
18
|
|
16
19
|
class Environment
|
@@ -24,9 +27,17 @@ module Rebuild::CLI
|
|
24
27
|
@full = "#{@name}:#{@tag}"
|
25
28
|
end
|
26
29
|
|
27
|
-
def self.
|
30
|
+
def self.validate_environment_name( name, value )
|
28
31
|
raise EnvironmentNameError, "#{name} (#{value})" \
|
29
|
-
unless value.match(
|
32
|
+
unless value.match(/^[[:alnum:]\.\-\_]*$/) and \
|
33
|
+
!value.start_with?('_','-','.') and \
|
34
|
+
!value.end_with?('_','-','.')
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.validate_tag_name( name, value )
|
38
|
+
raise TagNameError, "#{name} (#{value})" \
|
39
|
+
unless value.match(/^[[:alnum:]\.\-\_]*$/) and \
|
40
|
+
!value.start_with?('-','.')
|
30
41
|
end
|
31
42
|
|
32
43
|
def to_s
|
@@ -59,8 +70,8 @@ module Rebuild::CLI
|
|
59
70
|
|
60
71
|
def validate_name_tag(opts)
|
61
72
|
raise EnvironmentNameEmpty if @name.empty? && !opts[:allow_empty]
|
62
|
-
self.class.
|
63
|
-
self.class.
|
73
|
+
self.class.validate_environment_name( "environment name", @name ) unless @name.empty?
|
74
|
+
self.class.validate_tag_name( "environment tag", @tag ) unless @tag.empty?
|
64
75
|
end
|
65
76
|
end
|
66
77
|
|
data/cli/lib/rbld_print.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbld
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Fleytman
|
8
8
|
autorequire:
|
9
9
|
bindir: cli/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -486,5 +486,5 @@ rubyforge_project:
|
|
486
486
|
rubygems_version: 2.6.11
|
487
487
|
signing_key:
|
488
488
|
specification_version: 4
|
489
|
-
summary: rbld-1.3.
|
489
|
+
summary: rbld-1.3.7
|
490
490
|
test_files: []
|