pixab 1.9.0 → 1.9.1

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: f50adcb68e83e75958401c6f4702e41953c420ea796c305f2bad239f8b627ff1
4
+ data.tar.gz: d77dca3ff3842a8bc9952d222906066fd018ab51bc0ec8eaf9dfe6f2f576c6ac
5
5
  SHA512:
6
- metadata.gz: bd569f56a0420a882377aede3a6f78ae0909ca066477a4669dc2166e7aec4c077d0f050f49ac965519bc07bd15521cb01b8f578ff279fa03ea62176c75144569
7
- data.tar.gz: 0face14f5ad601b66713ab16432cb930e8a20637a71fad8770e34b12f989894c545997f95776a621ebdd9a1d86784e00cee7ecc7d4d8aa04093ed0291a62f84a
6
+ metadata.gz: cd5b9cac308d3ffaf426c09906f43e83052acc48911bfed30aa8383de440ee62102a70c59c98562acbafbd87e70561330b608cffa611776efd394ace9a057930
7
+ data.tar.gz: 71b6e1105640c2c94f0542fc63ed4f0f21ce9e0e6015b975fa497a6aae7198e1963dd2b581dc9f2e963ca8b7e82b31ab283df7318783dddddbf30854f5fe5a23
data/lib/mbox/MboxAdd.rb CHANGED
@@ -7,25 +7,34 @@ 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
+ end
24
+ end
25
+
17
26
  if commands.empty?
18
27
  repo_names = get_all_sub_repo_names
19
28
  if !repo_names.empty?
20
29
  selected_item_names = Utilities.display_choose_list(repo_names, nil, "仓库", "请选择需要添加的仓库:", nil, nil, true)
21
30
  selected_item_names.each do |repo_name|
22
- add_repo([repo_name.strip, AirBrushProjectInfo::DEFAULT_BRANCH])
31
+ add_repo([repo_name.strip, @default_branch])
23
32
  end
24
33
  end
25
34
  elsif commands[0] == "--all"
26
35
  repo_names = get_all_sub_repo_names
27
36
  repo_names.each do |repo_name|
28
- add_repo([repo_name, AirBrushProjectInfo::DEFAULT_BRANCH])
37
+ add_repo([repo_name, @default_branch])
29
38
  end
30
39
  else
31
40
  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.1"
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.1
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-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2