luban 0.10.11 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/luban/deployment/cli/application/authenticator.rb +4 -1
- data/lib/luban/deployment/cli/application/base.rb +2 -2
- data/lib/luban/deployment/cli/application/constructor.rb +1 -0
- data/lib/luban/deployment/cli/command.rb +2 -2
- data/lib/luban/deployment/configuration/server.rb +8 -0
- data/lib/luban/deployment/parameters.rb +2 -0
- data/lib/luban/deployment/version.rb +1 -1
- 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: a924165b2113623369909886a8015a8f9fd95b05
|
4
|
+
data.tar.gz: 5a3f867b852f14805773d078d09a4f80d13b2f00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f411ea9e3143774c87f99744a70bce7183ed4d63f1f069e327ce1dae2a222538dd5e952a355d0456847eadbb98c89f90940333c0f2de93646b856083b93b5574
|
7
|
+
data.tar.gz: 01d57bd9b4d2941703416ce32a4434a1d7cb12322932a7d00868f93c6e5dd43466de1fd9d1a1ac39b4ea70aaeba277ceb462613eff8fc261f46fa59ff211aaae
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.10.12 (Dec 14, 2016)
|
4
|
+
|
5
|
+
Minor enhancements:
|
6
|
+
* Added a host property, :local, to indicate if the host is a localhost
|
7
|
+
* If local host property is not set, hostname lookup will be carried out to check if the given hostname is a local host
|
8
|
+
* Added a general parameter, :skip_promptless_authen, to skip promptless authenticaiton setup
|
9
|
+
* By default, :skip_promptless_authen is turned off
|
10
|
+
* Skipped prompltess authentication setup for local host
|
11
|
+
|
3
12
|
## Version 0.10.11 (Dec 01, 2016)
|
4
13
|
|
5
14
|
Minor enhancements:
|
@@ -56,7 +56,10 @@ module Luban
|
|
56
56
|
def app; task.opts.app; end
|
57
57
|
|
58
58
|
def promptless_authen
|
59
|
-
if
|
59
|
+
if host.local?
|
60
|
+
update_result "Skipped! Promptless authentication is not necessary for local host.",
|
61
|
+
status: :skipped
|
62
|
+
elsif promptless_authen_enabled?
|
60
63
|
update_result "Skipped! Promptless authentication has been enabled ALREADY.",
|
61
64
|
status: :skipped, public_key: public_key
|
62
65
|
else
|
@@ -139,7 +139,7 @@ module Luban
|
|
139
139
|
|
140
140
|
def promptless_authen(args:, opts:)
|
141
141
|
opts = opts.merge(app: self, public_keys: Array(public_key!(args: args, opts: opts)))
|
142
|
-
public_keys = promptless_authen!(args: args, opts: opts).collect { |r| r[:public_key] }
|
142
|
+
public_keys = promptless_authen!(args: args, opts: opts).collect { |r| r[:public_key] }.compact
|
143
143
|
|
144
144
|
opts[:roles] = []
|
145
145
|
opts[:roles] << scm_role unless scm_role.nil?
|
@@ -156,7 +156,7 @@ module Luban
|
|
156
156
|
|
157
157
|
def setup(args:, opts:)
|
158
158
|
show_app_environment
|
159
|
-
promptless_authen(args: args, opts: opts)
|
159
|
+
promptless_authen(args: args, opts: opts) unless skip_promptless_authen
|
160
160
|
setup!(args: args, opts: opts)
|
161
161
|
end
|
162
162
|
dispatch_task :setup!, to: :constructor, as: :setup
|
@@ -356,8 +356,8 @@ module Luban
|
|
356
356
|
|
357
357
|
def set_parameters
|
358
358
|
copy_parameters_from_parent(
|
359
|
-
:luban_roles, :luban_root_path, :
|
360
|
-
:stages, :applications, :
|
359
|
+
:luban_roles, :luban_root_path, :work_dir, :apps_path,
|
360
|
+
:stages, :applications, :user, :skip_promptless_authen
|
361
361
|
)
|
362
362
|
end
|
363
363
|
|
@@ -13,6 +13,14 @@ module Luban
|
|
13
13
|
server
|
14
14
|
end
|
15
15
|
|
16
|
+
def local?
|
17
|
+
super or (properties.has_key?(:local) ? properties[:local] : localhost?)
|
18
|
+
end
|
19
|
+
|
20
|
+
def localhost?
|
21
|
+
hostname == 'localhost' or hostname == `hostname -f`.chomp
|
22
|
+
end
|
23
|
+
|
16
24
|
def roles
|
17
25
|
self[:roles]
|
18
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Lei
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban-cli
|