fastlane/lib/fastlane/fast_file.rb in fastlane-2.74.1 vs fastlane/lib/fastlane/fast_file.rb in fastlane-2.75.0.beta.20180109010003

- old
+ new

@@ -18,14 +18,14 @@ @path = File.expand_path(path) content = File.read(path) # From https://github.com/orta/danger/blob/master/lib/danger/Dangerfile.rb if content.tr!('“”‘’‛', %(""''')) - UI.error "Your #{File.basename(path)} has had smart quotes sanitised. " \ + UI.error("Your #{File.basename(path)} has had smart quotes sanitised. " \ 'To avoid issues in the future, you should not use ' \ 'TextEdit for editing it. If you are not using TextEdit, ' \ - 'you should turn off smart quotes in your editor of choice.' + 'you should turn off smart quotes in your editor of choice.') end content.scan(/^\s*require (.*)/).each do |current| gem_name = current.last next if gem_name.include?(".") # these are local gems @@ -247,18 +247,18 @@ Dir.mktmpdir("fl_clone") do |tmp_path| clone_folder = File.join(tmp_path, repo_name) branch_option = "--branch #{branch}" if branch != 'HEAD' - UI.message "Cloning remote git repo..." + UI.message("Cloning remote git repo...") Actions.sh("GIT_TERMINAL_PROMPT=0 git clone '#{url}' '#{clone_folder}' --depth 1 -n #{branch_option}") unless version.nil? req = Gem::Requirement.new(version) all_tags = fetch_remote_tags(folder: clone_folder) checkout_param = all_tags.select { |t| req =~ FastlaneCore::TagVersion.new(t) }.last - UI.user_error! "No tag found matching #{version.inspect}" if checkout_param.nil? + UI.user_error!("No tag found matching #{version.inspect}") if checkout_param.nil? end Actions.sh("cd '#{clone_folder}' && git checkout #{checkout_param} '#{path}'") # We also want to check out all the local actions of this fastlane setup @@ -283,10 +283,10 @@ ##################################################### # @!group Versioning helpers ##################################################### def fetch_remote_tags(folder: nil) - UI.message "Fetching remote git tags..." + UI.message("Fetching remote git tags...") Actions.sh("cd '#{folder}' && GIT_TERMINAL_PROMPT=0 git fetch --all --tags -q") # Fetch all possible tags git_tags_string = Actions.sh("cd '#{folder}' && git tag -l") git_tags = git_tags_string.split("\n")