|
1 | | -# $ rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/04-dsl.rb |
| 1 | +# $ rails new searchapp --skip --skip-bundle --template https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/04-dsl.rb |
2 | 2 |
|
3 | 3 | # (See: 01-basic.rb, 02-pretty.rb, 03-expert.rb) |
4 | 4 |
|
|
15 | 15 | git add: "README.rdoc" |
16 | 16 | git commit: "-m '[03] Updated the application README'" |
17 | 17 |
|
| 18 | +run 'rm -f app/assets/stylesheets/*.scss' |
| 19 | +run 'rm -f app/assets/javascripts/*.coffee' |
| 20 | + |
18 | 21 | # ----- Add gems into Gemfile --------------------------------------------------------------------- |
19 | 22 |
|
20 | 23 | puts |
21 | 24 | say_status "Rubygems", "Adding Rubygems into Gemfile...\n", :yellow |
22 | 25 | puts '-'*80, ''; sleep 0.25 |
23 | 26 |
|
24 | | -gem "elasticsearch-dsl", git: "git://github.com/elasticsearch/elasticsearch-ruby.git",branch: 'dsl' |
| 27 | +gem "elasticsearch-dsl", git: "git://github.com/elastic/elasticsearch-ruby.git" |
25 | 28 |
|
26 | 29 | git add: "Gemfile*" |
27 | 30 | git commit: "-m 'Added the `elasticsearch-dsl` gem'" |
|
32 | 35 |
|
33 | 36 | # ----- Change the search definition implementation and associated views and tests ---------------- |
34 | 37 |
|
35 | | -copy_file File.expand_path('../searchable.dsl.rb', __FILE__), 'app/models/concerns/searchable.rb', force: true |
36 | | -# get 'https://raw.github.com/elasticsearch/elasticsearch-rails/templates/elasticsearch-rails/lib/rails/templates/searchable.dsl.rb', |
37 | | -# 'app/models/concerns/searchable.rb' |
| 38 | +# copy_file File.expand_path('../searchable.dsl.rb', __FILE__), 'app/models/concerns/searchable.rb', force: true |
| 39 | +get 'https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/searchable.dsl.rb', |
| 40 | + 'app/models/concerns/searchable.rb' |
38 | 41 |
|
39 | | -copy_file File.expand_path('../index.html.dsl.erb', __FILE__), 'app/views/search/index.html.erb', force: true |
40 | | -# get 'https://raw.github.com/elasticsearch/elasticsearch-rails/templates/elasticsearch-rails/lib/rails/templates/index.html.dsl.erb', |
41 | | -# 'app/views/search/index.html.erb' |
| 42 | +# copy_file File.expand_path('../index.html.dsl.erb', __FILE__), 'app/views/search/index.html.erb', force: true |
| 43 | +get 'https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/index.html.dsl.erb', |
| 44 | + 'app/views/search/index.html.erb' |
42 | 45 |
|
43 | 46 | gsub_file "test/controllers/search_controller_test.rb", %r{test "should return facets" do.*?end}m, <<-CODE |
44 | 47 | test "should return aggregations" do |
|
92 | 95 | CODE |
93 | 96 |
|
94 | 97 | git add: "app/models/concerns/ app/views/search/ test/controllers/search_controller_test.rb" |
95 | | -git commit: "-m 'Updated the Article.search method to use the Ruby DSL; Updated the views and tests'" |
| 98 | +git commit: "-m 'Updated the Article.search method to use the Ruby DSL and updated the associated views and tests'" |
96 | 99 |
|
97 | 100 | # ----- Print Git log ----------------------------------------------------------------------------- |
98 | 101 |
|
|
0 commit comments