fastlane-plugin-test_center 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: 85e6cf44f104832ab85c9816adf67983844a6c4d
4
- data.tar.gz: 6e166c48e796a9d76ad53bb3c5e2e9382f2a6712
3
+ metadata.gz: c77c5cf68c2039fd54bbac8a3e0eb1b8aac0f217
4
+ data.tar.gz: c0bbb9e7501440b95e910bab387d6844e779f681
5
5
  SHA512:
6
- metadata.gz: 86e6bf6df5e33e25f8f93826e35b6d0eaae491b08072094fc52aa35922319f8b6fc52e976fbaa60bcb60ebd9c3af7e73d1457f231153a03d92134f2916812e54
7
- data.tar.gz: 887914bbdefb1a846588769483d28fa120592042d7fd7886d7133de2cbb34d6c7ec8b0afa3079b40de0d7456f31687d02b9772bf74a0611ece4e654e3c5062db
6
+ metadata.gz: 99799b11ad1794a18dae6924ca7165710690f42e22c3658e3350669fe94410a700b8993cb14bd014bace14bfbb3bb514c3661cbf1152264d0dc3fc2988575328
7
+ data.tar.gz: bb66c18c3f7f9582481e080ca789ea1932385df03377e8559de4b0b7e209d2dbedb087abbb7313ed3d88a6f627caa0dddfe308ffd8430d5a0355e85b058470a1
@@ -6,7 +6,7 @@ module Fastlane
6
6
 
7
7
  class SuppressTestsAction < Action
8
8
  require 'xcodeproj'
9
-
9
+
10
10
  def self.run(params)
11
11
  project_path = params[:xcodeproj]
12
12
  tests_to_skip = params[:tests]
@@ -0,0 +1,103 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ SUPPRESSED_TESTS_CUSTOM_VALUE = :SUPPRESSED_TESTS_CUSTOM_VALUE
5
+ end
6
+
7
+ class SuppressedTestsAction < Action
8
+ require 'set'
9
+
10
+ def self.run(params)
11
+ project_path = params[:xcodeproj]
12
+ scheme = params[:scheme]
13
+
14
+ scheme_filepaths = Dir.glob("#{project_path}/{xcshareddata,xcuserdata}/**/xcschemes/#{scheme || '*'}.xcscheme")
15
+ if scheme_filepaths.length.zero?
16
+ UI.user_error!("Error: cannot find any scheme named #{scheme}") unless scheme.nil?
17
+ UI.user_error!("Error: cannot find any schemes in the Xcode project")
18
+ end
19
+
20
+ skipped_tests = Set.new
21
+ scheme_filepaths.each do |scheme_filepath|
22
+ xcscheme = Xcodeproj::XCScheme.new(scheme_filepath)
23
+ xcscheme.test_action.testables.each do |testable|
24
+ testable.skipped_tests.map do |skipped_test|
25
+ skipped_tests.add(skipped_test.identifier)
26
+ end
27
+ end
28
+ end
29
+ skipped_tests.to_a
30
+ end
31
+
32
+ #####################################################
33
+ # @!group Documentation
34
+ #####################################################
35
+
36
+ def self.description
37
+ "A short description with <= 80 characters of what this action does"
38
+ end
39
+
40
+ def self.details
41
+ # Optional:
42
+ # this is your chance to provide a more detailed description of this action
43
+ "You can use this action to do cool things..."
44
+ end
45
+
46
+ def self.available_options
47
+ # Define all options your action supports.
48
+
49
+ # Below a few examples
50
+ [
51
+ FastlaneCore::ConfigItem.new(
52
+ key: :xcodeproj,
53
+ env_name: "FL_SUPPRESSED_TESTS_XCODE_PROJECT", # The name of the environment variable
54
+ description: "The file path to the Xcode project file to read the skipped tests from", # a short description of this parameter
55
+ verify_block: proc do |path|
56
+ UI.user_error!("Error: Xcode project file path not given!") unless path and !path.empty?
57
+ UI.user_error!("Error: Xcode project '#{path}' not found!") unless Dir.exist?(path)
58
+ end
59
+ ),
60
+ FastlaneCore::ConfigItem.new(
61
+ key: :scheme,
62
+ optional: true,
63
+ env_name: "FL_SUPPRESSED_TESTS_SCHEME_TO_UPDATE", # The name of the environment variable
64
+ description: "The Xcode scheme where the suppressed tests may be", # a short description of this parameter
65
+ verify_block: proc do |scheme_name|
66
+ UI.user_error!("Error: Xcode Scheme '#{scheme_name}' is not valid!") if scheme_name and scheme_name.empty?
67
+ end
68
+ )
69
+ ]
70
+ end
71
+
72
+ def self.output
73
+ # Define the shared values you are going to provide
74
+ # Example
75
+ [
76
+ ['SUPPRESSED_TESTS_CUSTOM_VALUE', 'A description of what this value contains']
77
+ ]
78
+ end
79
+
80
+ def self.return_value
81
+ # If your method provides a return value, you can describe here what it does
82
+ end
83
+
84
+ def self.authors
85
+ # So no one will ever forget your contribution to fastlane :) You are awesome btw!
86
+ ["Your GitHub/Twitter Name"]
87
+ end
88
+
89
+ def self.is_supported?(platform)
90
+ # you can do things like
91
+ #
92
+ # true
93
+ #
94
+ # platform == :ios
95
+ #
96
+ # [:ios, :mac].include?(platform)
97
+ #
98
+
99
+ platform == :ios
100
+ end
101
+ end
102
+ end
103
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TestCenter
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-test_center
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
  - Lyndsey Ferguson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-28 00:00:00.000000000 Z
11
+ date: 2017-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,6 +132,7 @@ files:
132
132
  - README.md
133
133
  - lib/fastlane/plugin/test_center.rb
134
134
  - lib/fastlane/plugin/test_center/actions/suppress_tests.rb
135
+ - lib/fastlane/plugin/test_center/actions/suppressed_tests.rb
135
136
  - lib/fastlane/plugin/test_center/actions/test_center_action.rb
136
137
  - lib/fastlane/plugin/test_center/helper/test_center_helper.rb
137
138
  - lib/fastlane/plugin/test_center/version.rb
@@ -160,3 +161,4 @@ signing_key:
160
161
  specification_version: 4
161
162
  summary: Makes testing your iOS app easier
162
163
  test_files: []
164
+ has_rdoc: