fastlane 0.1.8 → 0.1.9

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.
@@ -10,9 +10,9 @@ module Fastlane
10
10
  clean = false if params.include?(:noclean)
11
11
  $verbose = true if params.include?(:verbose)
12
12
 
13
- if Helper.is_test?
13
+ if Helper.test?
14
14
  Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] = Dir.pwd
15
- return clean
15
+ return clean
16
16
  end
17
17
 
18
18
  require 'snapshot'
@@ -28,4 +28,4 @@ module Fastlane
28
28
  end
29
29
  end
30
30
  end
31
- end
31
+ end
@@ -0,0 +1,19 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ end
5
+
6
+ class TeamIdAction
7
+ def self.run(params)
8
+ team = params.first
9
+ raise "Please pass your Team ID (e.g. team_id 'Q2CBPK58CA')".red unless team.to_s.length > 0
10
+
11
+ Helper.log.info "Setting Team ID to '#{team}' for all build steps"
12
+
13
+ [:CERT_TEAM_ID, :SIGH_TEAM_ID, :PEM_TEAM_ID, :PRODUCE_TEAM_ID, :SIGH_TEAM_ID, :FASTLANE_TEAM_ID].each do |current|
14
+ ENV[current.to_s] = team
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,22 +1,21 @@
1
1
  # How it works:
2
- # You can run your functional calabash testcases on real ios hardware. Follow the steps to set up your free account on testmunk.com or see below. After tests are executed you will get an email with test results. An API extension to see test results directly in Jenkins is in the works.
2
+ # You can run your functional calabash testcases on real ios hardware.
3
+ # Follow the steps to set up your free account on testmunk.com or see below.
4
+ # After tests are executed you will get an email with test results.
5
+ # An API extension to see test results directly in Jenkins is in the works.
3
6
 
4
-
5
- # Setup
7
+ # Setup
6
8
  # 1) Create a free account on testmunk.com
7
9
  # 2) Create an own project under your account (top right) after you are logged in. You will need to use this project name within your REST API upload path.
8
10
  # 3) Upload testcases (features in calabash) over the testmunk REST API (http://docs.testmunk.com/en/latest/rest.html#upload-testcases).
9
11
 
10
-
11
12
  module Fastlane
12
13
  module Actions
13
14
  module SharedValues
14
-
15
15
  end
16
16
 
17
17
  class TestmunkAction
18
- def self.run(params)
19
-
18
+ def self.run(_params)
20
19
  raise "Please pass your Testmunk email address using `ENV['TESTMUNK_EMAIL'] = 'value'`" unless ENV['TESTMUNK_EMAIL']
21
20
  raise "Please pass your Testmunk API Key using `ENV['TESTMUNK_API'] = 'value'`" unless ENV['TESTMUNK_API']
22
21
  raise "Please pass your Testmunk app name using `ENV['TESTMUNK_APP'] = 'value'`" unless ENV['TESTMUNK_APP']
@@ -24,7 +23,7 @@ module Fastlane
24
23
  ipa_path = ENV['TESTMUNK_IPA'] || ENV[Actions::SharedValues::IPA_OUTPUT_PATH.to_s]
25
24
  raise "Please pass a path to your ipa file using `ENV['TESTMUNK_IPA'] = 'value'`" unless ipa_path
26
25
 
27
- Helper.log.info "Testmunk: Uploading the .ipa and starting your tests".green
26
+ Helper.log.info 'Testmunk: Uploading the .ipa and starting your tests'.green
28
27
 
29
28
  response = system("#{"curl -H 'Accept: application/vnd.testmunk.v1+json'" +
30
29
  " -F 'file=@#{ipa_path}' -F 'autoStart=true'" +
@@ -32,11 +31,11 @@ module Fastlane
32
31
  " https://#{ENV['TESTMUNK_API']}@api.testmunk.com/apps/#{ENV['TESTMUNK_APP']}/testruns"}")
33
32
 
34
33
  if response
35
- Helper.log.info "Your tests are being executed right now. Please wait for the mail with results and decide if you want to continue.".green
34
+ Helper.log.info 'Your tests are being executed right now. Please wait for the mail with results and decide if you want to continue.'.green
36
35
  else
37
- raise "Something went wrong while uploading your app to Testmunk".red
36
+ raise 'Something went wrong while uploading your app to Testmunk'.red
38
37
  end
39
38
  end
