Module: RecordStore
- Defined in:
- lib/record_store.rb,
lib/record_store/cli.rb,
lib/record_store/zone.rb,
lib/record_store/record.rb,
lib/record_store/version.rb,
lib/record_store/provider.rb,
lib/record_store/record/a.rb,
lib/record_store/changeset.rb,
lib/record_store/record/mx.rb,
lib/record_store/record/ns.rb,
lib/record_store/record/caa.rb,
lib/record_store/record/ptr.rb,
lib/record_store/record/spf.rb,
lib/record_store/record/srv.rb,
lib/record_store/record/txt.rb,
lib/record_store/record/aaaa.rb,
lib/record_store/zone/config.rb,
lib/record_store/provider/ns1.rb,
lib/record_store/record/alias.rb,
lib/record_store/record/cname.rb,
lib/record_store/record/sshfp.rb,
lib/record_store/provider/dnsimple.rb,
lib/record_store/provider/ns1/client.rb,
lib/record_store/zone/yaml_definitions.rb,
lib/record_store/provider/google_cloud_dns.rb,
lib/record_store/provider/oracle_cloud_dns.rb,
lib/record_store/zone/config/ignore_pattern.rb,
lib/record_store/provider/dynect.rb
Defined Under Namespace
Classes: CLI, Changeset, Provider, Record, Zone
Constant Summary
collapse
- MAXIMUM_REMOVALS =
20
- VERSION =
'6.1.0'.freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.secrets_path ⇒ Object
47
48
49
|
# File 'lib/record_store.rb', line 47
def secrets_path
@secrets_path ||= File.expand_path(config.fetch('secrets_path'), File.dirname(config_path))
end
|
.zones_path ⇒ Object
51
52
53
54
55
56
|
# File 'lib/record_store.rb', line 51
def zones_path
@zones_path ||= Pathname.new(
File.expand_path(config.fetch('zones_path'),
File.dirname(config_path)),
).realpath.to_s
end
|
Class Method Details
.config ⇒ Object
68
69
70
|
# File 'lib/record_store.rb', line 68
def config
@config ||= YAML.load_file(config_path)
end
|
.config_path ⇒ Object
58
59
60
|
# File 'lib/record_store.rb', line 58
def config_path
@config_path ||= File.expand_path('config.yml', Dir.pwd)
end
|
.config_path=(config_path) ⇒ Object
62
63
64
65
66
|
# File 'lib/record_store.rb', line 62
def config_path=(config_path)
@config = @zones_path = @secrets_path = nil
@config_path = config_path
Zone.reset
end
|
.defined_zones ⇒ Object
72
73
74
|
# File 'lib/record_store.rb', line 72
def defined_zones
@defined_zones ||= Zone.all.map(&:name)
end
|
.expected_zones ⇒ Object
76
77
78
|
# File 'lib/record_store.rb', line 76
def expected_zones
config.fetch('zones')
end
|