es 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,13 +32,13 @@ module ES
32
32
  @connection.request(:post, action_path(path, :update), data)
33
33
  end
34
34
 
35
- def bulk(path, requests)
35
+ def bulk(requests, path = nil)
36
36
  @connection.request(:post, action_path(path, :bulk), requests)
37
37
  end
38
38
 
39
39
  private
40
40
  def action_path(path, action)
41
- "#{path}/_#{action}"
41
+ path ? "#{path}/_#{action}" : "_#{action}"
42
42
  end
43
43
  end
44
44
  end
@@ -1,3 +1,3 @@
1
1
  module ES
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
@@ -48,9 +48,9 @@ describe ES::RawClient do
48
48
 
49
49
  context '.bulk' do
50
50
  it 'sends POST to connection' do
51
- connection.should_receive(:request).with(:post, 'index/_bulk', data).and_return(response)
51
+ connection.should_receive(:request).with(:post, '_bulk', data).and_return(response)
52
52
 
53
- subject.bulk('index', data).should == response
53
+ subject.bulk(data).should == response
54
54
  end
55
55
  end
56
56
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: es
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jan Suchal