lhj-tools 0.2.34 → 0.2.35

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: 3cc00706a73b9e787e9d9336da8f7c8e5e787ff6e6192dff2383e65792561ec0
4
- data.tar.gz: 83c616ccc6b192910102979f6c091d9e48b36938588391b963a659362dd0604a
3
+ metadata.gz: a969e4949684e7386beedaad3e9c82d4a7d9d57b1994a13e91e8a3a4c2ad63f0
4
+ data.tar.gz: b68482b147e53a378146c617e9be6f22ea72ac04172580c3466806744e5ee554
5
5
  SHA512:
6
- metadata.gz: e1062fd7c95362b9c0cac73359276d929fe49b30643522f8fb11f4ef8f311fcc505974d934f703bacf29a16d29213906d80a97d96bacad99a467d9ead2c98943
7
- data.tar.gz: 158f1213427ce173a39537f0b8187c7ad3de2992d4b7bdcf643e46a1d0ab04e478ae0aae25c2b0603e49d328522eaa19ef45ef4303e4ccc0e9592a51d57a7276
6
+ metadata.gz: 8490b672bc5fac962928c92fd70985bba2495383196e51f204a10722e9d28d5070f7ff987714e947849b6e3709ced32e6e8da8dc67078fb759c6e2f2425b4f78
7
+ data.tar.gz: 45cd089ea7a9e85c081971c8d14953ad59b81835834a963ab6c66ec9b3947f08361b7698c19c2e3a39ea1e574ac9f17e723cb8d9b5875ff189ab4da0abbdf8d7
@@ -20,7 +20,7 @@ module Lhj
20
20
 
21
21
  def handle
22
22
  objects = Lhj::OSS::Helper.instance.list
23
- obj_keys = objects.map(&:key)
23
+ obj_keys = objects.map(&:key).sort { |a, b| a <=> b }
24
24
  obj_keys.each_with_index { |k, i| puts "#{i}.#{k}".yellow }
25
25
  idx = @cli.ask('请选择删除的key: '.green)
26
26
  idx_arr = idx.split(',').map(&:strip).filter { |v| v.length.positive? }
@@ -63,7 +63,7 @@ module Lhj
63
63
 
64
64
  def request_oss_keys
65
65
  objects = Lhj::OSS::Helper.instance.list
66
- obj_keys = objects.map(&:key)
66
+ obj_keys = objects.map(&:key).sort { |a, b| a <=> b }
67
67
  obj_keys.each_with_index { |k, i| puts "#{i}.#{k}".yellow }
68
68
  end
69
69
 
@@ -46,7 +46,7 @@ module Lhj
46
46
  list_opts[:marker] = @marker if @marker
47
47
  list_opts[:delimiter] = '/' if @all_folder
48
48
  objects = Lhj::OSS::Helper.instance.list(list_opts)
49
- obj_keys = objects.map(&:key) unless @all_folder
49
+ obj_keys = objects.map(&:key).sort { |a, b| a <=> b } unless @all_folder
50
50
  obj_keys = objects.filter { |o| o.is_a?(String) } if @all_folder
51
51
  save(obj_keys) if @save
52
52
  print(obj_keys) unless @clear
@@ -39,7 +39,7 @@ module Lhj
39
39
 
40
40
  def handle
41
41
  file_list = []
42
- Dir.glob("#{@current_path}/*").each_with_index do |f, i|
42
+ Dir.glob("#{@current_path}/*").sort { |a, b| File.basename(a) <=> File.basename(b) }.each_with_index do |f, i|
43
43
  file_list << f
44
44
  puts "#{i}.#{File.basename(f)}".yellow
45
45
  end
@@ -60,7 +60,7 @@ module Lhj
60
60
  response = http_client.post API_HOST, params
61
61
  @result = response.body
62
62
  puts @result
63
- Actions.sh('git restore ./', log: false)
63
+ Actions.sh('git restore ./', log: false) if File.exist?(File.expand_path('./.git'))
64
64
  puts 'upload success'
65
65
  # if @result['data'] && @result['data']['appUpdateDescription'] && @env == :uat
66
66
  # str = Lhj::TbHelper.trans_tb(@result['data']['appUpdateDescription'])
data/lib/lhj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lhj
4
- VERSION = '0.2.34'
4
+ VERSION = '0.2.35'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.34
4
+ version: 0.2.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj