elasticsearch_query 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1abd0e1f72b653412d2ec2ef4f290369791e5a2d
4
- data.tar.gz: 35edb681d3dd0f024b5ea6c5d6c2a14432365a1e
3
+ metadata.gz: 947e124ddb471f70dad5a0caf9f27a1058d6cbb3
4
+ data.tar.gz: de1f1e1c75f0a308cf38a6cb0d71cfc6c3b2e6a0
5
5
  SHA512:
6
- metadata.gz: 4965a348cc695976ba36d96c36c19344037071933fc87b04177198a2465b06e21e2444b47094a282da2fda670d5ecb1074c7bf7274a6527b94d0624f6e3e49a2
7
- data.tar.gz: 0ec0f9e80067bda0b510cdec72ca8b8b954d84189f06375a8e4df66f6f67b206925314dcab54666ebdf199e1ba9c18e9cf2a9ede4ccb3f77ad57a04cd1293be5
6
+ metadata.gz: 0f871f3925301d1c15e5b6af22c7df0735520165b90b531c30b7bcf9eeefd58f272d3a2077c79ae4b4dc08080dff6aabc4b53bf603518d7cef7eeaa0649a2a5f
7
+ data.tar.gz: 38b1243114480c9154afe2271f66197c86337f74db03af1a098d3ea601fa00ccc0f89bce05af3543a42dd4a10aded7e32236b546d80ff5f580cbe32596d30493
@@ -1,5 +1,14 @@
1
1
  sudo: false
2
+ env:
3
+ global:
4
+ - CC_TEST_REPORTER_ID=a444da626f5bb799687a24c22f8d7d5295cb28e88f5447b6ea18d07078324bce
2
5
  language: ruby
3
6
  rvm:
4
7
  - 2.4.3
8
+ before_script:
9
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10
+ - chmod +x ./cc-test-reporter
11
+ - ./cc-test-reporter before-build
5
12
  before_install: gem install bundler -v 1.16.1
13
+ after_script:
14
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in elasticsearch_query.gemspec
6
3
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elasticsearch_query (0.1.0)
4
+ elasticsearch_query (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ElasticsearchQuery
2
2
 
3
+ [![Build Status](https://travis-ci.org/gaorlov/elasticsearch_query.svg?branch=master)](https://travis-ci.org/gaorlov/elasticsearch_query)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/0d9870cdf0ef6e5a659f/test_coverage)](https://codeclimate.com/github/gaorlov/elasticsearch_query/test_coverage)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/0d9870cdf0ef6e5a659f/maintainability)](https://codeclimate.com/github/gaorlov/elasticsearch_query/maintainability)
6
+
3
7
  `ElasticsearchQuery` is a tranformer from [`JSONAPI`](http://jsonapi.org) style params hash into an [`Elasticseatch-ruby`](https://github.com/elastic/elasticsearch-ruby)-compatible object that can easily be fed into `client.search`
4
8
 
5
9
  *Note*: This gem was written for use with a [modified](https://github.com/tiagopog/jsonapi-utils/pull/90) [`JSONAPI::Utils`](https://github.com/tiagopog/jsonapi-utils/) and uses several concepts from it (Paginator interface, param structure), but has no hard dependencies.
@@ -73,7 +77,7 @@ class MyPaginator
73
77
  end
74
78
  ```
75
79
 
76
- What the params look like and how you extract the page size and offset(`from`) are up to you.
80
+ What the params look like and how you extract the page size(`size`) and offset(`from`) are up to you.
77
81
 
78
82
  #### RangeFormatter
79
83
 
@@ -5,10 +5,6 @@ module ElasticsearchQuery
5
5
  @name = name
6
6
  @value = value
7
7
  end
8
-
9
- def to_hash
10
- raise NotImplementedError
11
- end
12
8
  end
13
9
  end
14
10
  end
@@ -1,8 +1,8 @@
1
1
  module ElasticsearchQuery
2
2
  class Query
3
3
  def initialize( params )
4
- if params.respond_to? :with_indifferent_acess
5
- @params = params.with_indifferent_acess
4
+ if params.respond_to? :with_indifferent_access
5
+ @params = params.with_indifferent_access
6
6
  else
7
7
  @params = params
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module ElasticsearchQuery
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Orlov