40
39
  end
41
40
  end
42
- end
41
+ end
@@ -2,12 +2,12 @@ module Fastlane
2
2
  module Actions
3
3
  class XctoolAction
4
4
  def self.run(params)
5
- unless Helper.is_test?
6
- raise "xctool not installed, please install using `brew install xctool`".red if `which xctool`.length == 0
5
+ unless Helper.test?
6
+ raise 'xctool not installed, please install using `brew install xctool`'.red if `which xctool`.length == 0
7
7
  end
8
-
9
- Actions.sh("xctool " + params.join(" "))
8
+
9
+ Actions.sh('xctool ' + params.join(' '))
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -1,18 +1,18 @@
1
1
  module Fastlane
2
2
  class DependencyChecker
3
3
  def self.check_dependencies
4
- self.check_xcode_select unless Helper.is_test?
4
+ check_xcode_select unless Helper.test?
5
5
  end
6
-
6
+
7
7
  def self.check_xcode_select
8
- unless `xcode-select -v`.include?"xcode-select version "
8
+ unless `xcode-select -v`.include?('xcode-select version ')
9
9
  Helper.log.fatal '#############################################################'
10
- Helper.log.fatal "# You have to install the Xcode commdand line tools to use fastlane"
11
- Helper.log.fatal "# Install the latest version of Xcode from the AppStore"
12
- Helper.log.fatal "# Run xcode-select --install to install the developer tools"
10
+ Helper.log.fatal '# You have to install the Xcode commdand line tools to use fastlane'
11
+ Helper.log.fatal '# Install the latest version of Xcode from the AppStore'
12
+ Helper.log.fatal '# Run xcode-select --install to install the developer tools'
13
13
  Helper.log.fatal '#############################################################'
14
14
  raise "Run 'xcode-select --install' and start fastlane again"
15
15
  end
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -4,13 +4,12 @@ module Fastlane
4
4
 
5
5
  # @return The runner which can be executed to trigger the given actions
6
6
  def initialize(path = nil)
7
- if (path || '').length > 0
8
- raise "Could not find Fastfile at path '#{path}'".red unless File.exists?path
9
- @path = path
10
- content = File.read(path)
7
+ return unless (path || '').length > 0
8
+ raise "Could not find Fastfile at path '#{path}'".red unless File.exist?(path)
9
+ @path = path
10
+ content = File.read(path)
11
11
 
12
- parse(content)
13
- end
12
+ parse(content)
14
13
  end
15
14
 
16
15
  def parse(data)
@@ -20,7 +19,7 @@ module Fastlane
20
19
  eval(data) # this is okay in this case
21
20
  end
22
21
 
23
- return self
22
+ self
24
23
  end
25
24
 
26
25
  def lane(key, &block)
@@ -44,12 +43,12 @@ module Fastlane
44
43
  # Overwrite this, since there is already a 'say' method defined in the Ruby standard library
45
44
  value ||= yield
46
45
  Actions.execute_action('say') do
47
- Fastlane::Actions::SayAction.run([value])
46
+ Fastlane::Actions::SayAction.run([value])
48
47
  end
49
48
  end
50
49
 
51
50
  def actions_path(path)
52
- raise "Path '#{path}' not found!".red unless File.directory?path
51
+ raise "Path '#{path}' not found!".red unless File.directory?(path)
53
52
 
54
53
  Actions.load_external_actions(path)
55
54
  end
@@ -61,10 +60,10 @@ module Fastlane
61
60
  end
62
61
  end
63
62
 
64
- def method_missing(method_sym, *arguments, &block)
63
+ def method_missing(method_sym, *arguments, &_block)
65
64
  # First, check if there is a predefined method in the actions folder
66
65
 
67
- class_name = method_sym.to_s.classify + "Action"
66
+ class_name = method_sym.to_s.classify + 'Action'
68
67
  class_ref = nil
69
68
  begin
70
69
  class_ref = Fastlane::Actions.const_get(class_name)
@@ -73,10 +72,10 @@ module Fastlane
73
72
  raise "Could not find method '#{method_sym}'. Check out the README for more details: https://github.com/KrauseFx/fastlane".red
74
73
  end
75
74
 
76
- if class_ref and class_ref.respond_to?(:run)
75
+ if class_ref && class_ref.respond_to?(:run)
77
76
  Helper.log.info "Step: #{method_sym.to_s}".green
