Sha256: 70c64fcb528b89ad4a044e946b88351cf8777fd173b9ea399ba87c7641f9640e

Contents?: true

Size: 749 Bytes

Versions: 3

Compression:

Stored size: 749 Bytes

Contents

require 'rails/generators'

class Sufia::CitationConfigGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  desc """
This Generator makes the following changes to your application:
  1. Updates existing sufia.rb initializer to include a citation configuration
       """

  def banner
    say_status("info", "ADDING CITATIONS OPTION TO SUFIA CONFIG", :blue)
  end

  def inject_config_initializer
    inject_into_file 'config/initializers/sufia.rb', before: "# Where to store tempfiles, leave blank for the system temp directory (e.g. /tmp)" do
      "# Enables a link to the citations page for a generic_file.\n" \
        "# Default is false\n" \
        "# config.citations = false\n"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-7.0.0.beta3 lib/generators/sufia/citation_config_generator.rb
sufia-7.0.0.beta2 lib/generators/sufia/citation_config_generator.rb
sufia-7.0.0.beta1 lib/generators/sufia/citation_config_generator.rb