fastlane_core 0.11.1 → 0.12.0

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: def310ba44aa2af5ddc54f3ea0bbe035d79ebb89
4
- data.tar.gz: 50cf6a005d7021e079f15acbd6196b285610c9ba
3
+ metadata.gz: 92008beab264e2e81a633a7b7a23efa264834a46
4
+ data.tar.gz: 54a820d2b9a76b861f4b95ae11a9feb6ec67a481
5
5
  SHA512:
6
- metadata.gz: 2a7cf103c1ab3c0528583c69f0166041eac5131571205abb90c483adfc38670878f3c65318107faa9eec2e34bc87cbc37c0726b9d7b4b29c04306654262a223b
7
- data.tar.gz: 8468ec9be7e68e4aa1347ed964a3b44023eeaa9ea4f0a65318e21a4a25994e0f4f01824d91035634bb0ecd0698e66bb19c7bfafd4e89dfedec4ab8139e555873
6
+ metadata.gz: 6c87f81eac09db526990a5a416f7dde62ed003eb41032fbe0d7cf488d5d8782da9ad08eb5832a918d3475b859a28ccd21522e1d4e77c93f31b2a41d2f3458a64
7
+ data.tar.gz: 860fa73e3a451711dae32417446e85a9d48bf3bda4f3b2db43ff1bff123af440c293d93b0340de58bcfe24ad6a45735726a23df91c1e2d1aec2881d9c8eee0c9
@@ -15,29 +15,22 @@ module FastlaneCore
15
15
  # @return [String] The name of the configuration file (not the path). Optional!
16
16
  attr_accessor :config_file_name
17
17
 
18
- # @param config_file_name [String] The name of the configuration file to use (optional)
19
- # @param block_for_missing [Block] A ruby block that is called when there is an unkonwn method
20
- # in the configuration file
21
- def self.create(available_options, values, config_file_name = nil, block_for_missing = nil)
22
- Configuration.new(available_options, values, config_file_name, block_for_missing)
18
+ def self.create(available_options, values)
19
+ Configuration.new(available_options, values)
23
20
  end
24
21
 
25
22
  #####################################################
26
23
  # @!group Setting up the configuration
27
24
  #####################################################
28
25
 
29
- def initialize(available_options, values, config_file_name = nil, block_for_missing = nil)
26
+ def initialize(available_options, values)
30
27
  self.available_options = available_options || []
31
28
  self.values = values || {}
32
- self.config_file_name = config_file_name
33
- @block_for_missing = block_for_missing
34
29
 
35
30
  verify_input_types
36
31
  verify_value_exists
37
32
  verify_no_duplicates
38
33
  verify_default_value_matches_verify_block
39
-
40
- load_configuration_file
41
34
  end
42
35
 
43
36
  def verify_input_types
@@ -87,14 +80,24 @@ module FastlaneCore
87
80
  end
88
81
  end
89
82
 
90
- def load_configuration_file
91
- return unless self.config_file_name
83
+ # This method takes care of parsing and using the configuration file as values
84
+ # Call this once you know where the config file might be located
85
+ # Take a look at how `gym` uses this method
86
+ #
87
+ # @param config_file_name [String] The name of the configuration file to use (optional)
88
+ # @param block_for_missing [Block] A ruby block that is called when there is an unkonwn method
89
+ # in the configuration file
90
+ def load_configuration_file(config_file_name = nil, block_for_missing = nil)
91
+ return unless config_file_name
92
+
93
+ self.config_file_name = config_file_name
94
+
92
95
  paths = Dir["./fastlane/#{self.config_file_name}"] + Dir["./#{self.config_file_name}"]
93
96
  paths = paths + Dir["./spec/fixtures/#{self.config_file_name}"] if Helper.is_test?
94
97
  return if paths.count == 0
95
98
 
96
99
  path = paths.first
97
- ConfigurationFile.new(self, path, @block_for_missing)
100
+ ConfigurationFile.new(self, path, block_for_missing)
98
101
  end
99
102
 
100
103
  #####################################################
@@ -123,7 +126,7 @@ module FastlaneCore
123
126
  return value if option.optional # as this value is not required, just return what we have
124
127
 
125
128
 
126
- if Helper.is_test?
129
+ if Helper.is_test? or Helper.is_ci?
127
130
  # Since we don't want to be asked on tests, we'll just call the verify block with no value
128
131
  # to raise the exception that is shown when the user passes an invalid value
129
132
  set(key, '')
@@ -74,7 +74,7 @@ module FastlaneCore
74
74
 
75
75
  if team_id == nil and team_name == nil
76
76
  Helper.log.info "You can store your preferred team using the environment variable `FASTLANE_TEAM_ID` or `FASTLANE_TEAM_NAME`".green
77
- Helper.log.info "or in your `Appfile` using `team_id 'Q2CBPJ58CA'` or `team_name 'Felix Krause'`".green # TODO
77
+ Helper.log.info "or in your `Appfile` using `team_id 'Q2CBPJ58CA'` or `team_name 'Felix Krause'`".green
78
78
  Helper.log.info "Your ID belongs to the following teams:".green
79
79
  end
80
80
 
@@ -8,7 +8,7 @@ module FastlaneCore
8
8
  if is_test?
9
9
  @@log ||= Logger.new(nil) # don't show any logs when running tests
10
10
  else
11
- @@log ||= Logger.new(STDOUT)
11
+ @@log ||= Logger.new($stdout)
12
12
  end
13
13
 
14
14
  @@log.formatter = proc do |severity, datetime, progname, msg|
@@ -1,3 +1,3 @@
1
1
  module FastlaneCore
2
- VERSION = "0.11.1"
2
+ VERSION = "0.12.0"
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.11.1
4
+ version: 0.12.0
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-07-22 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -325,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
325
  version: '0'
326
326
  requirements: []
327
327
  rubyforge_project:
328
- rubygems_version: 2.4.6
328
+ rubygems_version: 2.4.8
329
329
  signing_key:
330
330
  specification_version: 4
331
331
  summary: Contains all shared code/dependencies of the fastlane.tools