78
77
 
79
- Dir.chdir("..") do # go up from the fastlane folder, to the project folder
78
+ Dir.chdir('..') do # go up from the fastlane folder, to the project folder
80
79
  Actions.execute_action(method_sym) do
81
80
  class_ref.run(arguments)
82
81
  end
@@ -86,4 +85,4 @@ module Fastlane
86
85
  end
87
86
  end
88
87
  end
89
- end
88
+ end
@@ -1,18 +1,18 @@
1
1
  module Fastlane
2
2
  class FastlaneFolder
3
3
  FOLDER_NAME = 'fastlane'
4
-
4
+
5
5
  def self.path
6
- return "./#{FOLDER_NAME}/" if File.directory?"./#{FOLDER_NAME}/"
7
- return "./.#{FOLDER_NAME}/" if File.directory?"./.#{FOLDER_NAME}/" # hidden folder
8
- return "./" if File.basename(Dir.getwd) == FOLDER_NAME and File.exists?"Fastfile" # inside the folder
9
- return "./" if File.basename(Dir.getwd) == FOLDER_NAME and File.exists?"Fastfile" # inside the folder and hidden
10
- return nil
6
+ return "./#{FOLDER_NAME}/" if File.directory?("./#{FOLDER_NAME}/")
7
+ return "./.#{FOLDER_NAME}/" if File.directory?("./.#{FOLDER_NAME}/") # hidden folder
8
+ return './' if File.basename(Dir.getwd) == FOLDER_NAME && File.exist?('Fastfile') # inside the folder
9
+ return './' if File.basename(Dir.getwd) == FOLDER_NAME && File.exist?('Fastfile') # inside the folder and hidden
10
+ nil
11
11
  end
12
12
 
13
13
  def self.setup?
14
- return false unless self.path
15
- return File.exists?self.path
14
+ return false unless path
15
+ File.exist?(path)
16
16
  end
17
17
 
18
18
  def self.create_folder!
@@ -21,4 +21,4 @@ module Fastlane
21
21
  Helper.log.info "Created new folder '#{path}'.".green
22
22
  end
23
23
  end
24
- end
24
+ end
@@ -7,26 +7,25 @@ module Fastlane
7
7
  # And http://nelsonwells.net/2012/09/how-jenkins-ci-parses-and-displays-junit-output/
8
8
 
9
9
  containing_folder = Fastlane::FastlaneFolder.path || Dir.pwd
10
- path = File.join(containing_folder, "report.xml")
11
-
10
+ path = File.join(containing_folder, 'report.xml')
12
11
 
13
12
  builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
14
- xml.testsuites(name: "fastlane") {
15
- xml.testsuite(name: "deploy") {
13
+ xml.testsuites(name: 'fastlane') do
14
+ xml.testsuite(name: 'deploy') do
16
15
  results.each_with_index do |current, index|
17
- xml.testcase(name: [index, current[:name]].join(": "), time: current[:time]) {
16
+ xml.testcase(name: [index, current[:name]].join(': '), time: current[:time]) do
18
17
  xml.failure(message: current[:error]) if current[:error]
19
18
  xml.system_out current[:output] if current[:output]
20
- }
19
+ end
21
20
  end
22
- }
23
- }
21
+ end
22
+ end
24
23
  end
25
- result = builder.to_xml.gsub("system_", "system-").gsub("", " ") # Jenkins can not parse 'ESC' symbol
24
+ result = builder.to_xml.gsub('system_', 'system-').gsub("", ' ') # Jenkins can not parse 'ESC' symbol
26
25
 
27
26
  File.write(path, result)
28
27
 
29
- return path
28
+ path
30
29
  end
31
30
  end
32
- end
31
+ end
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  class LaneManager
3
3
  def self.cruise_lanes(lanes)
4
- raise "lanes must be an array" unless lanes.kind_of?Array
4
+ raise 'lanes must be an array' unless lanes.is_a?(Array)
5
5
  ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path, 'Fastfile'))
6
6
 
7
7
  if lanes.count == 0
@@ -16,7 +16,7 @@ module Fastlane
16
16
  end
17
17
  rescue => ex
18
18
  if Actions.lane_context.count > 0
19
- Helper.log.info "Variable Dump:".yellow
19
+ Helper.log.info 'Variable Dump:'.yellow
20
20
  Helper.log.info Actions.lane_context
21
21
  end
