Sha256: 3ee2dc2429524c8e555c3e756a849d1e8d6dfa59b6c61d092469bc78835dd241

Contents?: true

Size: 650 Bytes

Versions: 12

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require 'avm/git/scms/provider'
require 'avm/git/scms/git_sub_base'
require 'avm/scms/base'
require 'eac_ruby_utils/core_ext'

module Avm
  module Git
    module Scms
      class GitSubtree < ::Avm::Git::Scms::GitSubBase
        def update
          # Do nothing
        end

        def valid?
          return false unless ::Avm::Git::Scms::Provider
                                .new.all.any? { |scm_class| parent_scm.is_a?(scm_class) }

          (::Avm::Git::Scms::Provider.new.all - [self.class])
            .lazy.map { |scm_class| scm_class.new(path) }.none?(&:valid?)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
avm-git-0.17.0 lib/avm/git/scms/git_subtree.rb
eac_tools-0.86.5 sub/avm-git/lib/avm/git/scms/git_subtree.rb
avm-git-0.16.0 lib/avm/git/scms/git_subtree.rb
eac_tools-0.86.4 sub/avm-git/lib/avm/git/scms/git_subtree.rb
eac_tools-0.86.3 sub/avm-git/lib/avm/git/scms/git_subtree.rb
avm-git-0.15.0 lib/avm/git/scms/git_subtree.rb
eac_tools-0.86.2 sub/avm-git/lib/avm/git/scms/git_subtree.rb
eac_tools-0.84.0 sub/avm-git/lib/avm/git/scms/git_subtree.rb
eac_tools-0.83.0 sub/avm-git/lib/avm/git/scms/git_subtree.rb
eac_tools-0.82.0 sub/avm-git/lib/avm/git/scms/git_subtree.rb
avm-git-0.14.0 lib/avm/git/scms/git_subtree.rb
eac_tools-0.81.0 sub/avm-git/lib/avm/git/scms/git_subtree.rb