fastlane-plugin-pgyer 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: b06e8e3538ad581bc8e634cb986aaa5f197a9af6
4
- data.tar.gz: 6f2cfa9684e03414c28225d2493b8f60c907a26b
3
+ metadata.gz: 9503638372eea36f41d8b7019467f0b5a78359a9
4
+ data.tar.gz: b774d3653ecf3c1cabce057cf5680db6e6de9068
5
5
  SHA512:
6
- metadata.gz: d80ff8b9396f6276edefa005736dd6cd76c54721073d5e16ce675bf4446972728d0abe5559ea8600786f76c495ac9cd3e06cf195e2fdcd094f84485494e6aa66
7
- data.tar.gz: 57ab911768b9b6dfe5a34d8430610ae40769a5452f2abd6c5ba50d0652a2752c8b6f85d53da45c2ac4083e6fe8fcfd32e4c57adc9749168739920b3980bc4ef7
6
+ metadata.gz: 372a1b3bc989641c45647af02c74162c472b0bfd3baa0ced530b6a6e2fc1ae870d7095507b802e171c440334c1446ef13a9a82baf7452c5b0bc17252e82505e6
7
+ data.tar.gz: 01a69a14f617709612f62397ed5b5743f6a4f22cce530110a26fd026270e60a22073b2faff55c3b02aa74dc00169f9de2f147015f8b960b47cfae647c3968524
data/README.md CHANGED
@@ -12,15 +12,20 @@ fastlane add_plugin pgyer
12
12
 
13
13
  ## About pgyer
14
14
 
15
- distribute app to pgyer beta testing service
16
-
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
15
+ This pluginin allow you distribute app automatically to [pgyer beta testing service](https://www.pgyer.com) in fastlane workflow.
18
16
 
19
17
  ## Example
20
18
 
21
19
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
20
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
21
+ Just specify the `api_key` and `user_key` associated with your pgyer account.
22
+
23
+ ```
24
+ lane :beta do
25
+ gym
26
+ pgyer(api_key: "7f15xxxxxxxxxxxxxxxxxx141", user_key: "4a5bcxxxxxxxxxxxxxxx3a9e")
27
+ end
28
+ ```
24
29
 
25
30
  ## Run tests for this plugin
26
31
 
@@ -6,7 +6,7 @@ module Fastlane
6
6
  class PgyerAction < Action
7
7
 
8
8
  def self.run(params)
9
- UI.message("The pgyer plugin is working!")
9
+ UI.message("The pgyer plugin is working.")
10
10
 
11
11
  api_host = "http://qiniu-storage.pgyer.com/apiv1/app/upload"
12
12
  api_key = params[:api_key]
@@ -23,6 +23,21 @@ module Fastlane
23
23
 
24
24
  UI.message "build_file: #{build_file}"
25
25
 
26
+ password = params[:password]
27
+ if password.nil?
28
+ password = ""
29
+ end
30
+
31
+ update_description = params[:update_description]
32
+ if update_description.nil?
33
+ update_description = ""
34
+ end
35
+
36
+ install_type = params[:install_type]
37
+ if install_type.nil?
38
+ install_type = "1"
39
+ end
40
+
26
41
  # start upload
27
42
  conn_options = {
28
43
  request: {
@@ -41,6 +56,9 @@ module Fastlane
41
56
  params = {
42
57
  '_api_key' => api_key,
43
58
  'uKey' => user_key,
59
+ 'password' => password,
60
+ 'updateDescription' => update_description,
61
+ 'installType' => install_type,
44
62
  'file' => Faraday::UploadIO.new(build_file, 'application/octet-stream')
45
63
  }
46
64
 
@@ -106,6 +124,21 @@ module Fastlane
106
124
  conflict_block: proc do |value|
107
125
  UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
108
126
  end),
127
+ FastlaneCore::ConfigItem.new(key: :password,
128
+ env_name: "PGYER_PASSWORD",
129
+ description: "set password to protect app",
130
+ optional: true,
131
+ type: String),
132
+ FastlaneCore::ConfigItem.new(key: :update_description,
133
+ env_name: "PGYER_UPDATE_DESCRIPTION",
134
+ description: "set update description for app",
135
+ optional: true,
136
+ type: String),
137
+ FastlaneCore::ConfigItem.new(key: :install_type,
138
+ env_name: "PGYER_INSTALL_TYPE",
139
+ description: "set install type for app (1=public, 2=password, 3=invite). Please set as a string.",
140
+ optional: true,
141
+ type: String),
109
142
  ]
110
143
  end
111
144
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Pgyer
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rexshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-21 00:00:00.000000000 Z
11
+ date: 2017-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry