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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7b7b3061fef7f7c6741547566298952a9d3cd30
|
4
|
+
data.tar.gz: c886b9cf1e4d612967124f8fb5bec6fe82c2729a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 907242c0b88d063acd24e1967077b4b2697fd32825630619ae0a1525acb5906fb234ce2b114bf222b4035be08726d2fa51fc9ade9d9f9fbcfb5422d6ff17292d
|
7
|
+
data.tar.gz: 44c49a14eea1c7ad742225a2274be9bd8b5302fb6dd338204da9592e947075d21006ff4fdbffca158113c21873f2f6144270a21ecf4c68d803dc23dd97ee2879
|
@@ -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}
|
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,13 +1,47 @@
|
|
1
1
|
require 'test_helper'
|
2
|
+
require 'logger'
|
2
3
|
|
3
|
-
|
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 =
|
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.
|
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-
|
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
|