lhj-tools 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhj/helper/pgyer_helper.rb +11 -1
- data/lib/lhj/tools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8fa90967ee885cff64ed4b4d175cf1178919449b42aa8e644ad5fedf17386de
|
4
|
+
data.tar.gz: 750834e640eb75b5653e4f9639dc9b09bf5c320ac34bf721ab637f881729fc08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b08ab0ab7d6bb7ac5fe0e38bd823032779370b4e6265444db96f691078502d10c199656297b7190f1eaa1be92a76c701f6ec1c467aede28c49464853ccb1add1
|
7
|
+
data.tar.gz: 1a546488cdfca768c14599022da2d80cb5eca23a272d71fbc75b879b74a2f9d99d9574afae62316fad2cd7ebd54010a001396219a5b42eec7f065ba87f09d6cc
|
@@ -18,6 +18,7 @@ module Lhj
|
|
18
18
|
@api_key = Lhj::PgyerConfig.api_key(env)
|
19
19
|
@user_key = Lhj::PgyerConfig.user_key(env)
|
20
20
|
@password = Lhj::PgyerConfig.password(env)
|
21
|
+
@env = env
|
21
22
|
@result = { 'data' => {} }
|
22
23
|
end
|
23
24
|
|
@@ -38,7 +39,6 @@ module Lhj
|
|
38
39
|
end
|
39
40
|
|
40
41
|
def upload_file(file, des)
|
41
|
-
|
42
42
|
update_description = @result[:update_description]
|
43
43
|
update_description = '' if update_description.nil?
|
44
44
|
params = {
|
@@ -49,6 +49,7 @@ module Lhj
|
|
49
49
|
'installType' => 2,
|
50
50
|
'file' => Faraday::UploadIO.new(file, 'application/octet-stream')
|
51
51
|
}
|
52
|
+
upload_code
|
52
53
|
begin
|
53
54
|
puts 'begin upload...'
|
54
55
|
response = http_client.post API_HOST, params
|
@@ -65,6 +66,15 @@ module Lhj
|
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
69
|
+
def upload_code
|
70
|
+
if @env == :release
|
71
|
+
# packing
|
72
|
+
current_dir = File.dirname(__FILE__)
|
73
|
+
puts current_dir
|
74
|
+
# upload to oss
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
68
78
|
def render_template
|
69
79
|
temp_str = File.read(File.join(Lhj::Config.instance.home_dir, 'pgyer.erb'))
|
70
80
|
Lhj::ErbFormatter::Service.new(self).render_template(temp_str)
|
data/lib/lhj/tools/version.rb
CHANGED