lib/rails/templates/05-settings-files.rb in elasticsearch-rails-2.0.1 vs lib/rails/templates/05-settings-files.rb in elasticsearch-rails-5.0.0

- old
+ new

@@ -1,19 +1,19 @@ # $ rails new searchapp --skip --skip-bundle --template https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/05-settings-files.rb # (See: 01-basic.rb, 02-pretty.rb, 03-expert.rb, 04-dsl.rb) -append_to_file 'README.rdoc', <<-README +append_to_file 'README.md', <<-README -== [5] Settings Files +## [5] Settings Files The `settings-files` template refactors the `Searchable` module to load the index settings from an external file. README -git add: "README.rdoc" +git add: "README.md" git commit: "-m '[05] Updated the application README'" # ----- Setup the Searchable module to load settings from config/elasticsearch/articles_settings.json gsub_file "app/models/concerns/searchable.rb", @@ -29,15 +29,9 @@ get 'https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/articles_settings.json', 'config/elasticsearch/articles_settings.json', force: true git add: "config/elasticsearch/articles_settings.json" git commit: "-m 'Create the articles settings file'" - -# ----- Temporarily set local repo for testing ---------------------------------------------------- - -gsub_file "Gemfile", - %r{gem 'elasticsearch-model', git: 'git://github.com/elasticsearch/elasticsearch-rails.git'}, - "gem 'elasticsearch-model', path: File.expand_path('../../../../../../elasticsearch-model', __FILE__)" # ----- Run bundle install ------------------------------------------------------------------------ run "bundle install"