pixab 1.9.0 → 1.9.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdba62ae7047c7ef946363083adac26824b0cb07b225e271835be82bc6665ed6
4
- data.tar.gz: cfceb1c4a436385adf52dfc6eef0ac38d059ce0696abff97e348c2c6d4f62e15
3
+ metadata.gz: aefa3c5d3ed4fd4331affe5c8cc8523ed0403efb88aa98d78257617a4973ea89
4
+ data.tar.gz: 01df65aa135899324a2819dc0a85bd2b5fdc2196862d445180c73fd45c677c82
5
5
  SHA512:
6
- metadata.gz: bd569f56a0420a882377aede3a6f78ae0909ca066477a4669dc2166e7aec4c077d0f050f49ac965519bc07bd15521cb01b8f578ff279fa03ea62176c75144569
7
- data.tar.gz: 0face14f5ad601b66713ab16432cb930e8a20637a71fad8770e34b12f989894c545997f95776a621ebdd9a1d86784e00cee7ecc7d4d8aa04093ed0291a62f84a
6
+ metadata.gz: c8370d3b0c946b4603104da4f1795ec34af95175a3241a1cb203b1d45b38292ec122aecbf75639259b1d91bc7b72ec21ff66d96190d2e01765bc8f17529ddb5e
7
+ data.tar.gz: 856d429275f5217345ea86dcdc5c59be67b8fdc2ab9d1c641f550b407362763582dfdea098e54576613da728d3faf6ecc202926bfa724f90ea21046b0b2634d5
data/lib/mbox/MboxAdd.rb CHANGED
@@ -7,25 +7,36 @@ module Pixab
7
7
 
8
8
  class MboxAdd
9
9
 
10
- attr_reader :repo_manager
10
+ attr_reader :repo_manager, :default_branch
11
11
 
12
12
  def initialize(repo_manager)
13
13
  @repo_manager = repo_manager
14
+ @default_branch = AirBrushProjectInfo::DEFAULT_BRANCH
14
15
  end
15
16
 
16
17
  def run(commands)
18
+ commands.each_index do |index|
19
+ command = commands[index]
20
+ case command
21
+ when "--default-branch"
22
+ @default_branch = commands[index + 1]
23
+ commands.delete_at(index + 1)
24
+ commands.delete_at(index)
25
+ end
26
+ end
27
+
17
28
  if commands.empty?
18
29
  repo_names = get_all_sub_repo_names
19
30
  if !repo_names.empty?
20
31
  selected_item_names = Utilities.display_choose_list(repo_names, nil, "仓库", "请选择需要添加的仓库:", nil, nil, true)
21
32
  selected_item_names.each do |repo_name|
22
- add_repo([repo_name.strip, AirBrushProjectInfo::DEFAULT_BRANCH])
33
+ add_repo([repo_name.strip, @default_branch])
23
34
  end
24
35
  end
25
36
  elsif commands[0] == "--all"
26
37
  repo_names = get_all_sub_repo_names
27
38
  repo_names.each do |repo_name|
28
- add_repo([repo_name, AirBrushProjectInfo::DEFAULT_BRANCH])
39
+ add_repo([repo_name, @default_branch])
29
40
  end
30
41
  else
31
42
  add_repo(commands)
data/lib/pixab/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pixab
4
- VERSION = "1.9.0"
4
+ VERSION = "1.9.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 廖再润
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-30 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2