takeltau 0.34.15 → 0.35.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/takeltau/completion/cli.rb +1 -1
- data/lib/takeltau/default.yml +10 -35
- data/lib/takeltau/docker/check/cli.rb +1 -1
- data/lib/takeltau/docker/check/daemon.rb +1 -1
- data/lib/takeltau/docker/cli.rb +1 -1
- data/lib/takeltau/docker/container/check/cli.rb +1 -1
- data/lib/takeltau/docker/container/check/existing.rb +1 -1
- data/lib/takeltau/docker/container/check/network.rb +1 -1
- data/lib/takeltau/docker/container/check/orphaned.rb +1 -1
- data/lib/takeltau/docker/container/clean.rb +1 -1
- data/lib/takeltau/docker/container/cli.rb +1 -1
- data/lib/takeltau/docker/container/command.rb +1 -1
- data/lib/takeltau/docker/container/daemon.rb +1 -1
- data/lib/takeltau/docker/container/lib.rb +1 -1
- data/lib/takeltau/docker/container/login.rb +1 -1
- data/lib/takeltau/docker/container/prune.rb +1 -1
- data/lib/takeltau/docker/image/cli.rb +1 -1
- data/lib/takeltau/docker/image/tag/check.rb +1 -1
- data/lib/takeltau/docker/image/tag/cli.rb +1 -1
- data/lib/takeltau/docker/image/tag/latest.rb +1 -1
- data/lib/takeltau/docker/image/tag/list.rb +1 -1
- data/lib/takeltau/docker/image/update.rb +1 -1
- data/lib/takeltau/git/check/clean.rb +1 -1
- data/lib/takeltau/git/check/cli.rb +14 -14
- data/lib/takeltau/git/check/hg.rb +26 -0
- data/lib/takeltau/git/check/workspace.rb +1 -1
- data/lib/takeltau/git/cli.rb +1 -1
- data/lib/takeltau/git/lib.rb +80 -0
- data/lib/takeltau/hg/cli.rb +56 -0
- data/lib/takeltau/hg/export.rb +18 -0
- data/lib/takeltau/hg/pull.rb +45 -0
- data/lib/takeltau/hg/push.rb +42 -0
- data/lib/takeltau/info/cli.rb +1 -1
- data/lib/takeltau/info/project/cli.rb +1 -1
- data/lib/takeltau/info/status/bar.rb +1 -1
- data/lib/takeltau/info/status/cli.rb +1 -1
- data/lib/takeltau/info/status/git.rb +1 -1
- data/lib/takeltau/info/status/gopass.rb +1 -1
- data/lib/takeltau/info/status/gpg.rb +1 -1
- data/lib/takeltau/info/status/lib.rb +1 -1
- data/lib/takeltau/info/status/ssh.rb +1 -1
- data/lib/takeltau/init/lib.rb +9 -28
- data/lib/takeltau/init/packer/cli.rb +4 -14
- data/lib/takeltau/init/packer/docker.rb +2 -5
- data/lib/takeltau/init/packer/templates/hgclone.tt +8 -0
- data/lib/takeltau/init/takelage/cli.rb +4 -14
- data/lib/takeltau/init/takelage/rake.rb +2 -5
- data/lib/takeltau/init/takelage/templates/hgclone.tt +2 -0
- data/lib/takeltau/lib/config.rb +2 -2
- data/lib/takeltau/lib/logging.rb +2 -2
- data/lib/takeltau/lib/project.rb +2 -2
- data/lib/takeltau/mutagen/check/cli.rb +1 -1
- data/lib/takeltau/mutagen/check/daemon.rb +1 -1
- data/lib/takeltau/mutagen/cli.rb +1 -1
- data/lib/takeltau/mutagen/socket/check.rb +1 -1
- data/lib/takeltau/mutagen/socket/cli.rb +1 -1
- data/lib/takeltau/mutagen/socket/create.rb +1 -1
- data/lib/takeltau/mutagen/socket/list.rb +1 -1
- data/lib/takeltau/mutagen/socket/terminate.rb +1 -1
- data/lib/takeltau/mutagen/socket/tidy.rb +1 -1
- data/lib/takeltau/self/cli.rb +1 -1
- data/lib/takeltau/self/config/cli.rb +1 -1
- data/lib/takeltau/self/list.rb +1 -1
- data/lib/takeltau/version +1 -1
- data/lib/takeltau.rb +37 -62
- metadata +9 -22
- data/lib/takeltau/bit/check/cli.rb +0 -23
- data/lib/takeltau/bit/check/workspace.rb +0 -37
- data/lib/takeltau/bit/cli.rb +0 -18
- data/lib/takeltau/bit/clipboard/cli.rb +0 -73
- data/lib/takeltau/bit/clipboard/copy.rb +0 -142
- data/lib/takeltau/bit/clipboard/lib.rb +0 -143
- data/lib/takeltau/bit/clipboard/paste.rb +0 -60
- data/lib/takeltau/bit/clipboard/pull.rb +0 -37
- data/lib/takeltau/bit/clipboard/push.rb +0 -37
- data/lib/takeltau/bit/require/cli.rb +0 -57
- data/lib/takeltau/bit/require/export.rb +0 -34
- data/lib/takeltau/bit/require/import.rb +0 -133
- data/lib/takeltau/bit/require/lib.rb +0 -19
- data/lib/takeltau/bit/scope/add.rb +0 -55
- data/lib/takeltau/bit/scope/cli.rb +0 -74
- data/lib/takeltau/bit/scope/list.rb +0 -41
- data/lib/takeltau/bit/scope/new.rb +0 -44
- data/lib/takeltau/bit/scope/ssh.rb +0 -13
- data/lib/takeltau/git/check/bit.rb +0 -26
- data/lib/takeltau/init/packer/templates/bitrequireyml.tt +0 -13
- data/lib/takeltau/init/takelage/templates/bitrequireyml.tt +0 -5
data/lib/takeltau/init/lib.rb
CHANGED
@@ -1,36 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# takeltau init
|
3
|
+
# takeltau init lib
|
4
4
|
module InitLib
|
5
5
|
private
|
6
6
|
|
7
|
-
# Import bit components.
|
8
|
-
def _init_lib_bit_require_import
|
9
|
-
if config.active['init_bit_require_import'] == 'true'
|
10
|
-
log.info 'Importing bit components'
|
11
|
-
return false unless bit_require_import
|
12
|
-
end
|
13
|
-
|
14
|
-
true
|
15
|
-
end
|
16
|
-
|
17
|
-
# Check bit.
|
18
|
-
def _init_lib_bit_check
|
19
|
-
return false unless command_available_else_error? config.active['cmd_bit']
|
20
|
-
return true unless bit_check_workspace
|
21
|
-
|
22
|
-
log.error 'bit is already initialized!'
|
23
|
-
false
|
24
|
-
end
|
25
|
-
|
26
|
-
# Init bit.
|
27
|
-
def _init_lib_bit_init
|
28
|
-
log.info 'Initializing bit workspace'
|
29
|
-
return false unless try config.active['cmd_init_lib_bit_init']
|
30
|
-
|
31
|
-
true
|
32
|
-
end
|
33
|
-
|
34
7
|
# Check git.
|
35
8
|
def _init_lib_git_check
|
36
9
|
return false unless command_available_else_error? config.active['cmd_git']
|
@@ -83,4 +56,12 @@ module InitLib
|
|
83
56
|
|
84
57
|
true
|
85
58
|
end
|
59
|
+
|
60
|
+
# Clone hg repos.
|
61
|
+
def _init_lib_hg_clone
|
62
|
+
log.info 'Cloning hg repos'
|
63
|
+
return false unless try config.active['cmd_init_lib_hg_clone']
|
64
|
+
|
65
|
+
true
|
66
|
+
end
|
86
67
|
end
|
@@ -9,36 +9,22 @@ module Takeltau
|
|
9
9
|
include ConfigModule
|
10
10
|
include ProjectModule
|
11
11
|
include GitCheckClean
|
12
|
-
include GitCheckBit
|
13
12
|
include GitCheckWorkspace
|
14
|
-
include BitCheckWorkspace
|
15
|
-
include BitClipboardLib
|
16
|
-
include BitClipboardCopy
|
17
|
-
include BitClipboardPaste
|
18
|
-
include BitRequireLib
|
19
|
-
include BitRequireImport
|
20
13
|
include InitLib
|
21
14
|
include InitPackerDocker
|
22
15
|
|
23
16
|
argument :name
|
24
17
|
|
25
|
-
# Initialize bit require
|
26
18
|
# Define templates
|
27
19
|
# rubocop:disable Metrics/MethodLength
|
28
20
|
def initialize(args = [], local_options = {}, configuration = {})
|
29
21
|
# initialize thor parent class
|
30
22
|
super args, local_options, configuration
|
31
23
|
|
32
|
-
@bit_require_file = config.active['bit_require_file']
|
33
|
-
|
34
24
|
@ansiblelint = {
|
35
25
|
name: 'ansible/.ansible-lint',
|
36
26
|
template: 'templates/ansiblelint.tt'
|
37
27
|
}
|
38
|
-
@bitrequireyml = {
|
39
|
-
name: 'bitrequire.yml',
|
40
|
-
template: 'templates/bitrequireyml.tt'
|
41
|
-
}
|
42
28
|
@gitignore = {
|
43
29
|
name: '.gitignore',
|
44
30
|
template: '../templates/gitignore.tt'
|
@@ -47,6 +33,10 @@ module Takeltau
|
|
47
33
|
name: 'ansible/group_vars/all/project.yml',
|
48
34
|
template: 'templates/groupvarsprojectyml.tt'
|
49
35
|
}
|
36
|
+
@hgclone = {
|
37
|
+
name: 'hgclone',
|
38
|
+
template: 'templates/hgclone.tt'
|
39
|
+
}
|
50
40
|
@playbooksiteyml = {
|
51
41
|
name: 'ansible/playbook-site.yml',
|
52
42
|
template: 'templates/playbooksiteyml.tt'
|
@@ -16,7 +16,7 @@ module InitPackerDocker
|
|
16
16
|
# reinitialize config with newly created files
|
17
17
|
initialize_config
|
18
18
|
|
19
|
-
return false unless
|
19
|
+
return false unless _init_lib_hg_clone
|
20
20
|
|
21
21
|
return false unless exit_code
|
22
22
|
|
@@ -29,9 +29,9 @@ module InitPackerDocker
|
|
29
29
|
def _init_packer_docker_files_get
|
30
30
|
[
|
31
31
|
@ansiblelint,
|
32
|
-
@bitrequireyml,
|
33
32
|
@gitignore,
|
34
33
|
@groupvarsprojectyml,
|
34
|
+
@hgclone,
|
35
35
|
@playbooksiteyml,
|
36
36
|
@projectyml,
|
37
37
|
@rakefile
|
@@ -42,8 +42,6 @@ module InitPackerDocker
|
|
42
42
|
def _init_packer_docker_check_prerequisites(files)
|
43
43
|
return false unless _init_lib_git_check
|
44
44
|
|
45
|
-
return false unless _init_lib_bit_check
|
46
|
-
|
47
45
|
return false unless _init_lib_files_check files
|
48
46
|
|
49
47
|
true
|
@@ -54,7 +52,6 @@ module InitPackerDocker
|
|
54
52
|
exit_code = true
|
55
53
|
|
56
54
|
exit_code &&= _init_lib_git_init
|
57
|
-
exit_code &&= _init_lib_bit_init
|
58
55
|
exit_code &&= _init_lib_files_create files
|
59
56
|
exit_code &&= _init_lib_git_add_all
|
60
57
|
exit_code &&= _init_lib_git_commit_initial
|
@@ -0,0 +1,8 @@
|
|
1
|
+
hg clone git@github.com:takelwerk/molecule-default ansible/molecule/default
|
2
|
+
hg clone git@github.com:takelwerk/molecule-image ansible/molecule/image
|
3
|
+
hg clone git@github.com:takelwerk/takel_cleanup ansible/roles/takel_cleanup
|
4
|
+
hg clone git@github.com:takelwerk/packer-takelage-docker packer/templates/takelage/docker
|
5
|
+
hg clone git@github.com:takelwerk/rake-ansible.git rake/ansible
|
6
|
+
hg clone git@github.com:takelwerk/rake-images.git rake/images
|
7
|
+
hg clone git@github.com:takelwerk/rake-meta.git rake/meta
|
8
|
+
hg clone git@github.com:takelwerk/rake-rubylint.git rake/rubylint
|
@@ -9,36 +9,26 @@ module Takeltau
|
|
9
9
|
include ConfigModule
|
10
10
|
include ProjectModule
|
11
11
|
include GitCheckClean
|
12
|
-
include GitCheckBit
|
13
12
|
include GitCheckWorkspace
|
14
|
-
include BitCheckWorkspace
|
15
|
-
include BitClipboardLib
|
16
|
-
include BitClipboardCopy
|
17
|
-
include BitClipboardPaste
|
18
|
-
include BitRequireLib
|
19
|
-
include BitRequireImport
|
20
13
|
include InitLib
|
21
14
|
include InitTakelageRake
|
22
15
|
|
23
16
|
argument :name
|
24
17
|
|
25
|
-
# Initialize bit require
|
26
18
|
# Define templates
|
27
19
|
# rubocop:disable Metrics/MethodLength
|
28
20
|
def initialize(args = [], local_options = {}, configuration = {})
|
29
21
|
# initialize thor parent class
|
30
22
|
super args, local_options, configuration
|
31
23
|
|
32
|
-
@bit_require_file = config.active['bit_require_file']
|
33
|
-
|
34
|
-
@bitrequireyml = {
|
35
|
-
name: 'bitrequire.yml',
|
36
|
-
template: 'templates/bitrequireyml.tt'
|
37
|
-
}
|
38
24
|
@gitignore = {
|
39
25
|
name: '.gitignore',
|
40
26
|
template: '../templates/gitignore.tt'
|
41
27
|
}
|
28
|
+
@hgclone = {
|
29
|
+
name: 'hgclone',
|
30
|
+
template: 'templates/hgclone.tt'
|
31
|
+
}
|
42
32
|
@projectyml = {
|
43
33
|
name: 'project.yml',
|
44
34
|
template: 'templates/projectyml.tt'
|
@@ -16,7 +16,7 @@ module InitTakelageRake
|
|
16
16
|
# reinitialize config with newly created files
|
17
17
|
initialize_config
|
18
18
|
|
19
|
-
return false unless
|
19
|
+
return false unless _init_lib_hg_clone
|
20
20
|
|
21
21
|
return false unless exit_code
|
22
22
|
|
@@ -28,8 +28,8 @@ module InitTakelageRake
|
|
28
28
|
# Add templates.
|
29
29
|
def _init_takelage_rake_files_get
|
30
30
|
[
|
31
|
-
@bitrequireyml,
|
32
31
|
@gitignore,
|
32
|
+
@hgclone,
|
33
33
|
@projectyml,
|
34
34
|
@rakefile
|
35
35
|
]
|
@@ -39,8 +39,6 @@ module InitTakelageRake
|
|
39
39
|
def _init_takelage_rake_check_prerequisites(files)
|
40
40
|
return false unless _init_lib_git_check
|
41
41
|
|
42
|
-
return false unless _init_lib_bit_check
|
43
|
-
|
44
42
|
return false unless _init_lib_files_check files
|
45
43
|
|
46
44
|
true
|
@@ -51,7 +49,6 @@ module InitTakelageRake
|
|
51
49
|
exit_code = true
|
52
50
|
|
53
51
|
exit_code &&= _init_lib_git_init
|
54
|
-
exit_code &&= _init_lib_bit_init
|
55
52
|
exit_code &&= _init_lib_files_create files
|
56
53
|
exit_code &&= _init_lib_git_add_all
|
57
54
|
exit_code &&= _init_lib_git_commit_initial
|
data/lib/takeltau/lib/config.rb
CHANGED
data/lib/takeltau/lib/logging.rb
CHANGED
data/lib/takeltau/lib/project.rb
CHANGED
data/lib/takeltau/mutagen/cli.rb
CHANGED
data/lib/takeltau/self/cli.rb
CHANGED
data/lib/takeltau/self/list.rb
CHANGED
data/lib/takeltau/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.35.11
|
data/lib/takeltau.rb
CHANGED
@@ -20,30 +20,17 @@ require_relative 'takeltau/lib/system'
|
|
20
20
|
require_relative 'takeltau/lib/config'
|
21
21
|
require_relative 'takeltau/lib/project'
|
22
22
|
|
23
|
+
require_relative 'takeltau/completion/cli'
|
23
24
|
require_relative 'takeltau/git/check/clean'
|
24
|
-
require_relative 'takeltau/git/check/
|
25
|
+
require_relative 'takeltau/git/check/hg'
|
25
26
|
require_relative 'takeltau/git/check/workspace'
|
26
27
|
require_relative 'takeltau/git/check/cli'
|
28
|
+
require_relative 'takeltau/git/lib'
|
27
29
|
require_relative 'takeltau/git/cli'
|
28
|
-
require_relative 'takeltau/
|
29
|
-
require_relative 'takeltau/
|
30
|
-
require_relative 'takeltau/
|
31
|
-
require_relative 'takeltau/
|
32
|
-
require_relative 'takeltau/bit/scope/list'
|
33
|
-
require_relative 'takeltau/bit/scope/new'
|
34
|
-
require_relative 'takeltau/bit/scope/cli'
|
35
|
-
require_relative 'takeltau/bit/clipboard/lib'
|
36
|
-
require_relative 'takeltau/bit/clipboard/copy'
|
37
|
-
require_relative 'takeltau/bit/clipboard/paste'
|
38
|
-
require_relative 'takeltau/bit/clipboard/pull'
|
39
|
-
require_relative 'takeltau/bit/clipboard/push'
|
40
|
-
require_relative 'takeltau/bit/clipboard/cli'
|
41
|
-
require_relative 'takeltau/bit/require/lib'
|
42
|
-
require_relative 'takeltau/bit/require/export'
|
43
|
-
require_relative 'takeltau/bit/require/import'
|
44
|
-
require_relative 'takeltau/bit/require/cli'
|
45
|
-
require_relative 'takeltau/bit/cli'
|
46
|
-
require_relative 'takeltau/completion/cli'
|
30
|
+
require_relative 'takeltau/hg/export'
|
31
|
+
require_relative 'takeltau/hg/pull'
|
32
|
+
require_relative 'takeltau/hg/push'
|
33
|
+
require_relative 'takeltau/hg/cli'
|
47
34
|
require_relative 'takeltau/init/lib'
|
48
35
|
require_relative 'takeltau/init/packer/docker'
|
49
36
|
require_relative 'takeltau/init/packer/cli'
|
@@ -138,9 +125,6 @@ module Takeltau
|
|
138
125
|
# Subcommands
|
139
126
|
#
|
140
127
|
|
141
|
-
desc 'bit [COMMAND] ', 'Manage bit'
|
142
|
-
subcommand 'bit', Bit
|
143
|
-
|
144
128
|
desc 'completion [COMMAND] ', 'Print shell completion code'
|
145
129
|
subcommand 'completion', Completion
|
146
130
|
|
@@ -150,10 +134,13 @@ module Takeltau
|
|
150
134
|
desc 'git [COMMAND] ', 'Manage git'
|
151
135
|
subcommand 'git', Git
|
152
136
|
|
137
|
+
desc 'hg [COMMAND] ', 'Manage hg'
|
138
|
+
subcommand 'hg', Hg
|
139
|
+
|
153
140
|
desc 'info [COMMAND] ', 'Get information'
|
154
141
|
subcommand 'info', Info
|
155
142
|
|
156
|
-
desc 'init [COMMAND] ', 'Init
|
143
|
+
desc 'init [COMMAND] ', 'Init project'
|
157
144
|
subcommand 'init', Init
|
158
145
|
|
159
146
|
desc 'mutagen [COMMAND] ', 'Manage mutagen'
|
@@ -166,80 +153,68 @@ module Takeltau
|
|
166
153
|
# Top-level commands
|
167
154
|
#
|
168
155
|
|
156
|
+
desc 'clean', 'Alias for tau docker container clean'
|
157
|
+
# tau clean: {Takeltau::DockerContainer#clean}
|
158
|
+
def clean
|
159
|
+
Takeltau::DockerContainer.new.clean
|
160
|
+
end
|
161
|
+
|
169
162
|
desc 'config', 'Alias for tau self config active'
|
170
|
-
#
|
163
|
+
# tau config: {Takeltau::SelfConfig#active}
|
171
164
|
def config
|
172
165
|
Takeltau::SelfConfig.new.active
|
173
166
|
end
|
174
167
|
|
175
|
-
desc 'copy [DIR] [SCOPE]', 'Alias for tau bit clipboard copy'
|
176
|
-
# takeltau copy: {takelage::BitClipboard#copy}
|
177
|
-
def copy(dir_or_file, scope)
|
178
|
-
Takeltau::BitClipboard.new.copy dir_or_file, scope
|
179
|
-
end
|
180
|
-
|
181
|
-
desc 'project', 'Alias for tau info project active'
|
182
|
-
# takeltau project: {takelage::InfoProject#active}
|
183
|
-
def project
|
184
|
-
Takeltau::InfoProject.new.active
|
185
|
-
end
|
186
|
-
|
187
168
|
desc 'login', 'Alias for tau docker container login'
|
188
|
-
#
|
169
|
+
# tau login: {Takeltau::DockerContainer#login}
|
189
170
|
def login
|
190
171
|
Takeltau::DockerContainer.new.login
|
191
172
|
end
|
192
173
|
|
193
174
|
desc 'list', 'Alias for tau self list'
|
194
|
-
#
|
175
|
+
# tau version: {Takeltau::Self#list}
|
195
176
|
def list
|
196
177
|
Takeltau::Self.new.list
|
197
178
|
end
|
198
179
|
|
199
|
-
desc '
|
200
|
-
#
|
201
|
-
def
|
202
|
-
Takeltau::
|
203
|
-
end
|
204
|
-
|
205
|
-
desc 'paste [COMPONENT] [DIR]', 'Alias for tau bit clipboard paste'
|
206
|
-
# takeltau paste: {takelage::BitClipboard#paste}
|
207
|
-
def paste(cid, dir)
|
208
|
-
Takeltau::BitClipboard.new.paste cid, dir
|
209
|
-
end
|
210
|
-
|
211
|
-
desc 'pull', 'Alias for tau bit clipboard pull'
|
212
|
-
# takeltau pull: {takelage::BitClipboard#pull}
|
213
|
-
def pull
|
214
|
-
Takeltau::BitClipboard.new.pull
|
180
|
+
desc 'project', 'Alias for tau info project active'
|
181
|
+
# tau project: {Takeltau::InfoProject#active}
|
182
|
+
def project
|
183
|
+
Takeltau::InfoProject.new.active
|
215
184
|
end
|
216
185
|
|
217
186
|
desc 'prune', 'Alias for tau docker container prune'
|
218
|
-
#
|
187
|
+
# tau prune: {Takeltau::DockerContainer#prune}
|
219
188
|
def prune
|
220
189
|
Takeltau::DockerContainer.new.prune
|
221
190
|
end
|
222
191
|
|
223
|
-
desc '
|
224
|
-
#
|
192
|
+
desc 'pull', 'Alias for tau hg pull'
|
193
|
+
# tau pull: {Takeltau::Hg#pull}
|
194
|
+
def pull
|
195
|
+
Takeltau::Hg.new.pull
|
196
|
+
end
|
197
|
+
|
198
|
+
desc 'push', 'Alias for tau hg push'
|
199
|
+
# tau push: {Takeltau::Hg#push}
|
225
200
|
def push
|
226
|
-
Takeltau::
|
201
|
+
Takeltau::Hg.new.push
|
227
202
|
end
|
228
203
|
|
229
204
|
desc 'status', 'Alias for tau info status bar'
|
230
|
-
#
|
205
|
+
# tau status: {Takeltau::InfoStatus#bar}
|
231
206
|
def status
|
232
207
|
Takeltau::InfoStatus.new.bar
|
233
208
|
end
|
234
209
|
|
235
210
|
desc 'update', 'Alias for tau docker image update'
|
236
|
-
#
|
211
|
+
# tau update: {Takeltau::DockerImage#update}
|
237
212
|
def update
|
238
213
|
Takeltau::DockerImage.new.update
|
239
214
|
end
|
240
215
|
|
241
216
|
desc 'version', 'Alias for tau self version'
|
242
|
-
#
|
217
|
+
# tau version: {Takeltau::Self#version}
|
243
218
|
def version
|
244
219
|
Takeltau::Self.new.version
|
245
220
|
end
|