Module: Docsmith

Defined in:
lib/docsmith.rb,
lib/docsmith/diff.rb,
lib/docsmith/errors.rb,
lib/docsmith/version.rb,
lib/docsmith/document.rb,
lib/docsmith/auto_save.rb,
lib/docsmith/diff/engine.rb,
lib/docsmith/diff/result.rb,
lib/docsmith/version_tag.rb,
lib/docsmith/versionable.rb,
lib/docsmith/events/event.rb,
lib/docsmith/configuration.rb,
lib/docsmith/diff/renderers.rb,
lib/docsmith/comments/anchor.rb,
lib/docsmith/events/notifier.rb,
lib/docsmith/version_manager.rb,
lib/docsmith/comments/comment.rb,
lib/docsmith/comments/manager.rb,
lib/docsmith/document_version.rb,
lib/docsmith/comments/migrator.rb,
lib/docsmith/diff/parsers/html.rb,
lib/docsmith/diff/renderers/base.rb,
lib/docsmith/events/hook_registry.rb,
lib/docsmith/diff/parsers/markdown.rb,
lib/docsmith/diff/renderers/registry.rb,
lib/docsmith/rendering/html_renderer.rb,
lib/docsmith/rendering/json_renderer.rb,
lib/generators/docsmith/install/install_generator.rb,
sig/docsmith.rbs

Defined Under Namespace

Modules: AutoSave, Comments, Diff, Events, Generators, Rendering, VersionManager, Versionable Classes: ClassConfig, Configuration, Document, DocumentVersion, Error, InvalidContentField, InvalidHtmlSanitizer, InvalidJsonContent, MaxVersionsExceeded, TagAlreadyExists, VersionNotFound, VersionTag

Constant Summary collapse

VERSION =

Returns:

  • (String)
"0.2.0"
JSON_SCHEMA_VERSION =

Wire-format version for every JSON export the gem produces, emitted as the "schema_version" key. Independent of VERSION: it changes only when the shape of an export changes, so third-party clients can branch on it instead of sniffing for keys or pinning a gem version.

1

Class Method Summary collapse

Class Method Details

.configurationDocsmith::Configuration



43
44
45
# File 'lib/docsmith.rb', line 43

def configuration
  @configuration ||= Configuration.new
end

.configure {|Docsmith::Configuration| ... } ⇒ Object



38
39
40
# File 'lib/docsmith.rb', line 38

def configure
  yield configuration
end

.reset_configuration!Object

Reset to gem defaults. Call in specs via config.before(:each).



48
49
50
# File 'lib/docsmith.rb', line 48

def reset_configuration!
  @configuration = Configuration.new
end