22
22
  Helper.log.fatal ex
@@ -32,12 +32,12 @@ module Fastlane
32
32
  if duration > 5
33
33
  Helper.log.info "fastlane.tools just saved you #{duration} minutes! 🎉".green
34
34
  else
35
- Helper.log.info "fastlane.tools finished successfully 🎉".green
35
+ Helper.log.info 'fastlane.tools finished successfully 🎉'.green
36
36
  end
37
37
  else
38
- Helper.log.fatal "fastlane finished with errors".red
38
+ Helper.log.fatal 'fastlane finished with errors'.red
39
39
  raise e
40
40
  end
41
41
  end
42
42
  end
43
- end
43
+ end
@@ -2,29 +2,29 @@ module Fastlane
2
2
  # Guides the new user through creating a new action
3
3
  module NewAction
4
4
  def self.run
5
- name = self.fetch_name
6
- self.generate_action(name)
5
+ name = fetch_name
6
+ generate_action(name)
7
7
  end
8
8
 
9
9
  def self.fetch_name
10
- puts "Must be lower case, and use a'_' between words. Do not use a '.'".green
10
+ puts "Must be lower case, and use a '_' between words. Do not use '.'".green
11
11
  puts "examples: 'testflight', 'upload_to_s3'".green
12
- name = ask("Name of your action: ")
13
- while not name_valid?name
14
- puts "Name invalid!"
15
- name = ask("Name of your action: ")
12
+ name = ask('Name of your action: ')
13
+ while !name_valid?(name)
14
+ puts 'Name invalid!'
15
+ name = ask('Name of your action: ')
16
16
  end
17
17
  name
18
18
  end
19
19
 
20
20
  def self.generate_action(name)
21
- template = File.read("#{Helper.gem_path}/lib/assets/custom_action_template.rb")
21
+ template = File.read("#{Helper.gem_path('fastlane')}/lib/assets/custom_action_template.rb")
22
22
  template.gsub!('[[NAME]]', name)
23
23
  template.gsub!('[[NAME_UP]]', name.upcase)
24
- template.gsub!('[[NAME_CLASS]]', name.classify + "Action")
24
+ template.gsub!('[[NAME_CLASS]]', name.classify + 'Action')
25
25
 
26
- actions_path = File.join(FastlaneFolder.path, "actions")
27
- FileUtils.mkdir_p(actions_path) unless File.directory?actions_path
26
+ actions_path = File.join((FastlaneFolder.path || Dir.pwd), 'actions')
27
+ FileUtils.mkdir_p(actions_path) unless File.directory?(actions_path)
28
28
 
29
29
  path = File.join(actions_path, "#{name}.rb")
30
30
  File.write(path, template)
@@ -32,8 +32,9 @@ module Fastlane
32
32
  end
33
33
 
34
34
  private
35
- def self.name_valid?(name)
36
- name == name.downcase and name.length > 0 and not name.include?"."
37
- end
35
+
36
+ def self.name_valid?(name)
37
+ name == name.downcase && name.length > 0 && !name.include?('.')
38
+ end
38
39
  end
39
- end
40
+ end
@@ -1,6 +1,5 @@
1
1
  module Fastlane
2
2
  class Runner
3
-
4
3
  def execute(key)
5
4
  key = key.to_sym
6
5
  Helper.log.info "Driving the lane '#{key}'".green
@@ -10,7 +9,7 @@ module Fastlane
10
9
 
11
10
  Dir.chdir(Fastlane::FastlaneFolder.path || Dir.pwd) do # the file is located in the fastlane folder
12
11
  @before_all.call if @before_all
13
-
12
+
14
13
  return_val = nil
15
14
 
16
15
  if blocks[key]
@@ -51,8 +50,9 @@ module Fastlane
51
50
  end
52
51
 
53
52
  private
54
- def blocks
55
- @blocks ||= {}
56
- end
53
+
54
+ def blocks
55
+ @blocks ||= {}
56
+ end
57
57
  end
58
- end
58
+ end
@@ -1,40 +1,39 @@
1
+ # rubocop:disable Metrics/LineLength
2
+
1
3
  module Fastlane
2
4
  class Setup
3
5
  def run
4
6
  raise "Fastlane already set up at path #{folder}".yellow if FastlaneFolder.setup?
5
7
 
6
8
  show_infos
