cocoapods-localzedLoader 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/LanguageDownloader.rb +9 -7
- data/lib/cocoapods-localzedLoader/gem_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 773296b67a1b06bf152cabdeff9db2298e1eda863f40657c160cf68b758b3e0c
|
4
|
+
data.tar.gz: bdd1c0da3eba0784b13300e12166aed926e0fa0c66573654143789d5a8b58f5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de490d928e14b6ceb45c6e28ae15ad17089eda3b0d8155d38aa42ae6a91ee43030359c70a8643b1086f19b7f548c2b712097ad89aab693d2a785ab3696cf393
|
7
|
+
data.tar.gz: 8ac0880be084c20fa8a6a41ad771fe9404f84d8979dff779bb6f48d565a03f68a33edd7af9344b94e5860d326c612011028aea5a79263d0c99da4ce219ab320b
|
data/lib/LanguageDownloader.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'httparty'
|
3
3
|
require 'zip'
|
4
4
|
require 'fileutils'
|
5
|
+
require 'colored2'
|
5
6
|
|
6
7
|
class LanguageDownloader
|
7
8
|
|
@@ -10,8 +11,7 @@ accept-encoding: gzip, deflate, br
|
|
10
11
|
accept-language: zh
|
11
12
|
content-length: 182
|
12
13
|
content-type: application/json
|
13
|
-
cookie:
|
14
|
-
lang: zh
|
14
|
+
cookie: sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%221859aeaeae8ac6-062e0ea9cca7ea-17525635-2073600-1859aeaeae9f16%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%7D%2C%22%24device_id%22%3A%221859aeaeae8ac6-062e0ea9cca7ea-17525635-2073600-1859aeaeae9f16%22%7D; Token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0OTAyODA1ZjNlYTQxODgyLjY5Mjg0MTEzMjM5Mjc5MjA2NSIsImlzcyI6Imh0dHBzOi8vYWlvdC1ycGMuYXFhcmEuY24iLCJhY2NvdW50IjoiamluZ3lhLmx1LWExMDc5QGFxYXJhLmNvbSIsImlhdEdtdDgiOjE2NzQ5ODM4MTMsImp0aSI6IjYxMTE3MDY3ZTRmNDQ2Mzg5YzI3Y2IxNDNjYTk5ZTRlMDdiMGZjNThmOWZlNGJjNjg5MjI2NjMxNWYwMzIxZDUifQ.AA90VKxT6zjlxnkFpaOMO9ujTXrssEXxuRp0WRhliGM; Userid=4902805f3ea41882.692841132392792065; currentSid=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0OTAyODA1ZjNlYTQxODgyLjY5Mjg0MTEzMjM5Mjc5MjA2NSIsImlzcyI6Imh0dHBzOi8vYWlvdC1ycGMuYXFhcmEuY24iLCJpYXRHbXQ4IjoxNjc0OTgzODEzLCJqdGkiOiIwZTY3NThjMjM3NGY0YmJiOWE3NjBmYzI0ZmZkY2NmODYzNGI4ODRjZGM1NTRjM2NiNTU1YzNkZjdmN2NjNWNhIn0.r7cBEpWVHWSpHH6zDX32FXNjMQ6IZN0DFBc3Oa8Tb5w; currentAccount=jingya.lu-a1079@aqara.com; userInfo=%7B%22accountCategory%22%3A%220%22%2C%22company%22%3A%7B%22companyId%22%3A1%2C%22companyName%22%3A%22%E7%BB%BF%E7%B1%B3%E8%81%94%E5%88%9B%22%7D%2C%22user%22%3A%7B%22avatarUrl%22%3A%22%22%2C%22companyId%22%3A1%2C%22email%22%3A%22jingya.lu-a1079%40aqara.com%22%2C%22nickName%22%3A%22%22%2C%22userName%22%3A%22%E9%B2%81%E9%9D%99%E4%BA%9A%22%2C%22userType%22%3A0%7D%7D; sidebarStatus=0lang: zh
|
15
15
|
nonce: k9a7yh3vjjyd6vb47ktmcyh50bv3m3c2
|
16
16
|
operate-platform: 40
|
17
17
|
origin: https://intl-lang.aqara.com
|
@@ -43,11 +43,13 @@ user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (
|
|
43
43
|
|
44
44
|
params = {"projectIdList":[5],"langIds":[1,2,3,9,10,11,12,13,14,15],"fileTypeList":["excel"],"auditState":1,"valueState":0,"userId":"","value":"","tagIds":nil,"bizUseTagIds":nil,"pkeys":[]}
|
45
45
|
response = HTTParty.post('https://intl-lang.aqara.com/v1.0/lumi/language/file/export', body: JSON.generate(params), headers:LanguageDownloader.makeHeader)
|
46
|
-
# puts response.body
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
# puts response.body
|
47
|
+
unless response.body["code"] == nil
|
48
|
+
3.times do
|
49
|
+
puts "资源包下载失败了!!!!! code:#{response.body}".red
|
50
|
+
end
|
51
|
+
return
|
52
|
+
end
|
51
53
|
destation_path = "./localize.zip"
|
52
54
|
if File.exist? destation_path
|
53
55
|
FileUtils.rm_rf destation_path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-localzedLoader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeremylu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
76
|
+
rubygems_version: 3.1.4
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: A longer description of cocoapods-localzedLoader.
|