Class: ConfCtl::Swpins::Specs::Directory

Inherits:
Base
  • Object
show all
Defined in:
lib/confctl/swpins/specs/directory.rb

Instance Attribute Summary

Attributes inherited from Base

#channel, #errors, #info, #name

Instance Method Summary collapse

Methods inherited from Base

#as_json, #from_channel?, handle, #initialize, #status, #to_json, #type, #valid?

Constructor Details

This class inherits a constructor from ConfCtl::Swpins::Specs::Base

Instance Method Details

#auto_update?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/confctl/swpins/specs/directory.rb', line 21

def auto_update?
  true
end

#can_update?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/confctl/swpins/specs/directory.rb', line 17

def can_update?
  true
end

#check_info(_other_info) ⇒ Object



35
36
37
# File 'lib/confctl/swpins/specs/directory.rb', line 35

def check_info(_other_info)
  false
end

#check_optsObject



9
10
11
# File 'lib/confctl/swpins/specs/directory.rb', line 9

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

#prefetch_set(args) ⇒ Object



25
26
27
28
29
# File 'lib/confctl/swpins/specs/directory.rb', line 25

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

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

#prefetch_updateObject



31
32
33
# File 'lib/confctl/swpins/specs/directory.rb', line 31

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

#string_changelog_info(_type, _other_info, verbose: false, patch: false, color: false) ⇒ Object



43
44
45
# File 'lib/confctl/swpins/specs/directory.rb', line 43

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

#string_diff_info(_type, _other_info, _opts = {}) ⇒ Object



47
48
49
# File 'lib/confctl/swpins/specs/directory.rb', line 47

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

#versionObject



13
14
15
# File 'lib/confctl/swpins/specs/directory.rb', line 13

def version
  'directory'
end

#version_info(_other_info) ⇒ Object



39
40
41
# File 'lib/confctl/swpins/specs/directory.rb', line 39

def version_info(_other_info)
  'directory'
end