fastlane-plugin-pgyer 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fb291d59a4357d982cc8574ede928d65f8403cd5
4
- data.tar.gz: 3d89a26d4d670be01f355237e6a5978d79562096
2
+ SHA256:
3
+ metadata.gz: 9b3168d388cca58506137723c74a12cd472e84e6b5c5d01ae72a3dde55aa9cee
4
+ data.tar.gz: f6f898ceb67bcc0491b0495743f7a86c9a7cafcdccc20be17a95e1f735c3501a
5
5
  SHA512:
6
- metadata.gz: 7ae01ac525bb4782e98f30212d6e7d64a5facd3ba69e5bfe7548a475ae192dfb0ae94fde55629d79ccb64ce6f13f6b61649e4716f9abbbf7b59ddcb15aadbbd1
7
- data.tar.gz: 5df252198999f05d3d44be7412b800bd1b7f4449a9c0c29fcad16c40d0989625ec7b7be3e763b524d3cc509ca4e3662a8623342cde1f62b9fdb8078a53d38cc7
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
- params[:ipa],
17
- params[:apk]
15
+ params[:ipa],
16
+ params[:apk]
18
17
  ].detect { |e| !e.to_s.empty? }
19
18
 
20
19
  if build_file.nil?
21
- UI.user_error!("You have to provide a build file")
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
- password = ""
27
+ password = ""
29
28
  end
30
29
 
31
30
  update_description = params[:update_description]
32
31
  if update_description.nil?
33
- update_description = ""
32
+ update_description = ""
34
33
  end
35
34
 
36
35
  install_type = params[:install_type]
37
36
  if install_type.nil?
38
- install_type = "1"
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
- c.request :multipart
51
- c.request :url_encoded
52
- c.response :json, content_type: /\bjson$/
53
- c.adapter :net_http
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
- UI.success "Upload success. Visit this URL to see: https://www.pgyer.com/#{info['data']['appShortcutUrl']}"
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
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Pgyer
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
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.1
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: 2017-03-20 00:00:00.000000000 Z
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.6.9
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