fastlane-plugin-emerge 0.4.1 → 0.5.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
  SHA256:
3
- metadata.gz: 06cb7ccc63c9a9b947b50d3e892d8f7a9d80ae52227b1eb2ec3686859e349d87
4
- data.tar.gz: 1d78c2cfff077640ed1c7024596cbf115361392bb620edf9edc9fdd15c1da05f
3
+ metadata.gz: 86bc85e26613527f77ae725575824b2d4c2dd5dde9ab0814f716ab8efd4875c0
4
+ data.tar.gz: 3fcd9202ed9ca7d5ff16b221ad9c9d0e0e7af1cc2febbadb6e8f96cf8c498ca6
5
5
  SHA512:
6
- metadata.gz: b219dda48c6c219179eec0691a6b21615eb68faf76e972e634ce15fb5c50c9d54c9a242224590409206a03177afbde4f50bbfaa2761c693832b03d108536e050
7
- data.tar.gz: 655f1a31d098222c4e2248545c702a68680d58f2deffa9eaaeb7b0353c4e3c11a9ed1e530f41a56baec9c1494261a7d0a69f54aeb9e6f9c98394af5506a93c8a
6
+ metadata.gz: 330252fc7c00bdba4a91bd9a206dad404886c8d99631a3cc3da5efe6ee1b55e46cc0e298441fa54f5807f881cb395baf3fe3400da63c983b13182f9c25d52e2b
7
+ data.tar.gz: abce90f5e848cad8c840f0d94130518ed318b776af6543d75bc73105dac295667fabf4aaff68aa06e72ae00a89956eec7f725ed54d06d460005fe396dfa3723f
@@ -0,0 +1,65 @@
1
+ require 'fastlane/action'
2
+ require 'tmpdir'
3
+ require 'tempfile'
4
+ require 'fileutils'
5
+
6
+ module Fastlane
7
+ module Actions
8
+ class EmergeOrderFileAction < Action
9
+ def self.run(params)
10
+ resp = Faraday.get("https://order-files-prod.emergetools.com/#{params[:app_id]}", nil, {'X-API-Token' => params[:api_token]})
11
+ case resp.status
12
+ when 200
13
+ Tempfile.create do |f|
14
+ f.write(resp.body)
15
+ decompressed = IO.popen(['gunzip', '-c', f.path]).read
16
+ IO.write(params[:output_path], decompressed)
17
+ end
18
+ when 401
19
+ UI.error("Unauthorized")
20
+ else
21
+ UI.error("Failed to download order file code: #{resp.status}")
22
+ end
23
+
24
+ end
25
+ def self.description
26
+ "Fastlane plugin to download order files"
27
+ end
28
+
29
+ def self.authors
30
+ ["Emerge Tools"]
31
+ end
32
+
33
+ def self.return_value
34
+ # If your method provides a return value, you can describe here what it does
35
+ end
36
+
37
+ def self.details
38
+ # Optional:
39
+ ""
40
+ end
41
+
42
+ def self.available_options
43
+ [
44
+ FastlaneCore::ConfigItem.new(key: :api_token,
45
+ env_name: "EMERGE_API_TOKEN",
46
+ description: "An API token for Emerge",
47
+ optional: false,
48
+ type: String),
49
+ FastlaneCore::ConfigItem.new(key: :app_id,
50
+ description: "Id of the app being built with the order file",
51
+ optional: false,
52
+ type: String),
53
+ FastlaneCore::ConfigItem.new(key: :output_path,
54
+ description: "Path to the order file",
55
+ optional: false,
56
+ type: String)
57
+ ]
58
+ end
59
+
60
+ def self.is_supported?(platform)
61
+ platform == :ios
62
+ end
63
+ end
64
+ end
65
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Emerge
3
- VERSION = "0.4.1"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-emerge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emerge Tools, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -161,6 +161,7 @@ files:
161
161
  - lib/fastlane/plugin/emerge.rb
162
162
  - lib/fastlane/plugin/emerge/actions/emerge_action.rb
163
163
  - lib/fastlane/plugin/emerge/actions/emerge_comment_action.rb
164
+ - lib/fastlane/plugin/emerge/actions/emerge_order_file_action.rb
164
165
  - lib/fastlane/plugin/emerge/helper/emerge_helper.rb
165
166
  - lib/fastlane/plugin/emerge/version.rb
166
167
  homepage: https://github.com/EmergeTools/fastlane-plugin-emerge