fastlane 2.58.0.beta.20170919010003 → 2.58.0.beta.20170920010003

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: 062d1ebef3c070002849d24fadc7665693f5adf0
4
- data.tar.gz: 731ede3f44e04f2b7c2f22a3fcfd132ad860d0f7
3
+ metadata.gz: a1aee2a4ce2c2f291827675b8cfbc2509337817f
4
+ data.tar.gz: 2c0a3895848af582417fcbf8581ea28cd6667b3b
5
5
  SHA512:
6
- metadata.gz: aa91a3786f1301d51c2bf9815151fae38c4bc2d0a39db93c2524e6305075d0fb0483125ac61653f43999b84942b73f9cb52c01c6814ac4ab7f3335ffc9970c1c
7
- data.tar.gz: 63149c261201f11f14499902524e8ba28930705879b4c383917809fa66de609cac8e351729569f7f0b44875a01540cf76d83d45ca9d915b68bffef902955cb71
6
+ metadata.gz: 7246060005b8de3927014bc6237032ae0e816c5a3dcc378f59a4235e3560ded56bf101e5cdee8e9034a419cab0f7800d697ee8ff0d561f33241fa81435c24431
7
+ data.tar.gz: 964fc6bfcdd559f16578c22c484ead850d588dfff08a3ec15183477e411ece96b3fb169f305e767e00779889141bee6f7278108360db12525fdbdb9f0f3f2d31
@@ -5,7 +5,7 @@ module Cert
5
5
  def launch
6
6
  run
7
7
 
8
- installed = FastlaneCore::CertChecker.installed?(ENV["CER_FILE_PATH"], Cert.config[:keychain_path], Cert.config[:keychain_password])
8
+ installed = FastlaneCore::CertChecker.installed?(ENV["CER_FILE_PATH"])
9
9
  UI.message "Verifying the certificate is properly installed locally..."
10
10
  UI.user_error!("Could not find the newly generated certificate installed", show_github_issues: true) unless installed
11
11
  UI.success "Successfully installed certificate #{ENV['CER_CERTIFICATE_ID']}"
@@ -44,7 +44,7 @@ module Fastlane
44
44
  [
45
45
  FastlaneCore::ConfigItem.new(key: :text,
46
46
  description: "The text that will be displayed to the user",
47
- default_value: "Please enter a text: "),
47
+ default_value: "Please enter some text: "),
48
48
  FastlaneCore::ConfigItem.new(key: :ci_input,
49
49
  description: "The default text that will be used when being executed on a CI service",
50
50
  default_value: ''),
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.58.0.beta.20170919010003'.freeze
2
+ VERSION = '2.58.0.beta.20170920010003'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  end
@@ -3,10 +3,10 @@ require 'tempfile'
3
3
  module FastlaneCore
4
4
  # This class checks if a specific certificate is installed on the current mac
5
5
  class CertChecker
6
- def self.installed?(path, keychain = nil, password = nil)
6
+ def self.installed?(path)
7
7
  UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
8
8
 
9
- ids = installed_identies(keychain, password)
9
+ ids = installed_identies
10
10
  finger_print = sha1_fingerprint(path)
11
11
 
12
12
  return ids.include? finger_print
@@ -17,10 +17,10 @@ module FastlaneCore
17
17
  installed?(path)
18
18
  end
19
19
 
20
- def self.installed_identies(keychain, password)
20
+ def self.installed_identies
21
21
  install_wwdr_certificate unless wwdr_certificate_installed?
22
22
 
23
- available = list_available_identities(keychain, password)
23
+ available = list_available_identities
24
24
  # Match for this text against word boundaries to avoid edge cases around multiples of 10 identities!
25
25
  if /\b0 valid identities found\b/ =~ available
