Sha256: 733fcd0fd8bed7dced74dc414c598ceaf68b2aa8201a5130e5db955a2c3911c6

Contents?: true

Size: 748 Bytes

Versions: 25

Compression:

Stored size: 748 Bytes

Contents

module Fastlane
  class FastlaneFolder
    FOLDER_NAME = 'fastlane'

    def self.path
      return "./#{FOLDER_NAME}/" if File.directory?("./#{FOLDER_NAME}/")
      return "./.#{FOLDER_NAME}/" if File.directory?("./.#{FOLDER_NAME}/") # hidden folder
      return './' if File.basename(Dir.getwd) == FOLDER_NAME && File.exist?('Fastfile') # inside the folder
      return './' if File.basename(Dir.getwd) == FOLDER_NAME && File.exist?('Fastfile') # inside the folder and hidden
      nil
    end

    def self.setup?
      return false unless path
      File.exist?(path)
    end

    def self.create_folder!
      path = "./#{FOLDER_NAME}"
      FileUtils.mkdir_p path
      Helper.log.info "Created new folder '#{path}'.".green
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
fastlane-0.11.0 lib/fastlane/fastlane_folder.rb
fastlane-0.10.0 lib/fastlane/fastlane_folder.rb
fastlane-0.9.0 lib/fastlane/fastlane_folder.rb
fastlane-0.8.1 lib/fastlane/fastlane_folder.rb
fastlane-0.8.0 lib/fastlane/fastlane_folder.rb
fastlane-0.7.0 lib/fastlane/fastlane_folder.rb
fastlane-0.6.1 lib/fastlane/fastlane_folder.rb
fastlane-0.6.0 lib/fastlane/fastlane_folder.rb
fastlane-0.5.0 lib/fastlane/fastlane_folder.rb
fastlane-0.4.2 lib/fastlane/fastlane_folder.rb
fastlane-0.4.1 lib/fastlane/fastlane_folder.rb
fastlane-0.4.0 lib/fastlane/fastlane_folder.rb
fastlane-0.3.0 lib/fastlane/fastlane_folder.rb
fastlane-0.2.1 lib/fastlane/fastlane_folder.rb
fastlane-0.2.0 lib/fastlane/fastlane_folder.rb
fastlane-0.1.19 lib/fastlane/fastlane_folder.rb
fastlane-0.1.18 lib/fastlane/fastlane_folder.rb
fastlane-0.1.17 lib/fastlane/fastlane_folder.rb
fastlane-0.1.16 lib/fastlane/fastlane_folder.rb
fastlane-0.1.15 lib/fastlane/fastlane_folder.rb