elasticsearch-extensions 0.0.16 → 0.0.17

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: b3a84e8764023e5bf5d1ea21d93308eb3bfeafa0
4
- data.tar.gz: 49f72a1364a104f0fbbe8fcf6a4986e4dd88121f
3
+ metadata.gz: d7b7b3061fef7f7c6741547566298952a9d3cd30
4
+ data.tar.gz: c886b9cf1e4d612967124f8fb5bec6fe82c2729a
5
5
  SHA512:
6
- metadata.gz: 7ac3d9463af301fbb315573d56217d6c1973d9f3e53a15544acaccaf51fe50ac3167583c255182e2176ea98fe2e56f3da4e1981f443ea653c144ebbb10c074b5
7
- data.tar.gz: a9834e293e11e73a624978e16ec2a14b7ca540e0e0a04d33e9ac511f991508105cf6cd8e2c39dc6aa93d10a4322a50f749f750d500a6810d8ad05cdc653d886f
6
+ metadata.gz: 907242c0b88d063acd24e1967077b4b2697fd32825630619ae0a1525acb5906fb234ce2b114bf222b4035be08726d2fa51fc9ade9d9f9fbcfb5422d6ff17292d
7
+ data.tar.gz: 44c49a14eea1c7ad742225a2274be9bd8b5302fb6dd338204da9592e947075d21006ff4fdbffca158113c21873f2f6144270a21ecf4c68d803dc23dd97ee2879
@@ -52,7 +52,6 @@ Gem::Specification.new do |s|
52
52
  end
53
53
 
54
54
  # Gems for testing integrations
55
- s.add_development_dependency "backup", '~> 4'
56
55
  s.add_development_dependency "patron"
57
56
  s.add_development_dependency "oj"
58
57
  end
@@ -255,9 +255,13 @@ module Elasticsearch
255
255
  'Nodes: '.ljust(20).ansi(:faint) + health['number_of_nodes'].to_s.ansi(:faint)
256
256
 
257
257
  nodes['nodes'].each do |id, info|
258
- m = id == master ? '+' : '-'
258
+ m = id == master ? '*' : '+'
259
259
  puts ''.ljust(20) +
260
- "#{m} #{info['name'].ansi(:bold)} | version: #{info['version']}, pid: #{info['process']['id']}, address: #{info['http']['bound_address']}".ansi(:faint)
260
+ "#{m} ".ansi(:faint) +
261
+ "#{info['name'].ansi(:bold)} ".ansi(:faint) +
262
+ "| version: #{info['version'] rescue 'N/A'}, ".ansi(:faint) +
263
+ "pid: #{info['process']['id'] rescue 'N/A'}, ".ansi(:faint) +
264
+ "address: #{info['http']['bound_address'] rescue 'N/A'}".ansi(:faint)
261
265
  end
262
266
  end
263
267
 
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Extensions
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
5
5
  end
@@ -1,13 +1,47 @@
1
1
  require 'test_helper'
2
+ require 'logger'
2
3
 
3
- require 'backup'
4
+ # Mock the Backup modules and classes so we're not depending on the gem in the unit test
5
+ #
6
+ module Backup
7
+ class Error < StandardError; end
8
+
9
+ class Logger < ::Logger
10
+ def self.logger
11
+ self.new($stderr)
12
+ end
13
+ end
14
+
15
+ module Config
16
+ module DSL
17
+ end
18
+ end
19
+
20
+ module Database
21
+ class Base
22
+ def initialize(model, database_id = nil)
23
+ end
24
+
25
+ def dump_path; 'dump_path'; end
26
+ def dump_filename; 'dump_filename'; end
27
+
28
+ def log!(*args)
29
+ puts "LOGGING..." if ENV['DEBUG']
30
+ end
31
+
32
+ def perform!
33
+ puts "PERFORMING..." if ENV['DEBUG']
34
+ end
35
+ end
36
+ end
37
+ end
4
38
 
5
39
  require 'elasticsearch/extensions/backup'
6
40
 
7
41
  class Elasticsearch::Extensions::BackupTest < Test::Unit::TestCase
8
42
  context "The Backup gem extension" do
9
43
  setup do
10
- @model = ::Backup::Model.new(:test_trigger, 'test label')
44
+ @model = stub trigger: true
11
45
  @subject = ::Backup::Database::Elasticsearch.new(@model)
12
46
  end
13
47
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karel Minarik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-10 00:00:00.000000000 Z
11
+ date: 2014-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi
@@ -220,20 +220,6 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
- - !ruby/object:Gem::Dependency
224
- name: backup
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: '4'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: '4'
237
223
  - !ruby/object:Gem::Dependency
238
224
  name: patron
239
225
  requirement: !ruby/object:Gem::Requirement