takelage 0.29.10 → 0.30.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b28f6c30df4d3f1e62b9f8ad4c282a828eb186521b168bda7f79dfb9a2a483b
4
- data.tar.gz: 6adc87395967eac65059df51f82140ee3b879fa19d869082924aaf44d04826b4
3
+ metadata.gz: 692df780c364ffae6d6b8fda96b8afc12eeadf7e15dd4276f2e9a64294a86922
4
+ data.tar.gz: 5e78a8e8aa6df34ab7f0a2cf7404ecf504f5ea0396518a79448e0acb354b3a58
5
5
  SHA512:
6
- metadata.gz: 68bfc3ff719f4fdbd300e38cded2a0379b78bad467259fd7f1b79b773d7137567ca22451f581a7c684070feaff6296c58e6c73ad4c9cdacbe793daf9019b98a6
7
- data.tar.gz: c21632713ec979285748664c5076f20499bb2ac58efeda6f957c904421d21ee078bfc4a1e424c9e69ed38bf2f31dc52bf629276df4704f633e19a009e414c70d
6
+ metadata.gz: c1a251c7b85c8e575e2b619010b73eb02a6ccdab47ed9a71e343456bbbbe327a4d3889c7a8e7fa72f8439282cb59514b342da34cec4dac344a2307650afdf9db
7
+ data.tar.gz: e9c5faccc90daff8261f1dbc1facfffa618eea2425d389a2d456eeaf490bfe2c95a356b465946d01813b9acc679d9c36d4226f4a4300f70c2c2ab8a0c2bcb041
data/README.md CHANGED
@@ -26,7 +26,6 @@ command line script using the
26
26
  | *[takelage-bit](https://github.com/geospin-takelage/takelage-bit)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/bitboard/latest?label=hub.docker.com&sort=semver&color=blue)](https://hub.docker.com/r/takelage/bitboard) |
27
27
  | *[takelage-img-takelslim](https://github.com/geospin-takelage/takelage-img-takelslim)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/takelslim/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelage/takelslim) |
28
28
  | *[takelage-img-takelbase](https://github.com/geospin-takelage/takelage-img-takelbase)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/takelbase/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelage/takelbase) |
29
- | *[takelage-img-multipostgres](https://github.com/geospin-takelage/takelage-img-multipostgres)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/multipostgres/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelage/multipostgres) |
30
29
 
31
30
  ## Framework Status
32
31
 
@@ -38,7 +37,6 @@ command line script using the
38
37
  | *[takelage-bit](https://github.com/geospin-takelage/takelage-bit)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-bit/Build,%20test%20and%20deploy%20project?label=deploy%20project)](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-bit/Build%20and%20test%20project?label=test%20project)](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_project_nightly.yml) | [![test roles](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-bit/Test%20roles?label=test%20roles)](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_roles_nightly.yml) |
39
38
  | *[takelage-img-takelslim](https://github.com/geospin-takelage/takelage-img-takelslim)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-img-takelslim/Build%20and%20deploy%20takelslim?label=deploy%20project)](https://github.com/geospin-takelage/takelage-img-takelslim/actions/workflows/build_deploy_takelslim_nightly.yml) |
40
39
  | *[takelage-img-takelbase](https://github.com/geospin-takelage/takelage-img-takelbase)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-img-takelbase/Build%20and%20deploy%20takelbase?label=deploy%20project)](https://github.com/geospin-takelage/takelage-img-takelbase/actions/workflows/build_deploy_takelbase_nightly.yml) |
41
- | *[takelage-img-multipostgres](https://github.com/geospin-takelage/takelage-img-multipostgres)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-img-multipostgres/Build%20and%20deploy%20multipostgres?label=deploy%20project)](https://github.com/geospin-takelage/takelage-img-multipostgres/actions/workflows/build_deploy_multipostgres_nightly.yml) |
42
40
 
43
41
  ## Installation
44
42
 
@@ -73,7 +71,7 @@ tau [bit clipboard push](features/cucumber/features/bit/bit.clipboard.push.featu
73
71
  tau [bit require export](features/cucumber/features/bit/bit.require.export.feature) | Show requirements file of bit components
74
72
  tau [bit require import](features/cucumber/features/bit/bit.require.import.feature) | Import bit components from requirements file
75
73
  tau [bit scope add](features/cucumber/features/bit/bit.scope.add.feature) [SCOPE] | Add a bit [SCOPE]
76
- tau [bit scope inbit](features/cucumber/features/bit/bit.scope.inbit.feature) | Log in to bit remote server
74
+ tau [bit scope ssh](features/cucumber/features/bit/bit.scope.ssh.feature) | Log in to bit remote server
77
75
  tau [bit scope list](features/cucumber/features/bit/bit.scope.list.feature) | List bit remote scopes
78
76
  tau [bit scope new](features/cucumber/features/bit/bit.scope.new.feature) [SCOPE] | Init a new bit [SCOPE]
79
77
  tau [completion bash](features/cucumber/features/completion/completion.bash.feature) | Print bash completion code
@@ -91,7 +89,7 @@ tau [docker image tag latest](features/cucumber/features/docker/docker.image.tag
91
89
  tau [docker image tag list](features/cucumber/features/docker/docker.image.tag.list.feature) | Print local docker image tags
92
90
  tau [docker image update](features/cucumber/features/docker/docker.image.update.feature) | Get latest remote docker container
93
91
  tau [git check clean](features/cucumber/features/git/git.check.clean.feature) | Check if the git workspace is clean
94
- tau [git check main](features/cucumber/features/git/git.check.main.feature) | Check if we are on the git main branch
92
+ tau [git check bit](features/cucumber/features/git/git.check.bit.feature) | Check if we are on the git bit branch
95
93
  tau [git check workspace](features/cucumber/features/git/git.check.workspace.feature) | Check if a git workspace exists
96
94
  tau [info project active](features/cucumber/features/info/info.project.active.feature) | Print active project info
97
95
  tau [info project dir](features/cucumber/features/info/info.project.dir.feature) | Print project root directory
@@ -108,7 +106,7 @@ tau [mutagen socket check](features/cucumber/features/mutagen/mutagen.socket.che
108
106
  tau [mutagen socket create](features/cucumber/features/mutagen/mutagen.socket.create.feature) [NAME] [IN] [OUT] | Create a mutagen socket [NAME] from [IN] to [OUT] of the container
109
107
  tau [mutagen socket list](features/cucumber/features/mutagen/mutagen.socket.list.feature) | List mutagen sockets
110
108
  tau [mutagen socket tidy](features/cucumber/features/mutagen/mutagen.socket.tidy.feature) | Remove mutagen daemon files
111
- tau [mutagen socket terminate](features/cucumber/features/mutagen/mutagen.socket.terminate.feature) | Terminate a mutagen socket
109
+ tau [mutagen socket terminate](features/cucumber/features/mutagen/mutagen.socket.terminate.feature) [SOCKET] | Terminate a mutagen [SOCKET]
112
110
  tau [self config active](features/cucumber/features/self/self.config.active.feature) | Print active takelage configuration
113
111
  tau [self config default](features/cucumber/features/self/self.config.default.feature) | Print takelage default configuration
114
112
  tau [self config home](features/cucumber/features/self/self.config.home.feature) | Print takelage home config file configuration
data/lib/takelage.rb CHANGED
@@ -21,14 +21,14 @@ require_relative 'takelage/lib/config'
21
21
  require_relative 'takelage/lib/project'
22
22
 
23
23
  require_relative 'takelage/git/check/clean'
24
- require_relative 'takelage/git/check/main'
24
+ require_relative 'takelage/git/check/bit'
25
25
  require_relative 'takelage/git/check/workspace'
26
26
  require_relative 'takelage/git/check/cli'
27
27
  require_relative 'takelage/git/cli'
28
28
  require_relative 'takelage/bit/check/workspace'
29
29
  require_relative 'takelage/bit/check/cli'
30
30
  require_relative 'takelage/bit/scope/add'
31
- require_relative 'takelage/bit/scope/inbit'
31
+ require_relative 'takelage/bit/scope/ssh'
32
32
  require_relative 'takelage/bit/scope/list'
33
33
  require_relative 'takelage/bit/scope/new'
34
34
  require_relative 'takelage/bit/scope/cli'
@@ -7,7 +7,7 @@ module Takelage
7
7
  include ConfigModule
8
8
  include SystemModule
9
9
  include GitCheckClean
10
- include GitCheckMain
10
+ include GitCheckBit
11
11
  include GitCheckWorkspace
12
12
  include BitCheckWorkspace
13
13
  include BitClipboardLib
@@ -26,7 +26,7 @@ module BitClipboardLib
26
26
 
27
27
  # Prepare git workspace for bit clipboard.
28
28
  def _bit_clipboard_lib_prepare_git_workspace
29
- unless git_check_main
29
+ unless git_check_bit
30
30
  log.error 'Not on git main branch'
31
31
  return false
32
32
  end
@@ -97,7 +97,7 @@ module BitClipboardLib
97
97
 
98
98
  cmd_bit_clipboard_git_push = format(
99
99
  config.active['cmd_bit_clipboard_git_push'],
100
- main: config.active['git_main_branch']
100
+ main: config.active['git_bit_branch']
101
101
  )
102
102
 
103
103
  run cmd_bit_clipboard_git_push
@@ -108,7 +108,7 @@ module BitClipboardLib
108
108
  log.debug 'Updating git workspace'
109
109
  cmd_bit_clipboard_git_pull = format(
110
110
  config.active['cmd_bit_clipboard_git_pull'],
111
- main: config.active['git_main_branch']
111
+ main: config.active['git_bit_branch']
112
112
  )
113
113
 
114
114
  return true if try cmd_bit_clipboard_git_pull
@@ -7,7 +7,7 @@ module Takelage
7
7
  include ConfigModule
8
8
  include SystemModule
9
9
  include GitCheckClean
10
- include GitCheckMain
10
+ include GitCheckBit
11
11
  include GitCheckWorkspace
12
12
  include BitCheckWorkspace
13
13
  include BitScopeList
@@ -28,7 +28,7 @@ module BitScopeAdd
28
28
 
29
29
  return true unless git_check_workspace
30
30
 
31
- return true if git_check_main
31
+ return true if git_check_bit
32
32
 
33
33
  log.error 'Not on git main branch'
34
34
  false
@@ -6,11 +6,11 @@ module Takelage
6
6
  include LoggingModule
7
7
  include SystemModule
8
8
  include ConfigModule
9
- include GitCheckMain
9
+ include GitCheckBit
10
10
  include GitCheckWorkspace
11
11
  include BitCheckWorkspace
12
12
  include BitScopeAdd
13
- include BitScopeInbit
13
+ include BitScopeSSH
14
14
  include BitScopeList
15
15
  include BitScopeNew
16
16
 
@@ -60,15 +60,15 @@ module Takelage
60
60
  end
61
61
 
62
62
  #
63
- # bit scope inbit
63
+ # bit scope ssh
64
64
  #
65
- desc 'inbit', 'Log in to bit remote server'
65
+ desc 'ssh', 'Log in to bit remote server'
66
66
  long_desc <<-LONGDESC.gsub("\n", "\x5")
67
67
  Log in to bit remote server
68
68
  LONGDESC
69
69
  # Log in to bit remote server.
70
- def inbit
71
- exit bit_scope_inbit
70
+ def ssh
71
+ exit bit_scope_ssh
72
72
  end
73
73
  end
74
74
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takelage bit scope inbit
4
- module BitScopeInbit
5
- # Backend method for bit scope inbit.
6
- def bit_scope_inbit
3
+ # takelage bit scope ssh
4
+ module BitScopeSSH
5
+ # Backend method for bit scope ssh.
6
+ def bit_scope_ssh
7
7
  log.debug 'Logging in to bit remote server'
8
8
 
9
9
  return false unless configured? %w[bit_ssh]
@@ -48,7 +48,7 @@ cmd_docker_image_update_docker_remove_dangling: 'docker image prune --force'
48
48
  cmd_git_check_clean_git_unstaged: 'git diff --exit-code'
49
49
  cmd_git_check_clean_git_uncommitted: 'git diff --cached --exit-code'
50
50
  cmd_git_check_clean_git_status: 'git status --porcelain'
51
- cmd_git_check_main_git_branch: 'git symbolic-ref HEAD'
51
+ cmd_git_check_bit_get_git_branch: 'git symbolic-ref HEAD'
52
52
  cmd_git_check_workspace_git_repo: 'git -C %{dir} rev-parse'
53
53
  cmd_git_check_workspace_pwd: 'pwd'
54
54
  cmd_info_status_lib_git_name: 'git -C %{root} config user.name'
@@ -76,11 +76,11 @@ docker_run_options: '--env GOOGLE_APPLICATION_CREDENTIALS=/hostdir/.google/defau
76
76
  docker_shm_size: '512M'
77
77
  docker_tag: 'latest'
78
78
  docker_user: 'takelage'
79
- git_main_branch: 'main'
79
+ git_bit_branch: 'main'
80
80
  info_project_main: 'project.yml'
81
81
  info_project_private: 'private/project.yml'
82
82
  login_wait_for_sockets: '0'
83
83
  mutagen_socket_path_mutagen: '~/.mutagen/daemon/daemon.sock'
84
84
  mutagen_socket_path_gpg: '~/.gnupg/S.gpg-agent'
85
85
  mutagen_socket_path_ssh: '~/.gnupg/S.gpg-agent.ssh'
86
- mutagen_socket_takelage_label: 'type=takelage-socket'
86
+ mutagen_socket_takelage_label: 'type=takelage'
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # takelage git check bit
4
+ module GitCheckBit
5
+ # Backend method for git check bit.
6
+ # @return [Boolean] are we on the git bit branch?
7
+ def git_check_bit
8
+ log.debug 'Check if we are on the git bit branch'
9
+
10
+ return false unless git_check_workspace
11
+
12
+ branch = _git_check_bit_get_branch
13
+ log.debug "We are on git branch \"#{branch}\""
14
+
15
+ branch == config.active['git_bit_branch']
16
+ end
17
+
18
+ private
19
+
20
+ # Get git branch.
21
+ def _git_check_bit_get_branch
22
+ cmd_get_branch =
23
+ config.active['cmd_git_check_bit_get_git_branch']
24
+ (run cmd_get_branch).chomp.split('/')[-1]
25
+ end
26
+ end
@@ -7,31 +7,31 @@ module Takelage
7
7
  include SystemModule
8
8
  include ConfigModule
9
9
  include GitCheckClean
10
- include GitCheckMain
10
+ include GitCheckBit
11
11
  include GitCheckWorkspace
12
12
 
13
13
  #
14
- # git check clean
14
+ # git check bit
15
15
  #
16
- desc 'clean', 'Check if the git workspace is clean'
16
+ desc 'bit', 'Check if we are on the git bit branch'
17
17
  long_desc <<-LONGDESC.gsub("\n", "\x5")
18
- Check if the git workspace is clean
18
+ Check if we are on the git bit branch
19
19
  LONGDESC
20
- # Check if the git workspace is clean.
21
- def clean
22
- exit git_check_clean
20
+ # Check if we are on the git bit branch.
21
+ def bit
22
+ exit git_check_bit
23
23
  end
24
24
 
25
25
  #
26
- # git check main
26
+ # git check clean
27
27
  #
28
- desc 'main', 'Check if we are on the git main branch'
28
+ desc 'clean', 'Check if the git workspace is clean'
29
29
  long_desc <<-LONGDESC.gsub("\n", "\x5")
30
- Check if we are on the git main branch
30
+ Check if the git workspace is clean
31
31
  LONGDESC
32
- # Check if we are on the git main branch.
33
- def main
34
- exit git_check_main
32
+ # Check if the git workspace is clean.
33
+ def clean
34
+ exit git_check_clean
35
35
  end
36
36
 
37
37
  #
@@ -79,11 +79,11 @@ module Takelage
79
79
  #
80
80
  # mutagen socket terminate
81
81
  #
82
- desc 'terminate', 'Terminate a mutagen socket'
82
+ desc 'terminate [SOCKET]', 'Terminate a mutagen [SOCKET]'
83
83
  long_desc <<-LONGDESC.gsub("\n", "\x5")
84
- Terminate a mutagen socket
84
+ Terminate a mutagen [SOCKET]
85
85
  LONGDESC
86
- # Terminate a mutagen socket.
86
+ # Terminate a mutagen [SOCKET].
87
87
  def terminate(socket)
88
88
  exit mutagen_socket_terminate socket
89
89
  end
data/lib/takelage/version CHANGED
@@ -1 +1 @@
1
- 0.29.10
1
+ 0.30.1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takelage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.10
4
+ version: 0.30.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geospin
@@ -220,9 +220,9 @@ files:
220
220
  - lib/takelage/bit/require/lib.rb
221
221
  - lib/takelage/bit/scope/add.rb
222
222
  - lib/takelage/bit/scope/cli.rb
223
- - lib/takelage/bit/scope/inbit.rb
224
223
  - lib/takelage/bit/scope/list.rb
225
224
  - lib/takelage/bit/scope/new.rb
225
+ - lib/takelage/bit/scope/ssh.rb
226
226
  - lib/takelage/completion/cli.rb
227
227
  - lib/takelage/default.yml
228
228
  - lib/takelage/docker/check/cli.rb
@@ -245,9 +245,9 @@ files:
245
245
  - lib/takelage/docker/image/tag/latest.rb
246
246
  - lib/takelage/docker/image/tag/list.rb
247
247
  - lib/takelage/docker/image/update.rb
248
+ - lib/takelage/git/check/bit.rb
248
249
  - lib/takelage/git/check/clean.rb
249
250
  - lib/takelage/git/check/cli.rb
250
- - lib/takelage/git/check/main.rb
251
251
  - lib/takelage/git/check/workspace.rb
252
252
  - lib/takelage/git/cli.rb
253
253
  - lib/takelage/info/cli.rb
@@ -290,7 +290,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
290
  requirements:
291
291
  - - ">="
292
292
  - !ruby/object:Gem::Version
293
- version: '2.4'
293
+ version: '2.5'
294
294
  required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
296
  - - ">="
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # takelage git check main
4
- module GitCheckMain
5
- # Backend method for git check main.
6
- # @return [Boolean] are we on the git main branch?
7
- def git_check_main
8
- log.debug 'Check if we are on the git main branch'
9
-
10
- return false unless git_check_workspace
11
-
12
- branch = _git_check_main_get_branch
13
- log.debug "We are on git branch \"#{branch}\""
14
-
15
- branch == config.active['git_main_branch']
16
- end
17
-
18
- private
19
-
20
- # Get git branch.
21
- def _git_check_main_get_branch
22
- cmd_get_branch =
23
- config.active['cmd_git_check_main_git_branch']
24
- (run cmd_get_branch).chomp.split('/')[-1]
25
- end
26
- end