Sha256: 6eb9273a8e0b073e87121c63fd879fb39de9a9d55f609f7ac88bee9ae3a17e21

Contents?: true

Size: 940 Bytes

Versions: 7

Compression:

Stored size: 940 Bytes

Contents

require 'librarian/source/basic_api'
require 'librarian/source/local'

module Librarian
  module Source
    class Path
      include BasicApi
      include Local

      lock_name 'PATH'
      spec_options []

      attr_accessor :environment
      private :environment=
      attr_reader :path

      def initialize(environment, path, options)
        self.environment = environment
        @path = path
      end

      def to_s
        path.to_s
      end

      def ==(other)
        other &&
        self.class  == other.class &&
        self.path   == other.path
      end

      def to_spec_args
        [path.to_s, {}]
      end

      def to_lock_options
        {:remote => path}
      end

      def pinned?
        false
      end

      def unpin!
      end

      def cache!
      end

      def filesystem_path
        @filesystem_path ||= Pathname.new(path).expand_path(environment.project_path)
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
librarianp-0.1.2 lib/librarian/source/path.rb
librarian-0.1.2 lib/librarian/source/path.rb
librarian-0.1.1 lib/librarian/source/path.rb
librarian-0.1.0 lib/librarian/source/path.rb
librarian-0.1.0.beta.1 lib/librarian/source/path.rb
librarian-puppet-lmco-0.9.8.2 vendor/librarian/lib/librarian/source/path.rb
librarian-0.0.26 lib/librarian/source/path.rb