lib/cassette-rack/configure.rb in cassette-rack-0.4.0 vs lib/cassette-rack/configure.rb in cassette-rack-0.4.1
- old
+ new
@@ -1,11 +1,11 @@
require 'vcr'
module CassetteRack
module Configure
class << self
- attr_accessor :cassette_extension, :cassette_path, :url
+ attr_accessor :cassette_path, :url
def setup
keys.each do |key|
instance_variable_set(:"@#{key}", CassetteRack::Default.send(key))
end
@@ -16,11 +16,11 @@
config.cassette_library_dir = self.source_path
end
end
def keys
- @keys ||= %i[cassette_extension cassette_path url]
+ @keys ||= %i[cassette_path url]
end
def source_path
@source_path ||= File.expand_path(self.cassette_path)
end
@@ -35,15 +35,23 @@
def content_layout
@content_layout ||= File.expand_path('content.md.liquid', File.join(self.templates_path, 'layouts'))
end
+ def preview_layout
+ @preview_layout ||= File.expand_path('preview.liquid', File.join(self.templates_path, 'layouts'))
+ end
+
def application_template
File.read(self.application_layout)
end
def content_template
File.read(self.content_layout)
+ end
+
+ def preview_template
+ File.read(self.preview_layout)
end
end
end
end