fastlane-plugin-stream_actions 0.1.26 → 0.2.1
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c68cd290b77976f04143da0e794c1847df520cfcaba6a5649319879202fd69
|
4
|
+
data.tar.gz: 753cdc1d6d20214fc4ea34689d04d7f641957330ee3ceac98660965de4fd48db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e007bb35ff6c21140c3629dc4640e6b524cfe1645f6496454091bfbf27741dc808051dcf8fe628981c0a7c919be1ced5dff52fb88f48a37b3bfac3721894694f
|
7
|
+
data.tar.gz: d8f8c2602d1331f2b8aaf8926c1e1e462cd86295a1a97091a6e24b03bfda4a7ab9e26a034a115632788154597baf7a83331a701fb519185a9f4ca09937b83aac
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class PrepareSimulatorAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
simulators = FastlaneCore::Simulator.all
|
6
|
+
version_provided = params[:device] =~ /\((\d+\.)?(\d+\.)?(\*|\d+)\)/
|
7
|
+
sim = if version_provided
|
8
|
+
simulators.detect { |d| "#{d.name} (#{d.os_version})" == params[:device] }
|
9
|
+
else
|
10
|
+
simulators.filter { |d| d.name == params[:device] }.max_by(&:os_version)
|
11
|
+
end
|
12
|
+
|
13
|
+
if sim.nil?
|
14
|
+
simulators.map! { |d| version_provided ? "#{d.name} (#{d.os_version})" : d.name }
|
15
|
+
UI.user_error!("Simulator #{params[:device]} not found \nAvailable simulators: \n#{simulators.join("\n")}")
|
16
|
+
else
|
17
|
+
sim.reset if params[:reset]
|
18
|
+
sh("xcrun simctl bootstatus #{sim.udid} -b")
|
19
|
+
UI.success("Simulator #{sim.name} (#{sim.os_version}) is ready")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
#####################################################
|
24
|
+
# @!group Documentation
|
25
|
+
#####################################################
|
26
|
+
|
27
|
+
def self.description
|
28
|
+
'Prepares simulator for tests'
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.available_options
|
32
|
+
[
|
33
|
+
FastlaneCore::ConfigItem.new(
|
34
|
+
key: :device,
|
35
|
+
description: 'Simulator name or name with version',
|
36
|
+
is_string: false
|
37
|
+
),
|
38
|
+
FastlaneCore::ConfigItem.new(
|
39
|
+
key: :reset,
|
40
|
+
description: 'Reset simulator contents',
|
41
|
+
optional: true,
|
42
|
+
is_string: false
|
43
|
+
)
|
44
|
+
]
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.supported?(_platform)
|
48
|
+
true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-stream_actions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -235,6 +235,7 @@ files:
|
|
235
235
|
- lib/fastlane/plugin/stream_actions/actions/custom_match.rb
|
236
236
|
- lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
|
237
237
|
- lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
|
238
|
+
- lib/fastlane/plugin/stream_actions/actions/prepare_simulator.rb
|
238
239
|
- lib/fastlane/plugin/stream_actions/actions/read_changelog.rb
|
239
240
|
- lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb
|
240
241
|
- lib/fastlane/plugin/stream_actions/actions/retrieve_xctest_names.rb
|