26
26
  UI.error([
@@ -44,13 +44,8 @@ module FastlaneCore
44
44
  return ids
45
45
  end
46
46
 
47
- def self.list_available_identities(keychain, password)
48
- keychain = File.expand_path(keychain)
49
- locked = keychain and !system("security show-keychain-info #{keychain} >/dev/null 2>/dev/null")
50
- `security unlock -p #{password} #{keychain}` if locked
51
- `security find-identity -v -p codesigning #{keychain}`
52
- ensure
53
- `security lock #{keychain}` if locked
47
+ def self.list_available_identities
48
+ `security find-identity -v -p codesigning`
54
49
  end
55
50
 
56
51
  def self.wwdr_certificate_installed?
@@ -34,7 +34,7 @@ module FastlaneCore
34
34
  private
35
35
 
36
36
  def copy_ipa(ipa_path)
37
- ipa_file_name = "#{File.basename(ipa_path, '.ipa')}(#{Digest::SHA256.file(ipa_path).hexdigest}).ipa"
37
+ ipa_file_name = "#{File.basename(ipa_path, '.ipa')}_#{Digest::SHA256.file(ipa_path).hexdigest}.ipa"
38
38
  resulting_path = File.join(self.package_path, ipa_file_name)
39
39
  FileUtils.cp(ipa_path, resulting_path)
40
40
 
@@ -17,6 +17,7 @@ module Fastlane
17
17
  report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) }
18
18
 
19
19
  if report.issues.count > NUMBER_OF_ISSUES_INLINE
20
+ report.url.sub!('\'', '%27')
20
21
  puts "and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{report.url}"
21
22
  puts ""
22
23
  end
@@ -12,6 +12,7 @@ module Precheck
12
12
  FutureFunctionalityRule,
13
13
  TestWordsRule,
14
14
  CurseWordsRule,
15
+ FreeStuffIAPRule,
15
16
  CustomTextRule,
16
17
  CopyrightDateRule,
17
18
  UnreachableURLRule
@@ -56,7 +57,14 @@ module Precheck
56
57
  env_name: "PRECHECK_DEFAULT_RULE_LEVEL",
57
58
  description: "The default rule level unless otherwise configured",
58
59
  is_string: false,
59
- default_value: RULE_LEVELS[:error])
60
+ default_value: RULE_LEVELS[:error]),
61
+ FastlaneCore::ConfigItem.new(key: :include_in_app_purchases,
62
+ short_option: "-i",
63
+ env_name: "PRECHECK_INCLUDE_IN_APP_PURCHASES",
64
+ description: "Should check in-app purchases?",
65
+ is_string: false,
66
+ optional: true,
67
+ default_value: true)
60
68
  ] + rules
61
69
  end
62
70
  end
@@ -149,6 +149,7 @@ module Precheck
149
149
 
150
150
  def self.generate_text_items_to_check(app: nil, app_version: nil)
151
151
  items = []
152
+
152
153
  items << TextItemToCheck.new(app_version.copyright, :copyright, "copyright")
153
154
 
154
155
  items += collect_text_items_from_language_item(hash: app_version.keywords,
@@ -175,10 +176,34 @@ module Precheck
175
176
  item_name: :app_subtitle,
176
177
  friendly_name_postfix: "app name subtitle",
177
178
  is_optional: true)
179
+
180
+ should_include_iap = Precheck.config[:include_in_app_purchases]
181
+ if should_include_iap
182
+ UI.message "Reading in-app purchases. If you have a lot, this might take a while"
183
+ UI.message "You can disable IAP checking by setting the `include_in_app_purchases` flag to `false`"
184
+ in_app_purchases = app.in_app_purchases.all
185
+ in_app_purchases ||= []
186
+ in_app_purchases.each do |purchase|
187
+ items += collect_iap_language_items(purchase_edit_versions: purchase.edit.versions)
188
+ end
189
+ UI.message "Done reading in-app purchases"
190
+ end
191
+
192
+ return items
193
+ end
194
+
195
+ def self.collect_iap_language_items(purchase_edit_versions: nil, is_optional: false)
196
+ items = []
197
+ purchase_edit_versions.each do |language_key, hash|
198
+ name = hash[:name]
199
+ description = hash[:description]
200
+ items << TextItemToCheck.new(name, :in_app_purchase, "in-app purchase name: #{name}: (#{language_key})", is_optional)
201
+ items << TextItemToCheck.new(description, :in_app_purchase, "in-app purchase desc: #{description}: (#{language_key})", is_optional)
202
+ end
178
203
  return items
