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/zone/config/implicit_record_template.rb,
lib/record_store/provider/dynect.rb
Defined Under Namespace
Classes: CLI, Changeset, Provider, Record, Zone
Constant Summary
collapse
- MAXIMUM_REMOVALS =
20
- VERSION =
'6.7.1'.freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.implicit_records_templates_path ⇒ Object
66
67
68
69
70
71
72
73
|
# File 'lib/record_store.rb', line 66
def implicit_records_templates_path
@implicit_records_templates_path ||= Pathname.new(
File.expand_path(
config.fetch('implicit_records_templates_path'),
File.dirname(config_path),
),
).realpath.to_s
end
|
.secrets_path ⇒ Object
49
50
51
|
# File 'lib/record_store.rb', line 49
def secrets_path
@secrets_path ||= File.expand_path(config.fetch('secrets_path'), File.dirname(config_path))
end
|
.zones_path ⇒ Object
53
54
55
56
57
58
59
60
|
# File 'lib/record_store.rb', line 53
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
81
82
83
|
# File 'lib/record_store.rb', line 81
def config
@config ||= YAML.load_file(config_path)
end
|
.config_path ⇒ Object
62
63
64
|
# File 'lib/record_store.rb', line 62
def config_path
@config_path ||= File.expand_path('config.yml', Dir.pwd)
end
|
.config_path=(config_path) ⇒ Object
75
76
77
78
79
|
# File 'lib/record_store.rb', line 75
def config_path=(config_path)
@config = @zones_path = @secrets_path = nil
@config_path = config_path
Zone.reset
end
|
.defined_zones ⇒ Object
85
86
87
|
# File 'lib/record_store.rb', line 85
def defined_zones
@defined_zones ||= Zone.all.map(&:name)
end
|
.expected_zones ⇒ Object
89
90
91
|
# File 'lib/record_store.rb', line 89
def expected_zones
config.fetch('zones')
end
|