stretcher 1.20.0.beta3 → 1.20.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6fe7e6ae86720732abdf939c6632e6c025244ae0
4
- data.tar.gz: 715e7729054c64b798914cb05a3d1364af9dfc23
3
+ metadata.gz: 866e50cd52c34cc61b4af0a1e7b9e598bdc14a14
4
+ data.tar.gz: 3e9d14317d08c4ce1d58a8793c7bff8f3cbe337b
5
5
  SHA512:
6
- metadata.gz: a89263f5d9a591a5b798b04333726b5c8af8174ff3a5f68ea155fe4c881d3b1f01a8fddc91ec0dfa8eac295e1461b6a41cb0b1a4d80a60f1a3969761a6aaf992
7
- data.tar.gz: 0a40d4f3f45ab830efe603fd50145ad4439222fe91452060b93eee3fe222fced761df86a5f2743e09540c8091ce65f2c4ec4ca71ee59c4e4e791079ea870b10e
6
+ metadata.gz: 6365cf04ab6d1a1228fa59080e5b3d56734a829331a127d8e579e4af95e1c6b16ad199ce75dafa436f00cdd769836128fcc490ef650f4dcf450f98e41415ec7e
7
+ data.tar.gz: 07c06966381c542a6ddbffc81420f796fd8da8327b79b1ee4cb2cbaf84f3d708d2fce8ab55fd8dc2a68b6b5aa3865dce64d19512ca4cb6d4dcb3f675a60a7d9a
data/README.md CHANGED
@@ -66,11 +66,12 @@ server.index(:foo).type(:tweet).get(3)
66
66
  # => #<Hashie::Mash text="Hello 3">
67
67
  # Perform a search (Returns a Stretcher::SearchResults instance)
68
68
  res = server.index(:foo).search(size: 12, query: {match_all: {}})
69
- res.class # Stretcher::SearchResults
70
- res.total # => 30
69
+ res.class # Stretcher::SearchResults
70
+ res.total # => 30
71
71
  res.documents # => [#<Hashie::Mash _id="4" text="Hello 4">, ...]
72
- res.facets # => nil
73
- res.raw # => #<Hashie::Mash ...> Raw JSON from the search
72
+ res.facets # => nil
73
+ res.raw # => #<Hashie::Mash ...> Raw JSON from the search
74
+ res.raw_plain # => #<Hash ...> Non-Hashie Raw JSON from the search (fastest)
74
75
  # use an alias
75
76
  alias = server.index(:foo).alias(:my_alias)
76
77
  alias.create({ filter: { term: { user_id: 1 } } })
@@ -8,7 +8,7 @@ module Stretcher
8
8
  method = req.method.to_s.upcase
9
9
  url = Util.qurl(req.path,req.params)
10
10
 
11
- ["curl -X#{method}", url, body, headers].compact.join(' ')
11
+ ["curl -X#{method}", "'" + url + "'", body, headers].compact.join(' ')
12
12
  end
13
13
 
14
14
  # Formats a url + query opts
@@ -1,3 +1,3 @@
1
1
  module Stretcher
2
- VERSION = "1.20.0.beta3"
2
+ VERSION = "1.20.0"
3
3
  end
@@ -41,7 +41,7 @@ describe Stretcher::Index do
41
41
  options = { :mappings => { :movie => { :properties => { :category => { :type => 'string' } } } } }
42
42
 
43
43
  server.logger.should_receive(:debug) do |&block|
44
- block.call.should == %{curl -XPUT http://localhost:9200/foo -d '#{MultiJson.dump(options)}' '-H Accept: application/json' '-H Content-Type: application/json' '-H User-Agent: Stretcher Ruby Gem #{Stretcher::VERSION}'}
44
+ block.call.should == %{curl -XPUT 'http://localhost:9200/foo' -d '#{MultiJson.dump(options)}' '-H Accept: application/json' '-H Content-Type: application/json' '-H User-Agent: Stretcher Ruby Gem #{Stretcher::VERSION}'}
45
45
  end
46
46
 
47
47
  index.create(options)
@@ -87,7 +87,7 @@ describe Stretcher::Server do
87
87
 
88
88
  it 'logs requests correctly' do
89
89
  server.logger.should_receive(:debug) do |&block|
90
- block.call.should == %{curl -XGET http://localhost:9200/_analyze?analyzer=snowball -d 'Candles' '-H Accept: application/json' '-H Content-Type: application/json' '-H User-Agent: Stretcher Ruby Gem #{Stretcher::VERSION}'}
90
+ block.call.should == %{curl -XGET 'http://localhost:9200/_analyze?analyzer=snowball' -d 'Candles' '-H Accept: application/json' '-H Content-Type: application/json' '-H User-Agent: Stretcher Ruby Gem #{Stretcher::VERSION}'}
91
91
  end
92
92
  server.analyze("Candles", :analyzer => :snowball)
93
93
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stretcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0.beta3
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Cholakian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-20 00:00:00.000000000 Z
11
+ date: 2013-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -213,9 +213,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
213
213
  version: '0'
214
214
  required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  requirements:
216
- - - '>'
216
+ - - '>='
217
217
  - !ruby/object:Gem::Version
218
- version: 1.3.1
218
+ version: '0'
219
219
  requirements: []
220
220
  rubyforge_project:
221
221
  rubygems_version: 2.0.2