lhj-tools 0.2.35 → 0.2.37

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: a969e4949684e7386beedaad3e9c82d4a7d9d57b1994a13e91e8a3a4c2ad63f0
4
- data.tar.gz: b68482b147e53a378146c617e9be6f22ea72ac04172580c3466806744e5ee554
3
+ metadata.gz: 0eaa7959845d72417a6ce58dffa0a4588102583824e5f578ceafe428c5e868bd
4
+ data.tar.gz: a12ab0536e65236c4b716045f181a4a7026914cacf3f360c5d28e7371c6a4adf
5
5
  SHA512:
6
- metadata.gz: 8490b672bc5fac962928c92fd70985bba2495383196e51f204a10722e9d28d5070f7ff987714e947849b6e3709ced32e6e8da8dc67078fb759c6e2f2425b4f78
7
- data.tar.gz: 45cd089ea7a9e85c081971c8d14953ad59b81835834a963ab6c66ec9b3947f08361b7698c19c2e3a39ea1e574ac9f17e723cb8d9b5875ff189ab4da0abbdf8d7
6
+ metadata.gz: 5320d5b42081f5c1e72d84ebab2919d1f4555dbfb9dbbf5214f24dd209936cc774ad52a6cfb68c264af642a0a88bbcfc1accf1802b99d3baee4a72fb6ab5b929
7
+ data.tar.gz: 6734984f87df374b44717406a9aaf3eab2fd0fd0f8dc676939638e929e16e11ab4c841106d77f8ca8292f6f266c30cdddac5977f4cd2338fdd57f5b893ee834c
@@ -29,6 +29,7 @@ module Lhj
29
29
  puts "update: #{bucket['name']} -- #{bucket['location']}"
30
30
  Lhj::OSSConfig.oss_endpoint = "#{bucket['location']}.aliyuncs.com"
31
31
  Lhj::OSSConfig.oss_bucket = bucket['name']
32
+ Lhj::OSSConfig.oss_domain = bucket['domain']
32
33
  Lhj::OSSConfig.save
33
34
  end
34
35
  end
@@ -15,6 +15,10 @@ module Lhj
15
15
  @yaml ||= YAML.load_file(config_file)
16
16
  end
17
17
 
18
+ def self.clean
19
+ @yaml = nil
20
+ end
21
+
18
22
  def self.api_key(idx)
19
23
  i = idx % config.length
20
24
  config[i]['api_key']
@@ -15,6 +15,10 @@ module Lhj
15
15
  @yaml ||= YAML.load_file(config_file)
16
16
  end
17
17
 
18
+ def self.clean
19
+ @yaml = nil
20
+ end
21
+
18
22
  def self.agent_id
19
23
  config['agent_id']
20
24
  end
@@ -13,6 +13,10 @@ module Lhj
13
13
  @yaml ||= YAML.load_file(config_file)
14
14
  end
15
15
 
16
+ def self.clean
17
+ @yaml = nil
18
+ end
19
+
16
20
  def self.oss_endpoint
17
21
  config['oss_endpoint']
18
22
  end
@@ -37,6 +41,14 @@ module Lhj
37
41
  config['oss_bucket'] = bucket
38
42
  end
39
43
 
44
+ def self.oss_domain
45
+ config['oss_domain']
46
+ end
47
+
48
+ def self.oss_domain=(domain)
49
+ config['oss_domain'] = domain
50
+ end
51
+
40
52
  def self.oss_bucket_list
41
53
  config['oss_bucket_list']
42
54
  end
@@ -16,7 +16,7 @@ module Lhj
16
16
  end
17
17
 
18
18
  def url_path
19
- "http://#{Lhj::OSSConfig.oss_bucket}.#{Lhj::OSSConfig.oss_endpoint}"
19
+ Lhj::OSSConfig.oss_domain || "http://#{Lhj::OSSConfig.oss_bucket}.#{Lhj::OSSConfig.oss_endpoint}"
20
20
  end
21
21
 
22
22
  def upload(key, file)
@@ -15,6 +15,10 @@ module Lhj
15
15
  @yaml ||= YAML.load_file(config_file)
16
16
  end
17
17
 
18
+ def self.clean
19
+ @yaml = nil
20
+ end
21
+
18
22
  def self.base_url
19
23
  config['base_url']
20
24
  end
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.35'
4
+ VERSION = '0.2.37'
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.35
4
+ version: 0.2.37
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-27 00:00:00.000000000 Z
11
+ date: 2023-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj