@@ -87,6 +87,61 @@ Keep in mind, that for optimal performance, you should use a HTTP library which
8787* [ Documentation] ( http://rubydoc.info/gems/elasticsearch-extensions/ )
8888* [ Test Suite] ( https://github.com/elasticsearch/elasticsearch-ruby/blob/master/elasticsearch-extensions/test )
8989
90+ ## Development
91+
92+ To work on the code, clone and bootstrap the project first:
93+
94+ ```
95+ git clone https://github.com/elasticsearch/elasticsearch-ruby.git
96+ cd elasticsearch-ruby/
97+ rake setup
98+ rake bundle
99+ ```
100+
101+ This will clone the Elasticsearch repository into the project, and run ` bundle install ` in all subprojects.
102+
103+ To run tests, you need to start a testing cluster on port 9250,
104+ or provide a different one in the ` TEST_CLUSTER_PORT ` environment variable.
105+
106+ There's a Rake task to start the testing cluster:
107+
108+ ```
109+ rake test:cluster:start
110+ ```
111+
112+ You can configure the port, path to the startup script,
113+ number of nodes, and other settings with environment variables:
114+
115+ ```
116+ TEST_CLUSTER_COMMAND=./tmp/builds/elasticsearch-2.0.0-SNAPSHOT/bin/elasticsearch \
117+ TEST_CLUSTER_PORT=9250 \
118+ TEST_CLUSTER_NODES=2 \
119+ TEST_CLUSTER_NAME=my_cluster \
120+ TEST_CLUSTER_PARAMS='-Xms500m -Xmx500m -D es.index.store.type=niofs' \
121+ TEST_CLUSTER_TIMEOUT=120 \
122+ rake test:cluster:start
123+ ```
124+
125+ To run tests against unreleased Elasticsearch versions, you can use the ` rake elasticsearch:build `
126+ Rake task to build Elasticsearch from the cloned source
127+ (use ` rake elasticsearch:update ` to update the repository):
128+
129+ ```
130+ rake elasticsearch:build
131+ ```
132+
133+ You can pass a branch name (tag, commit, ...) as the Rake task variable:
134+
135+ ```
136+ rake elasticsearch:build[origin/1.x]
137+ ```
138+
139+ To run all the tests in all the subprojects, use the Rake task:
140+
141+ ```
142+ time rake test:all
143+ ```
144+
90145## License
91146
92147This software is licensed under the Apache 2 license, quoted below.
0 commit comments