elastomer-client 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'tmpdir'
1
2
  require 'rubygems' unless defined? Gem
2
3
  require 'bundler'
3
4
  Bundler.require(:default, :development)
@@ -92,3 +93,20 @@ end
92
93
  def es_version_supports_gateway_snapshots?
93
94
  $client.semantic_version <= '1.2.0'
94
95
  end
96
+
97
+
98
+ def with_tmp_repo(&block)
99
+ Dir.mktmpdir do |dir|
100
+ @repo.create({:type => 'fs', :settings => {:location => dir}})
101
+ yield @repo
102
+ @repo.delete if @repo.exists?
103
+ end
104
+ end
105
+
106
+ def with_tmp_snapshot(&block)
107
+ with_tmp_repo do
108
+ @snapshot.create
109
+ yield @snapshot
110
+ @snapshot.delete if @snapshot.exists?
111
+ end
112
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastomer-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-18 00:00:00.000000000 Z
12
+ date: 2014-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -150,7 +150,9 @@ files:
150
150
  - lib/elastomer/client/index.rb
151
151
  - lib/elastomer/client/multi_search.rb
152
152
  - lib/elastomer/client/nodes.rb
153
+ - lib/elastomer/client/repository.rb
153
154
  - lib/elastomer/client/scan.rb
155
+ - lib/elastomer/client/snapshot.rb
154
156
  - lib/elastomer/client/template.rb
155
157
  - lib/elastomer/client/warmer.rb
156
158
  - lib/elastomer/core_ext/time.rb
@@ -167,10 +169,13 @@ files:
167
169
  - test/client/bulk_test.rb
168
170
  - test/client/cluster_test.rb
169
171
  - test/client/docs_test.rb
172
+ - test/client/errors_test.rb
170
173
  - test/client/index_test.rb
171
174
  - test/client/multi_search_test.rb
172
175
  - test/client/nodes_test.rb
176
+ - test/client/repository_test.rb
173
177
  - test/client/scan_test.rb
178
+ - test/client/snapshot_test.rb
174
179
  - test/client/stubbed_client_tests.rb
175
180
  - test/client/template_test.rb
176
181
  - test/client/warmer_test.rb
@@ -209,10 +214,13 @@ test_files:
209
214
  - test/client/bulk_test.rb
210
215
  - test/client/cluster_test.rb
211
216
  - test/client/docs_test.rb
217
+ - test/client/errors_test.rb
212
218
  - test/client/index_test.rb
213
219
  - test/client/multi_search_test.rb
214
220
  - test/client/nodes_test.rb
221
+ - test/client/repository_test.rb
215
222
  - test/client/scan_test.rb
223
+ - test/client/snapshot_test.rb
216
224
  - test/client/stubbed_client_tests.rb
217
225
  - test/client/template_test.rb
218
226
  - test/client/warmer_test.rb