Skip to content

Commit ed070b8

Browse files
committed
Removes dependency on extensions
1 parent ce57cc1 commit ed070b8

File tree

6 files changed

+3
-52
lines changed

6 files changed

+3
-52
lines changed

Gemfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
source 'https://rubygems.org'
1919

2020
gem "rake", "~> 12"
21-
22-
gem 'elasticsearch-extensions'
23-
21+
gem "elasticsearch"
2422
gem "pry"
2523
gem "ansi"
2624
gem "cane"

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,7 @@ You can also unit, integration, or both tests for all sub-projects from the top-
160160

161161
rake test:all
162162

163-
The test suite expects an Elasticsearch cluster running on port 9250, and **will delete all the data**. You can launch an isolated, in-memory Elasticsearch cluster with the following Rake task:
164-
165-
TEST_CLUSTER_COMMAND=/tmp/builds/elasticsearch-2.0.0-SNAPSHOT/bin/elasticsearch TEST_CLUSTER_NODES=1 bundle exec rake test:cluster:start
166-
167-
See more information in the documentation for the [`elasticsearch-extensions`](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-extensions#testcluster) gem.
163+
The test suite expects an Elasticsearch cluster running on port 9250, and **will delete all the data**.
168164

169165
## License
170166

Rakefile

+1-40
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
require 'pathname'
19+
require 'elasticsearch'
1920

2021
subprojects = ['elasticsearch-rails', 'elasticsearch-persistence']
2122
subprojects << 'elasticsearch-model' unless defined?(JRUBY_VERSION)
@@ -97,26 +98,6 @@ namespace :test do
9798
end
9899
end
99100

100-
desc "Run Elasticsearch (Docker)"
101-
task :setup_elasticsearch_docker do
102-
begin
103-
sh <<-COMMAND.gsub(/^\s*/, '').gsub(/\s{1,}/, ' ')
104-
docker run -d=true \
105-
--env "discovery.type=single-node" \
106-
--env "cluster.name=elasticsearch-rails" \
107-
--env "http.port=9200" \
108-
--env "cluster.routing.allocation.disk.threshold_enabled=false" \
109-
--publish 9250:9200 \
110-
--rm \
111-
docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
112-
COMMAND
113-
require 'elasticsearch/extensions/test/cluster'
114-
Elasticsearch::Extensions::Test::Cluster::Cluster.new(version: ENV['ELASTICSEARCH_VERSION'],
115-
number_of_nodes: 1).wait_for_green
116-
rescue
117-
end
118-
end
119-
120101
desc "Setup MongoDB (Docker)"
121102
task :setup_mongodb_docker do
122103
begin
@@ -167,26 +148,6 @@ namespace :test do
167148
puts "\n"
168149
end
169150
end
170-
171-
namespace :cluster do
172-
desc "Start Elasticsearch nodes for tests"
173-
task :start do
174-
require 'elasticsearch/extensions/test/cluster'
175-
Elasticsearch::Extensions::Test::Cluster.start
176-
end
177-
178-
desc "Stop Elasticsearch nodes for tests"
179-
task :stop do
180-
require 'elasticsearch/extensions/test/cluster'
181-
Elasticsearch::Extensions::Test::Cluster.stop
182-
end
183-
184-
task :status do
185-
require 'elasticsearch/extensions/test/cluster'
186-
(puts "\e[31m[!] Test cluster not running\e[0m"; exit(1)) unless Elasticsearch::Extensions::Test::Cluster.running?
187-
Elasticsearch::Extensions::Test::Cluster.__print_cluster_info(ENV['TEST_CLUSTER_PORT'] || 9250)
188-
end
189-
end
190151
end
191152

192153

elasticsearch-model/elasticsearch-model.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Gem::Specification.new do |s|
4848
s.add_development_dependency 'activemodel', '> 3'
4949
s.add_development_dependency 'bundler'
5050
s.add_development_dependency 'cane'
51-
s.add_development_dependency 'elasticsearch-extensions'
5251
s.add_development_dependency 'kaminari'
5352
s.add_development_dependency 'minitest'
5453
s.add_development_dependency 'mocha'

elasticsearch-persistence/elasticsearch-persistence.gemspec

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ Gem::Specification.new do |s|
5353

5454
s.add_development_dependency "rails", '> 4'
5555

56-
s.add_development_dependency "elasticsearch-extensions"
57-
5856
s.add_development_dependency "minitest"
5957
s.add_development_dependency "test-unit"
6058
s.add_development_dependency "shoulda-context"

elasticsearch-rails/elasticsearch-rails.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Gem::Specification.new do |s|
4848

4949
s.add_development_dependency 'bundler'
5050
s.add_development_dependency 'cane'
51-
s.add_development_dependency 'elasticsearch-extensions'
5251
s.add_development_dependency 'lograge'
5352
s.add_development_dependency 'minitest'
5453
s.add_development_dependency 'mocha'

0 commit comments

Comments
 (0)