fastlane-plugin-pgyer 0.2.1 → 0.2.2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9b3168d388cca58506137723c74a12cd472e84e6b5c5d01ae72a3dde55aa9cee
|
4
|
+
data.tar.gz: f6f898ceb67bcc0491b0495743f7a86c9a7cafcdccc20be17a95e1f735c3501a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dd499a1f68dcddb5dccbd8199d7fe3c8b4a8f24b37143f77b0dae49442b9f084bab07e925a97650d7e45127578e39107c1e1c40210b3c0fcf0ffb3436b893da
|
7
|
+
data.tar.gz: 82bb3f9e4281e6f285c5ede18c7c5f26bbebac39de87801c3da0a2b6c3817f2cffa60689f6291895a749678c2059ccb76698f09971297055143275b36f353d84
|
@@ -4,7 +4,6 @@ require 'faraday_middleware'
|
|
4
4
|
module Fastlane
|
5
5
|
module Actions
|
6
6
|
class PgyerAction < Action
|
7
|
-
|
8
7
|
def self.run(params)
|
9
8
|
UI.message("The pgyer plugin is working.")
|
10
9
|
|
@@ -13,29 +12,29 @@ module Fastlane
|
|
13
12
|
user_key = params[:user_key]
|
14
13
|
|
15
14
|
build_file = [
|
16
|
-
|
17
|
-
|
15
|
+
params[:ipa],
|
16
|
+
params[:apk]
|
18
17
|
].detect { |e| !e.to_s.empty? }
|
19
18
|
|
20
19
|
if build_file.nil?
|
21
|
-
|
20
|
+
UI.user_error!("You have to provide a build file")
|
22
21
|
end
|
23
22
|
|
24
23
|
UI.message "build_file: #{build_file}"
|
25
24
|
|
26
25
|
password = params[:password]
|
27
26
|
if password.nil?
|
28
|
-
|
27
|
+
password = ""
|
29
28
|
end
|
30
29
|
|
31
30
|
update_description = params[:update_description]
|
32
31
|
if update_description.nil?
|
33
|
-
|
32
|
+
update_description = ""
|
34
33
|
end
|
35
34
|
|
36
35
|
install_type = params[:install_type]
|
37
36
|
if install_type.nil?
|
38
|
-
|
37
|
+
install_type = "1"
|
39
38
|
end
|
40
39
|
|
41
40
|
# start upload
|
@@ -47,10 +46,10 @@ module Fastlane
|
|
47
46
|
}
|
48
47
|
|
49
48
|
pgyer_client = Faraday.new(nil, conn_options) do |c|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
c.request :multipart
|
50
|
+
c.request :url_encoded
|
51
|
+
c.response :json, content_type: /\bjson$/
|
52
|
+
c.adapter :net_http
|
54
53
|
end
|
55
54
|
|
56
55
|
params = {
|
@@ -67,8 +66,11 @@ module Fastlane
|
|
67
66
|
response = pgyer_client.post api_host, params
|
68
67
|
info = response.body
|
69
68
|
|
70
|
-
|
69
|
+
if info['code'] != 0
|
70
|
+
UI.user_error!("PGYER Plugin Error: #{info['message']}")
|
71
|
+
end
|
71
72
|
|
73
|
+
UI.success "Upload success. Visit this URL to see: https://www.pgyer.com/#{info['data']['appShortcutUrl']}"
|
72
74
|
end
|
73
75
|
|
74
76
|
def self.description
|
@@ -138,7 +140,7 @@ module Fastlane
|
|
138
140
|
env_name: "PGYER_INSTALL_TYPE",
|
139
141
|
description: "set install type for app (1=public, 2=password, 3=invite). Please set as a string",
|
140
142
|
optional: true,
|
141
|
-
type: String)
|
143
|
+
type: String)
|
142
144
|
]
|
143
145
|
end
|
144
146
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-pgyer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rexshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.7.7
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: distribute app to pgyer beta testing service
|