lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.0.3 vs lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.1.0

- old
+ new

@@ -12,10 +12,15 @@ end route "spotlight_root" end + def friendly_id + gem "friendly_id" + generate "friendly_id" + end + def assets copy_file "spotlight.css.scss", "app/assets/stylesheets/spotlight.css.scss" copy_file "spotlight.js", "app/assets/javascripts/spotlight.js" end @@ -34,10 +39,17 @@ inject_into_class 'app/helpers/application_helper.rb', ApplicationHelper, " include SpotlightHelper" end def add_model_mixin inject_into_file 'app/models/solr_document.rb', after: "include Blacklight::Solr::Document" do - "\n include Spotlight::SolrDocument\n include Spotlight::SolrDocument::AtomicUpdates\n" + "\n include Spotlight::SolrDocument\n" + + "include Spotlight::SolrDocument::AtomicUpdates\n" + + "include Spotlight::SolrDocument::Openseadragon\n" end + end + + def generate_social_share_button_initializer + gem 'social-share-button' + directory 'config' end end end