Class: Hyrax::ConfigGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/hyrax/config_generator.rb

Instance Method Summary collapse

Instance Method Details

#configure_endnoteObject



29
30
31
32
# File 'lib/generators/hyrax/config_generator.rb', line 29

def configure_endnote
  append_file 'config/initializers/mime_types.rb',
              "\nMime::Type.register 'application/x-endnote-refer', :endnote", verbose: false
end

#configure_redisObject



34
35
36
37
# File 'lib/generators/hyrax/config_generator.rb', line 34

def configure_redis
  copy_file 'config/redis.yml'
  copy_file 'config/initializers/redis_config.rb'
end

#create_initializer_config_fileObject



39
40
41
# File 'lib/generators/hyrax/config_generator.rb', line 39

def create_initializer_config_file
  copy_file 'config/initializers/hyrax.rb'
end

#inject_i18nObject



52
53
54
55
56
57
58
59
60
# File 'lib/generators/hyrax/config_generator.rb', line 52

def inject_i18n
  copy_file 'config/locales/hyrax.en.yml'
  copy_file 'config/locales/hyrax.es.yml'
  copy_file 'config/locales/hyrax.zh.yml'
  copy_file 'config/locales/hyrax.de.yml'
  copy_file 'config/locales/hyrax.fr.yml'
  copy_file 'config/locales/hyrax.it.yml'
  copy_file 'config/locales/hyrax.pt-BR.yml'
end

#local_authoritiesObject



18
19
20
21
22
# File 'lib/generators/hyrax/config_generator.rb', line 18

def local_authorities
  copy_file "config/authorities/licenses.yml"
  copy_file "config/authorities/rights_statements.yml"
  copy_file "config/authorities/resource_types.yml"
end

#minimagick_configObject

Add mini-magick configuration



44
45
46
# File 'lib/generators/hyrax/config_generator.rb', line 44

def minimagick_config
  copy_file 'config/initializers/mini_magick.rb'
end

#simple_form_initializersObject



24
25
26
27
# File 'lib/generators/hyrax/config_generator.rb', line 24

def simple_form_initializers
  copy_file 'config/initializers/simple_form.rb'
  copy_file 'config/initializers/simple_form_bootstrap.rb'
end

#tinymce_configObject



48
49
50
# File 'lib/generators/hyrax/config_generator.rb', line 48

def tinymce_config
  copy_file 'config/tinymce.yml'
end