Sha256: 3b2378286e19e6966955661e6750eb5f7a9fc6c4995595fe039ac9f97fb36f5f

Contents?: true

Size: 928 Bytes

Versions: 2

Compression:

Stored size: 928 Bytes

Contents

require_relative 'base'
require 'json'
require 'time'

module ConfCtl
  class Swpins::Specs::Directory < Swpins::Specs::Base
    handle :directory

    def check_opts
      nix_opts['path'] === json_opts['nix_options']['path']
    end

    def version
      'directory'
    end

    def can_update?
      true
    end

    def auto_update?
      true
    end

    def prefetch_set(args)
      raise "spec #{name} does not accept any arguments" if args.any?

      set_fetcher(:directory, { path: nix_opts['path'] })
    end

    def prefetch_update
      set_fetcher(:directory, { path: nix_opts['path'] })
    end

    def check_info(_other_info)
      false
    end

    def version_info(_other_info)
      'directory'
    end

    def string_changelog_info(_type, _other_info, verbose: false, patch: false, color: false)
      nil
    end

    def string_diff_info(_type, _other_info, _opts = {})
      nil
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
confctl-2.0.0 lib/confctl/swpins/specs/directory.rb
confctl-1.0.0 lib/confctl/swpins/specs/directory.rb