7
- response = agree("Do you want to get started? This will move your Deliverfile and Snapfile (if they exist) (y/n)".yellow, true)
8
-
9
- if response
10
- response = agree("Do you have everything commited in version control? If not please do so! (y/n)".yellow, true)
11
- if response
12
- begin
13
- FastlaneFolder.create_folder!
14
- copy_existing_files
15
- generate_app_metadata
16
- detect_installed_tools # after copying the existing files
17
- ask_to_enable_other_tools
18
- FileUtils.mkdir(File.join(folder, "actions"))
19
- generate_fastfile
20
- Helper.log.info "Successfully finished setting up fastlane".green
21
- rescue Exception => ex # this will also be caused by Ctrl + C
22
- # Something went wrong with the setup, clear the folder again
23
- # and restore previous files
24
- Helper.log.fatal "Error occured with the setup program! Reverting changes now!".red
25
- restore_previous_state
26
- raise ex
27
- end
28
- end
9
+ response = agree('Do you want to get started? This will move your Deliverfile and Snapfile (if they exist) (y/n)'.yellow, true)
10
+ return unless response
11
+ response = agree('Do you have everything commited in version control? If not please do so! (y/n)'.yellow, true)
12
+ return unless response
13
+ begin
14
+ FastlaneFolder.create_folder!
15
+ copy_existing_files
16
+ generate_app_metadata
17
+ detect_installed_tools # after copying the existing files
18
+ ask_to_enable_other_tools
19
+ FileUtils.mkdir(File.join(folder, 'actions'))
20
+ generate_fastfile
21
+ Helper.log.info 'Successfully finished setting up fastlane'.green
22
+ rescue Exception => ex # this will also be caused by Ctrl + C
23
+ # Something went wrong with the setup, clear the folder again
24
+ # and restore previous files
25
+ Helper.log.fatal 'Error occured with the setup program! Reverting changes now!'.red
26
+ restore_previous_state
27
+ raise ex
29
28
  end
30
29
  end
31
30
 
32
31
  def show_infos
33
- Helper.log.info "This setup will help you get up and running in no time.".green
34
- Helper.log.info "First, it will move the config files from `deliver` and `snapshot`".green
32
+ Helper.log.info 'This setup will help you get up and running in no time.'.green
33
+ Helper.log.info 'First, it will move the config files from `deliver` and `snapshot`'.green
35
34
  Helper.log.info "into the subfolder `fastlane`.\n".green
36
35
  Helper.log.info "Fastlane will check what tools you're already using and set up".green
37
- Helper.log.info "the tool automatically for you. Have fun! ".green
36
+ Helper.log.info 'the tool automatically for you. Have fun! '.green
38
37
  end
39
38
 
40
39
  def files_to_copy
@@ -43,34 +42,33 @@ module Fastlane
43
42
 
44
43
  def copy_existing_files
45
44
  files_to_copy.each do |current|
46
- if File.exists?current
47
- file_name = File.basename(current)
48
- to_path = File.join(folder, file_name)
49
- Helper.log.info "Moving '#{current}' to '#{to_path}'".green
50
- FileUtils.mv(current, to_path)
51
- end
45
+ next unless File.exist?(current)
46
+ file_name = File.basename(current)
47
+ to_path = File.join(folder, file_name)
48
+ Helper.log.info "Moving '#{current}' to '#{to_path}'".green
49
+ FileUtils.mv(current, to_path)
52
50
  end
53
51
  end
54
52
 
55
53
  def generate_app_metadata
56
- Helper.log.info "------------------------------"
57
- Helper.log.info "To not re-enter your username and app identifier every time you run one of the fastlane tools or fastlane, these will be stored from now on.".green
58
- app_identifier = ask("App Identifier (com.krausefx.app): ".yellow)
59
- apple_id = ask("Your Apple ID: ".yellow)
60
- template = File.read("#{Helper.gem_path}/lib/assets/AppfileTemplate")
54
+ Helper.log.info '------------------------------'
55
+ Helper.log.info 'To not re-enter your username and app identifier every time you run one of the fastlane tools or fastlane, these will be stored from now on.'.green
56
+ app_identifier = ask('App Identifier (com.krausefx.app): '.yellow)
57
+ apple_id = ask('Your Apple ID: '.yellow)
58
+ template = File.read("#{Helper.gem_path('fastlane')}/lib/assets/AppfileTemplate")
61
59
  template.gsub!('[[APP_IDENTIFIER]]', app_identifier)
