fastlane_core 0.17.0 → 0.17.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
  SHA1:
3
- metadata.gz: 124a2c938d14a3e2c6826b473a5b2ef04ca52c5b
4
- data.tar.gz: afbfc237d1c3e6de1408e854942d85ef7800f9d3
3
+ metadata.gz: 30775ef6dc379ae94955e2b11b1ecf18c95827bb
4
+ data.tar.gz: 1b3f88ced46c5f0bc4a054e9edb3ec806f7a2266
5
5
  SHA512:
6
- metadata.gz: 69f1e77298973701d6ea2298be31a4ea2c0c372650a79800b7a0b130f88ea147925378913eafcb3543b5df9d32801e8c866ad2f2d1f978bad3aaf73732ae569a
7
- data.tar.gz: 7aad3aa916e47b8c697fd29fd5221af0b05a1a6db787d0d56e208bef8efe7cef128d74358679f5d775736b3b0e65035bd690fa27e71cc83988591e0dc2d9f28c
6
+ metadata.gz: 7adfb3375a3d112d98edc36353b52f3a76ebc29074b782195d8617140c47d4e151819e98ccb7801f3bfd4fabf71eae107407c264f0c9d3663b074790a1ca09c7
7
+ data.tar.gz: 81223d25c552b719d723a204ab0ea25595fce96160c83225cae86c12f1af137e8bd363379a265a52370de5010eb1d201c873dc092576135e7f3dc6fccf880bc9
@@ -61,6 +61,18 @@ module FastlaneCore
61
61
  true
62
62
  end
63
63
 
64
+ # Returns an updated value type (if necessary)
65
+ def auto_convert_value(value)
66
+ # Special treatment if the user specififed true, false or YES, NO
67
+ if %w(YES yes true).include?(value)
68
+ value = true
69
+ elsif %w(NO no false).include?(value)
70
+ value = false
71
+ end
72
+
73
+ return value
74
+ end
75
+
64
76
  def to_s
65
77
  [@key, @description].join(": ")
66
78
  end
@@ -107,13 +107,15 @@ module FastlaneCore
107
107
 
108
108
  # Returns the value for a certain key. fastlane_core tries to fetch the value from different sources
109
109
  def fetch(key)
110
- raise "Key '#{key}' must be a symbol. Example :app_id.".red unless key.kind_of? Symbol
110
+ raise "Key '#{key}' must be a symbol. Example :app_id.".red unless key.kind_of?(Symbol)
111
111
 
112
112
  option = option_for_key(key)
113
113
  raise "Could not find option for key :#{key}. Available keys: #{@available_options.collect(&:key).join(', ')}".red unless option
114
114
 
115
115
  value = @values[key]
116
116
 
117
+ value = option.auto_convert_value(value)
118
+
117
119
  # `if value == nil` instead of ||= because false is also a valid value
118
120
  if value.nil? and option.env_name and ENV[option.env_name]
119
121
  value = ENV[option.env_name].dup
@@ -1,3 +1,3 @@
1
1
  module FastlaneCore
2
- VERSION = "0.17.0"
2
+ VERSION = "0.17.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-17 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json