Sha256: 552bb4e6828aead9cab5343e4351d447d4a4cf139999c68d317d02fc6f59ae5d

Contents?: true

Size: 475 Bytes

Versions: 5

Compression:

Stored size: 475 Bytes

Contents

class H2ocubeRailsSunspotGenerator < Rails::Generators::Base
  source_root File.expand_path('../source', __FILE__)

  desc 'Creates config/sunspot.yml and spec/support/sunspot.rb.'

  def copy_config_sunspot_rb
    template 'sunspot.yml.erb', 'config/sunspot.yml'
  end
  
  def copy_spec_support_sunspot_yml
    template 'sunspot.rb.erb', 'spec/support/sunspot.rb'
  end
  
  private
  
  def app_name
    Rails.application.class.to_s.split('::').first.underscore
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
h2ocube_rails_sunspot-0.0.5 lib/generators/h2ocube_rails_sunspot_generator.rb
h2ocube_rails_sunspot-0.0.4 lib/generators/h2ocube_rails_sunspot_generator.rb
h2ocube_rails_sunspot-0.0.3 lib/generators/h2ocube_rails_sunspot_generator.rb
h2ocube_rails_sunspot-0.0.2 lib/generators/h2ocube_rails_sunspot_generator.rb
h2ocube_rails_sunspot-0.0.1 lib/generators/h2ocube_rails_sunspot_generator.rb