blocktrain 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWVjZWUzM2IyOGEzYjlmNDlkMTk4NTYxYzA4NjNhY2FiNWJjN2ZmZA==
4
+ Mjk0NmViMDIyNmRhOGQ5NGEzZDlhNDY0NDZiYTYzNTVhYTVkYjk0NA==
5
5
  data.tar.gz: !binary |-
6
- NmVjNmQ3YWJiYzM4Y2QzNGZlNzQ3OTEzNWRiM2U5M2QzYWMxODMyZA==
6
+ NzEyZGU3YzZlNDdhZTkxMWVjZDQxYzMwYWViYjZiNmEyMWRiZTk2MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Njk5NDk5ZDExNmU5NDE2NGY3MjY0MWE4NjFlYTI3NjRhOGRmZGUzMmIzODc0
10
- ZTJlZGFmNDIyOWRjOTEzOTk0ZGEyNjhiZDMyMTU1ZGRlMTYxZjI4NDUwOTgw
11
- NDM2NDBlZjY2NDYxYjdlNTljMTZkZmVjNTVmNTdlM2ViNTI4ODQ=
9
+ ZmE2NjBhNmFiYTc2NGNlZDcwNDhhMmExMWRiMDZiZDAxMTkxMzY5NjhhNWM0
10
+ NWNjNGZlNzI5N2EwZDg1YmIzM2I5NGY0OWU1YzY3YTkyMDQyM2FkYzE1NTI2
11
+ YjUzMzQyYzZmNjFiYjM1ZDExNmFiZDM5Nzc2YmM4Mzc3OTkyZTk=
12
12
  data.tar.gz: !binary |-
13
- YmEyZjAxYmM1YTkwYzU3NjUyZjRkODNhZjExMTI2MzM4YWViMWIxNzZhZTlm
14
- YTY2OTA5Y2QyZWYyYWJhZmVjNjI1NDhmYzJkNDA2MzdjYjY4NzJmNzI4ZGY3
15
- Y2Y4ZjBhZWYzMTI4M2ExYTg2MjEwYTdlNDRlMTkzZWU1NjA5MWE=
13
+ NTA5NzQ2N2FmY2Y1OWM1MTVmMDZiY2RkNTNhMWM3M2EyOTZjNzcyMDJjNjdl
14
+ ZGQ0MjViYjJkMGYwOGVhMTY0NDZmNDMxMmU2YTE0NTU3ZjdmNzZmYTc4NTZk
15
+ NjUzMDBmNGQ2Zjc1ZmJlYmQwYTE3MjI3YjYzOTFlNTlhMGJhMDc=
@@ -6,6 +6,7 @@ before_install: gem install bundler -v 1.10.6
6
6
  env:
7
7
  global:
8
8
  - secure: Gdx71duOJjyOa/ejO5FXP6n66Fb7dC4Rzwc/tUAB3rbF9YNsN/uWzW9tr1yjRkk4WAPP3mxR4hmRkStkgABhDMU4Q/NVcJ64klVf6JUeYYwheUz/gpfkn4wQdo2Q9O8KVPZ/WocIMWCMk+l2FnusIljxdx6Fu0yitQUJGrry3VX1liU5xKcBlpZZsb2gcy77+ikXwT3y32uZEWZe+ThfHBryNXTdqxkpMSLfgU+y0j6KCTmH8ce402UBbNXtqj56O2StRzuKf/N5XHqOMJ45iZkG39V1AVL63HbLfE8vg/KrzlWX9pf60EXZUAG2il4NSRFqdGTv2aV/PoxHzKgZzwuL6eoco3vopqauYmczHAzVDCWD8rTBABGBQk5O9nN55WXKl2C+/H7LwSLBkgCAEE2UkUcUSe12DZ9eSzilQXCpAs7owoxeBXLbAGIB5jBYoIdpbOL0KJel+4zGdjvfIgT2tUD4jd/NwoZIPl4Wy8cGbrMhbPCqJ0dr9uvmGS74z6YCaa6fmKlZTgpsyAM2JAbhvRT2tBh964RdIQdTVpE8ug+arGCbfjTRBxAMlA26qSyP5fpkQLGHDuVtsx39qr6PVEjWUjqHMHZcHsS743RbTkgO9aXEtPsM2/HWotHy+G2QtSqi5k7cudBFldr8dDJFObOY9vWifTR9j5rIpt4=
9
+ - ES_INDEX=train_data
9
10
  deploy:
10
11
  provider: rubygems
11
12
  api_key:
@@ -2,11 +2,23 @@ module Blocktrain
2
2
  class Client
3
3
 
4
4
  def self.results query
5
- r = Curl::Easy.http_post("#{ENV['ES_URL']}/train_data/_search", query.to_json) do |c|
5
+ r = Curl::Easy.http_post(endpoint, query.to_json) do |c|
6
6
  c.ssl_verify_peer = false
7
7
  end
8
8
 
9
9
  JSON.parse r.body_str
10
10
  end
11
+
12
+ def self.endpoint
13
+ "#{url}/#{index}/_search"
14
+ end
15
+
16
+ def self.url
17
+ ENV['ES_URL']
18
+ end
19
+
20
+ def self.index
21
+ ENV['ES_INDEX'] || 'train_data'
22
+ end
11
23
  end
12
24
  end
@@ -1,3 +1,3 @@
1
1
  module Blocktrain
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blocktrain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-11-17 00:00:00.000000000 Z
12
+ date: 2015-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dotenv