fastlane 2.92.0.beta.20180415050019 → 2.92.0.beta.20180416050023

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: df26202e58be36ff4777d883994a8b2bf8134c52
4
- data.tar.gz: 81d5d80ca36cce45147bba2c5146a4718065205c
3
+ metadata.gz: 01a575b654bcfa7328de27d69a3941133621b1f3
4
+ data.tar.gz: '09083b4983d11dcd011e85be8cc6f96723e38096'
5
5
  SHA512:
6
- metadata.gz: a812e6ffe89b4c67ead4e66c194d9696464bfcc02a629d31109fbe94ca60f0cb731d03ddbcf6c3bfc4b7d2e2758070c9c03628f9a046cab04c96440828887e11
7
- data.tar.gz: a8626db67258b29ec7d5c64f78862f70d231ecdf6f5d413c11eb8b008d0b2fd83c20997f0d5ca99bb3e699803d09f7c466041ee71fc00eae15989a527eea7636
6
+ metadata.gz: f332525a98d254f828e5981be30bb2a00775c387e74ff9a472813516ae7fe3b3b1a216a79cd1645f3cd8096577d38e3e600c3189c6e0d4554bbea5cde70ef301
7
+ data.tar.gz: f1dda56e512fa3918763121f35354a13253c9eda8249ad245ac061ee7989ab2f849d9bd8b86f3ecf1a37dc69e92ce06f69018644344a0816905606578af4c09a
@@ -92,7 +92,6 @@ module Deliver
92
92
  base_dir = File.join(path, UploadMetadata::TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR)
93
93
  FileUtils.mkdir_p(base_dir)
94
94
  resulting_path = File.join(base_dir, "#{option_name}.txt")
95
- next if content.to_s.chomp.length == 0 # as many developers won't need trade information
96
95
  File.write(resulting_path, content)
97
96
  UI.message("Writing to '#{resulting_path}'")
98
97
  end
@@ -28,6 +28,10 @@ module Fastlane
28
28
  []
29
29
  end
30
30
 
31
+ def self.return_type
32
+ :hash_of_strings
33
+ end
34
+
31
35
  def self.authors
32
36
  ["KrauseFx"]
33
37
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.92.0.beta.20180415050019'.freeze
2
+ VERSION = '2.92.0.beta.20180416050023'.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
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -9,15 +9,38 @@ module Spaceship
9
9
  # @return (Array of Spaceship::Tunes::Territory objects) A list of the territories
10
10
  attr_accessor :territories
11
11
 
12
+ # @return (Bool) Cleared for preorder
13
+ attr_accessor :cleared_for_preorder
14
+
15
+ # @return (String) App available date in format of "YYYY-MM-DD"
16
+ attr_accessor :app_available_date
17
+
12
18
  attr_mapping(
13
- 'theWorld' => :include_future_territories
19
+ 'theWorld' => :include_future_territories,
20
+ 'preOrder.clearedForPreOrder.value' => :cleared_for_preorder,
21
+ 'preOrder.appAvailableDate.value' => :app_available_date
14
22
  )
15
23
 
16
24
  # Create a new object based on a set of territories.
17
25
  # @param territories (Array of String or Spaceship::Tunes::Territory objects): A list of the territories
18
26
  # @param params (Hash): Optional parameters (include_future_territories (Bool, default: true) Are future territories included?)
19
27
  def self.from_territories(territories = [], params = {})
20
- obj = self.new
28
+ # Initializes the DataHash with our preOrder structure so values
29
+ # that are being modified will be saved
30
+ #
31
+ # Note: A better solution for this in the future might be to improve how
32
+ # Base::DataHash sets values for paths that don't exist
33
+ obj = self.new(
34
+ 'preOrder' => {
35
+ 'clearedForPreOrder' => {
36
+ 'value' => false
37
+ },
38
+ 'appAvailableDate' => {
39
+ 'value' => nil
40
+ }
41
+ }
42
+ )
43
+
21
44
  # Detect if the territories attribute is an array of Strings and convert to Territories
22
45
  obj.territories =
23
46
  if territories[0].kind_of?(String)
@@ -26,12 +49,18 @@ module Spaceship
26
49
  territories
27
50
  end
28
51
  obj.include_future_territories = params.fetch(:include_future_territories, true)
52
+ obj.cleared_for_preorder = params.fetch(:cleared_for_preorder, false)
53
+ obj.app_available_date = params.fetch(:app_available_date, nil)
29
54
  return obj
30
55
  end
31
56
 
32
57
  def territories
33
58
  @territories ||= raw_data['countries'].map { |info| Territory.new(info) }
34
59
  end
60
+
61
+ def cleared_for_preorder
62
+ super || false
63
+ end
35
64
  end
36
65
  end
37
66
  end
@@ -605,6 +605,17 @@ module Spaceship
605
605
  data["countries"] = availability.territories.map { |territory| { 'code' => territory.code } }
606
606
  data["theWorld"] = availability.include_future_territories.nil? ? true : availability.include_future_territories
607
607
 
608
+ # InitializespreOrder (if needed)
609
+ data["preOrder"] ||= {}
610
+
611
+ # Sets app_available_date to nil if cleared_for_preorder if false
612
+ # This is need for apps that have never set either of these before
613
+ # API will error out if cleared_for_preorder is false and app_available_date has a date
614
+ cleared_for_preorder = availability.cleared_for_preorder
615
+ app_available_date = cleared_for_preorder ? availability.app_available_date : nil
616
+ data["preOrder"]["clearedForPreOrder"] = { "value" => cleared_for_preorder, "isEditable" => true, "isRequired" => true, "errorKeys" => nil }
617
+ data["preOrder"]["appAvailableDate"] = { "value" => app_available_date, "isEditable" => true, "isRequired" => true, "errorKeys" => nil }
618
+
608
619
  # send the changes back to Apple
609
620
  r = request(:post) do |req|
610
621
  req.url("ra/apps/#{app_id}/pricing/intervals")
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.92.0.beta.20180415050019
4
+ version: 2.92.0.beta.20180416050023
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2018-04-15 00:00:00.000000000 Z
30
+ date: 2018-04-16 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: slack-notifier
@@ -1636,24 +1636,24 @@ metadata:
1636
1636
  post_install_message:
1637
1637
  rdoc_options: []
1638
1638
  require_paths:
1639
- - produce/lib
1640
- - screengrab/lib
1641
- - spaceship/lib
1642
- - supply/lib
1643
- - fastlane/lib
1644
- - frameit/lib
1639
+ - pilot/lib
1645
1640
  - pem/lib
1646
- - deliver/lib
1641
+ - precheck/lib
1647
1642
  - match/lib
1643
+ - gym/lib
1644
+ - credentials_manager/lib
1648
1645
  - fastlane_core/lib
1649
- - scan/lib
1646
+ - produce/lib
1650
1647
  - cert/lib
1651
1648
  - snapshot/lib
1652
- - pilot/lib
1653
- - precheck/lib
1654
- - credentials_manager/lib
1649
+ - deliver/lib
1650
+ - fastlane/lib
1651
+ - frameit/lib
1652
+ - scan/lib
1653
+ - spaceship/lib
1655
1654
  - sigh/lib
1656
- - gym/lib
1655
+ - screengrab/lib
1656
+ - supply/lib
1657
1657
  required_ruby_version: !ruby/object:Gem::Requirement
1658
1658
  requirements:
1659
1659
  - - ">="