62
60
  template.gsub!('[[APPLE_ID]]', apple_id)
63
- path = File.join(folder, "Appfile")
61
+ path = File.join(folder, 'Appfile')
64
62
  File.write(path, template)
65
63
  Helper.log.info "Created new file '#{path}'. Edit it to manage your preferred app metadata information.".green
66
64
  end
67
65
 
68
66
  def detect_installed_tools
69
67
  @tools = {}
70
- @tools[:deliver] = File.exists?(File.join(folder, 'Deliverfile'))
71
- @tools[:snapshot] = File.exists?(File.join(folder, 'Snapfile'))
72
- @tools[:xctool] = File.exists?('./.xctool-args')
73
- @tools[:cocoapods] = File.exists?('./Podfile')
68
+ @tools[:deliver] = File.exist?(File.join(folder, 'Deliverfile'))
69
+ @tools[:snapshot] = File.exist?(File.join(folder, 'Snapfile'))
70
+ @tools[:xctool] = File.exist?('./.xctool-args')
71
+ @tools[:cocoapods] = File.exist?('./Podfile')
74
72
  @tools[:sigh] = false
75
73
  end
76
74
 
@@ -84,11 +82,11 @@ module Fastlane
84
82
  end
85
83
  else
86
84
  # deliver already enabled
87
- Helper.log.info "-------------------------------------------------------------------------------------------"
88
- Helper.log.info "Since all files are moved into the `fastlane` subfolder, you have to adapt your Deliverfile".yellow
89
- Helper.log.info "Update your `ipa` and `beta_ipa` block of your Deliverfile to go a folder up before building".yellow
85
+ Helper.log.info '-------------------------------------------------------------------------------------------'
86
+ Helper.log.info 'Since all files are moved into the `fastlane` subfolder, you have to adapt your Deliverfile'.yellow
87
+ Helper.log.info 'Update your `ipa` and `beta_ipa` block of your Deliverfile to go a folder up before building'.yellow
90
88
  Helper.log.info "e.g. `system('cd ..; ipa build')`".yellow
91
- Helper.log.info "Please read the above carefully and click Enter to confirm.".green
89
+ Helper.log.info 'Please read the above carefully and click Enter to confirm.'.green
92
90
  STDIN.gets
93
91
  end
94
92
 
@@ -103,13 +101,11 @@ module Fastlane
103
101
  end
104
102
  end
105
103
 
106
- if agree("Do you want to use 'sigh', which will maintain and download the provisioning profile for your app? (y/n)".yellow, true)
107
- @tools[:sigh] = true
108
- end
104
+ @tools[:sigh] = true if agree("Do you want to use 'sigh', which will maintain and download the provisioning profile for your app? (y/n)".yellow, true)
109
105
  end
110
106
 
111
107
  def generate_fastfile
112
- template = File.read("#{Helper.gem_path}/lib/assets/FastfileTemplate")
108
+ template = File.read("#{Helper.gem_path('fastlane')}/lib/assets/FastfileTemplate")
113
109
 
114
110
  template.gsub!('deliver', '# deliver') unless @tools[:deliver]
115
111
  template.gsub!('snapshot', '# snapshot') unless @tools[:snapshot]
@@ -122,7 +118,7 @@ module Fastlane
122
118
  Helper.log.info "'#{key}' not enabled.".yellow unless value
123
119
  end
124
120
 
125
- path = File.join(folder, "Fastfile")
121
+ path = File.join(folder, 'Fastfile')
126
122
  File.write(path, template)
127
123
  Helper.log.info "Created new file '#{path}'. Edit it to manage your own deployment lanes.".green
128
124
  end
@@ -136,14 +132,14 @@ module Fastlane
136
132
  files_to_copy.each do |current|
137
133
  from_path = File.join(folder, current)
138
134
  to_path = File.basename(current)
139
- if File.exists?from_path
135
+ if File.exist?(from_path)
140
136
  Helper.log.info "Moving '#{from_path}' to '#{to_path}'".yellow
141
137
  FileUtils.mv(from_path, to_path)
142
138
  end
143
139
  end
144
140
 
145
141
  Helper.log.info "Deleting the 'fastlane' folder".yellow
146
- FileUtils.rm_rf(folder)
142
+ FileUtils.rm_rf(folder)
147
143
  end
148
144
  end
149
- end
145
+ end