179
204
  end
180
205
 
181
- # # a few attributes are LanguageItem this method creates a TextItemToCheck for each pair
206
+ # a few attributes are LanguageItem this method creates a TextItemToCheck for each pair
182
207
  def self.collect_text_items_from_language_item(hash: nil, item_name: nil, friendly_name_postfix: nil, is_optional: false)
183
208
  items = []
184
209
  hash.each do |key, value|
@@ -0,0 +1,32 @@
1
+ require 'precheck/rule'
2
+ require 'precheck/rules/abstract_text_match_rule'
3
+
4
+ module Precheck
5
+ class FreeStuffIAPRule < AbstractTextMatchRule
6
+ def self.key
7
+ :free_stuff_in_iap
8
+ end
9
+
10
+ def self.env_name
11
+ "RULE_FREE_STUFF_IN_IAP"
12
+ end
13
+
14
+ def self.friendly_name
15
+ "No words indicating your IAP is free"
16
+ end
17
+
18
+ def self.description
19
+ "using text indicating that your IAP is free"
20
+ end
21
+
22
+ def supported_fields_symbol_set
23
+ [:in_app_purchase].to_set
24
+ end
25
+
26
+ def lowercased_words_to_look_for
27
+ [
28
+ "free"
29
+ ].map(&:downcase)
30
+ end
31
+ end
32
+ end
@@ -88,6 +88,7 @@ module Snapshot
88
88
  'Apple TV 1080p' => 'Apple TV',
89
89
  'Apple TV 4K (at 1080p)' => 'Apple TV 4K (at 1080p)',
90
90
  'Apple TV 4K' => 'Apple TV 4K',
91
+ 'Apple TV' => 'Apple TV',
91
92
  'Mac' => 'Mac'
92
93
  }
93
94
  end
@@ -55,9 +55,17 @@ module Snapshot
55
55
  end
56
56
  # Return true if all devices are iOS devices
57
57
  return true unless all_ios.include?(false)
58
+
59
+ all_tvos = devices.map do |device|
60
+ device = device.downcase
61
+ device.start_with?('apple tv')
62
+ end
63
+ # Return true if all devices are iOS devices
64
+ return true unless all_tvos.include?(false)
65
+
58
66
  # There should only be more than 1 device type if
59
- # it is iOS, therefore, if there is more than 1
60
- # device in the array, and they are not all iOS
67
+ # it is iOS or tvOS, therefore, if there is more than 1
68
+ # device in the array, and they are not all iOS or tvOS
61
69
  # as checked above, that would imply that this is a mixed bag
62
70
  return devices.count == 1
63
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.58.0.beta.20170919010003
4
+ version: 2.58.0.beta.20170920010003
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-09-19 00:00:00.000000000 Z
18
+ date: 2017-09-20 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1246,6 +1246,7 @@ files:
1246
1246
  - precheck/lib/precheck/rules/copyright_date_rule.rb
1247
1247
  - precheck/lib/precheck/rules/curse_words_rule.rb
1248
1248
  - precheck/lib/precheck/rules/custom_text_rule.rb
1249
+ - precheck/lib/precheck/rules/free_stuff_iap_rule.rb
1249
1250
  - precheck/lib/precheck/rules/future_functionality_rule.rb
1250
1251
  - precheck/lib/precheck/rules/negative_apple_sentiment_rule.rb
1251
1252
  - precheck/lib/precheck/rules/other_platforms_rule.rb