stretcher 1.20.0.beta1 → 1.20.0.beta2

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: 1b5b15a976457a848c084d824c8cb40274ff0ee4
4
- data.tar.gz: 9493a22fb07da4788c7a011a7f6bacbc4f7d8a57
3
+ metadata.gz: 81f2f9ec0ad54ee0611402adab9de910c69c7add
4
+ data.tar.gz: dd0776a032dc17bce10cb15d44a66435f19f6ee1
5
5
  SHA512:
6
- metadata.gz: e31a69397b930852118068f572bed8f5dfdada0e0b9a8f41b5bbd246f593a350b4b92585ac293d86c3933b09be784922b7491b9f0d4c72fd01c4442cc39b7bd3
7
- data.tar.gz: 373a51fd9cbf6859f6925007b2c313f5ae099755dd91edd5f38a17c78542893bdd0f96a5ce57d63b66de67fea2c253a8f0b663b19295d5daa8f9a96940306ee8
6
+ metadata.gz: 2173de91fa8f0e1322aa6a0e5b7718b6cbd6005dd237250967773f567ba2cb841626fb8b5251dc1d25034ee7163e22fc309ea07762455673b5625d7e9110a322
7
+ data.tar.gz: 2c69f1f1f583985b4b7bb1c7c36664ceb5937c2ea5656bbaf6a5a34c22f2aa0c3e9e786f84c992f98bc77364beee865effa24452f65d1ac3700599d760335870
@@ -1,4 +1,3 @@
1
- require 'hashie/dash'
2
1
  module Stretcher
3
2
  # Conveniently represents elastic search results in a more compact fashion
4
3
  #
@@ -35,7 +34,7 @@ module Stretcher
35
34
  # DEPRECATED!
36
35
  # Call #documents instead!
37
36
  def results
38
- pretty
37
+ documents
39
38
  end
40
39
 
41
40
  # Returns a 'prettier' version of elasticsearch results
@@ -45,7 +44,7 @@ module Stretcher
45
44
  # 2. Merge any keys beginning with a '_' into it as well (such as '_score')
46
45
  # 3. Copy the 'highlight' field into '_highlight'
47
46
  #
48
- def pretty
47
+ def documents
49
48
  # This function and its helpers are side-effecty for speed
50
49
  @documents ||= raw[:hits][:hits].map do |hit|
51
50
  doc = extract_source(hit)
@@ -1,3 +1,3 @@
1
1
  module Stretcher
2
- VERSION = "1.20.0.beta1"
2
+ VERSION = "1.20.0.beta2"
3
3
  end
@@ -45,8 +45,8 @@ describe Stretcher::IndexType do
45
45
 
46
46
  it "should add _highlight field to resulting documents when present" do
47
47
  res = type.search(:query => {:match => {:message => 'hello'}}, :highlight => {:fields => {:message => {}}})
48
- res.pretty.first.message.should == @doc[:message]
49
- res.pretty.first.should have_key '_highlight'
48
+ res.documents.first.message.should == @doc[:message]
49
+ res.documents.first.should have_key '_highlight'
50
50
  end
51
51
  end
52
52
 
@@ -18,7 +18,7 @@ describe Stretcher::SearchResults do
18
18
 
19
19
  context 'merges in select keys' do
20
20
  subject(:search_result) {
21
- Stretcher::SearchResults.new(result).pretty.first
21
+ Stretcher::SearchResults.new(result).documents.first
22
22
  }
23
23
 
24
24
  its(:_score) { should == 255 }
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.beta1
4
+ version: 1.20.0.beta2
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-18 00:00:00.000000000 Z
11
+ date: 2013-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday