class HologramRails::Generators::InstallGenerator

Public Instance Methods

init_guard() click to toggle source
# File lib/generators/hologram_rails/install/install_generator.rb, line 21
      def init_guard
        `bundle exec guard init`
        gsub_file('Guardfile', 'guard "hologram"', <<-RUBY)
          guard 'hologram', config_path: 'hologram_config.yml' do
            watch(%r{app/assets/stylesheets/.*css})
            watch(%r{app/assets/javascripts/.*js})
            watch(%r{doc_assets/*})
            watch('hologram_config.yml')
          end
        RUBY
      end
init_hologram() click to toggle source
# File lib/generators/hologram_rails/install/install_generator.rb, line 10
def init_hologram
  `bundle exec hologram init`
  remove_file('hologram_config.yml')
  copy_file('hologram_config.yml', 'hologram_config.yml')

  remove_file('doc_assets/_header.html')
  copy_file('_header.html', 'doc_assets/_header.html')
  remove_file('doc_assets/_footer.html')
  copy_file('_footer.html', 'doc_assets/_footer.html')
end