Sha256: 6d50edc00f1e1b39370505608789761603984ec9ff0266459bc8dab1177945be

Contents?: true

Size: 521 Bytes

Versions: 7

Compression:

Stored size: 521 Bytes

Contents

module Brightbox
  module Config
    module Cache
      def cache_path
        if @cache_path
          @cache_path
        else
          @cache_path = File.join(config_directory, 'cache')
          unless File.exists? @cache_path
            begin
              FileUtils.mkpath @cache_path
            rescue Errno::EEXIST
            end
          end
          @cache_path
        end
      end

      def cache_id(cid)
        FileUtils.touch(File.join(cache_path, cid)) unless cid.nil?
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brightbox-cli-1.2.2 lib/brightbox-cli/config/cache.rb
brightbox-cli-1.2.1 lib/brightbox-cli/config/cache.rb
brightbox-cli-1.2.0 lib/brightbox-cli/config/cache.rb
brightbox-cli-1.1.0 lib/brightbox-cli/config/cache.rb
brightbox-cli-1.0.0 lib/brightbox-cli/config/cache.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/config/cache.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/config/cache.rb