rubberband 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +11 -0
- data/Gemfile.lock +24 -0
- data/Rakefile +28 -37
- data/lib/elasticsearch/transport/base.rb +4 -0
- data/lib/elasticsearch/transport/base_protocol.rb +0 -10
- data/lib/elasticsearch/transport/http.rb +10 -0
- data/lib/elasticsearch/transport/thrift.rb +10 -0
- data/lib/elasticsearch/version.rb +10 -0
- data/rubberband.gemspec +15 -3
- metadata +55 -9
- data/VERSION +0 -1
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
git (1.2.5)
|
5
|
+
jeweler (1.5.1)
|
6
|
+
bundler (~> 1.0.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
patron (0.4.10)
|
10
|
+
rake (0.8.7)
|
11
|
+
rcov (0.9.9)
|
12
|
+
shoulda (2.11.3)
|
13
|
+
yajl-ruby (0.7.8)
|
14
|
+
|
15
|
+
PLATFORMS
|
16
|
+
ruby
|
17
|
+
|
18
|
+
DEPENDENCIES
|
19
|
+
bundler (~> 1.0.0)
|
20
|
+
jeweler (~> 1.5.1)
|
21
|
+
patron
|
22
|
+
rcov
|
23
|
+
shoulda
|
24
|
+
yajl-ruby
|
data/Rakefile
CHANGED
@@ -1,57 +1,48 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
2
10
|
require 'rake'
|
3
11
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
|
-
end
|
18
|
-
Jeweler::GemcutterTasks.new
|
19
|
-
rescue LoadError
|
20
|
-
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
12
|
+
require 'jeweler'
|
13
|
+
require './lib/elasticsearch/version'
|
14
|
+
Jeweler::Tasks.new do |gem|
|
15
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
16
|
+
gem.name = "rubberband"
|
17
|
+
gem.version = ElasticSearch::Version::STRING
|
18
|
+
gem.homepage = "http://github.com/grantr/rubberband"
|
19
|
+
gem.license = "Apache v2.0"
|
20
|
+
gem.summary = %Q{An ElasticSearch client.}
|
21
|
+
gem.description = %Q{An ElasticSearch client with ThriftClient-like failover handling.}
|
22
|
+
gem.email = "grantr@gmail.com"
|
23
|
+
gem.authors = ["grantr"]
|
21
24
|
end
|
25
|
+
Jeweler::RubygemsDotOrgTasks.new
|
22
26
|
|
23
27
|
require 'rake/testtask'
|
24
28
|
Rake::TestTask.new(:test) do |test|
|
25
29
|
test.libs << 'lib' << 'test'
|
26
|
-
test.pattern = 'test
|
30
|
+
test.pattern = 'test/**/test_*.rb'
|
27
31
|
test.verbose = true
|
28
32
|
end
|
29
33
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
test.verbose = true
|
36
|
-
end
|
37
|
-
rescue LoadError
|
38
|
-
task :rcov do
|
39
|
-
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
40
|
-
end
|
34
|
+
require 'rcov/rcovtask'
|
35
|
+
Rcov::RcovTask.new do |test|
|
36
|
+
test.libs << 'test'
|
37
|
+
test.pattern = 'test/**/test_*.rb'
|
38
|
+
test.verbose = true
|
41
39
|
end
|
42
40
|
|
43
|
-
task :test => :check_dependencies
|
44
|
-
|
45
41
|
task :default => :test
|
46
42
|
|
47
43
|
require 'rake/rdoctask'
|
48
44
|
Rake::RDocTask.new do |rdoc|
|
49
|
-
|
50
|
-
version = File.read('VERSION')
|
51
|
-
else
|
52
|
-
version = ""
|
53
|
-
end
|
54
|
-
|
45
|
+
version = ElasticSearch::Version::STRING
|
55
46
|
rdoc.rdoc_dir = 'rdoc'
|
56
47
|
rdoc.title = "rubberband #{version}"
|
57
48
|
rdoc.rdoc_files.include('README*')
|
@@ -220,16 +220,6 @@ module ElasticSearch
|
|
220
220
|
include ClusterAdminProtocol
|
221
221
|
include ProtocolHelpers
|
222
222
|
|
223
|
-
def all_nodes
|
224
|
-
http_addresses = nodes_info([])["nodes"].collect { |id, node| node["http_address"] }
|
225
|
-
http_addresses.collect! do |a|
|
226
|
-
if a =~ /inet\[.*\/([\d.:]+)\]/
|
227
|
-
$1
|
228
|
-
end
|
229
|
-
end.compact!
|
230
|
-
http_addresses
|
231
|
-
end
|
232
|
-
|
233
223
|
end
|
234
224
|
end
|
235
225
|
end
|
@@ -21,6 +21,16 @@ module ElasticSearch
|
|
21
21
|
@session.headers['User-Agent'] = 'ElasticSearch.rb v0.1'
|
22
22
|
end
|
23
23
|
|
24
|
+
def all_nodes
|
25
|
+
http_addresses = nodes_info([])["nodes"].collect { |id, node| node["http_address"] }
|
26
|
+
http_addresses.collect! do |a|
|
27
|
+
if a =~ /inet\[.*\/([\d.:]+)\]/
|
28
|
+
$1
|
29
|
+
end
|
30
|
+
end.compact!
|
31
|
+
http_addresses
|
32
|
+
end
|
33
|
+
|
24
34
|
private
|
25
35
|
|
26
36
|
def request(method, operation, params={}, body=nil, headers={})
|
@@ -42,6 +42,16 @@ module ElasticSearch
|
|
42
42
|
@transport.close rescue nil
|
43
43
|
end
|
44
44
|
|
45
|
+
def all_nodes
|
46
|
+
thrift_addresses = nodes_info([])["nodes"].collect { |id, node| node["thrift_address"] }
|
47
|
+
thrift_addresses.collect! do |a|
|
48
|
+
if a =~ /.*\/([\d.:]+)/
|
49
|
+
$1
|
50
|
+
end
|
51
|
+
end.compact!
|
52
|
+
thrift_addresses
|
53
|
+
end
|
54
|
+
|
45
55
|
private
|
46
56
|
|
47
57
|
def parse_server(server)
|
data/rubberband.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rubberband}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["grantr"]
|
12
12
|
s.date = %q{2010-12-06}
|
13
|
-
s.description = %q{An ElasticSearch
|
13
|
+
s.description = %q{An ElasticSearch client with ThriftClient-like failover handling.}
|
14
14
|
s.email = %q{grantr@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
@@ -18,11 +18,12 @@ Gem::Specification.new do |s|
|
|
18
18
|
"TODO"
|
19
19
|
]
|
20
20
|
s.files = [
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
21
23
|
"LICENSE",
|
22
24
|
"README.rdoc",
|
23
25
|
"Rakefile",
|
24
26
|
"TODO",
|
25
|
-
"VERSION",
|
26
27
|
"lib/elasticsearch.rb",
|
27
28
|
"lib/elasticsearch/client.rb",
|
28
29
|
"lib/elasticsearch/client/abstract_client.rb",
|
@@ -44,6 +45,7 @@ Gem::Specification.new do |s|
|
|
44
45
|
"lib/elasticsearch/transport/thrift/elasticsearch_constants.rb",
|
45
46
|
"lib/elasticsearch/transport/thrift/elasticsearch_types.rb",
|
46
47
|
"lib/elasticsearch/transport/thrift/rest.rb",
|
48
|
+
"lib/elasticsearch/version.rb",
|
47
49
|
"lib/rubberband.rb",
|
48
50
|
"rubberband.gemspec",
|
49
51
|
"test/elasticsearch_test.rb",
|
@@ -52,6 +54,7 @@ Gem::Specification.new do |s|
|
|
52
54
|
"vendor/elasticsearch/elasticsearch.thrift"
|
53
55
|
]
|
54
56
|
s.homepage = %q{http://github.com/grantr/rubberband}
|
57
|
+
s.licenses = ["Apache v2.0"]
|
55
58
|
s.require_paths = ["lib"]
|
56
59
|
s.rubygems_version = %q{1.3.7}
|
57
60
|
s.summary = %q{An ElasticSearch client.}
|
@@ -69,15 +72,24 @@ Gem::Specification.new do |s|
|
|
69
72
|
s.add_runtime_dependency(%q<patron>, [">= 0"])
|
70
73
|
s.add_runtime_dependency(%q<yajl-ruby>, [">= 0"])
|
71
74
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
75
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
76
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
|
77
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
72
78
|
else
|
73
79
|
s.add_dependency(%q<patron>, [">= 0"])
|
74
80
|
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
75
81
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
82
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
83
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
84
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
76
85
|
end
|
77
86
|
else
|
78
87
|
s.add_dependency(%q<patron>, [">= 0"])
|
79
88
|
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
80
89
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
90
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
91
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
92
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
81
93
|
end
|
82
94
|
end
|
83
95
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- grantr
|
@@ -19,7 +19,6 @@ default_executable:
|
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: patron
|
22
|
-
prerelease: false
|
23
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
@@ -29,10 +28,10 @@ dependencies:
|
|
29
28
|
- 0
|
30
29
|
version: "0"
|
31
30
|
type: :runtime
|
31
|
+
prerelease: false
|
32
32
|
version_requirements: *id001
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: yajl-ruby
|
35
|
-
prerelease: false
|
36
35
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
36
|
none: false
|
38
37
|
requirements:
|
@@ -42,10 +41,10 @@ dependencies:
|
|
42
41
|
- 0
|
43
42
|
version: "0"
|
44
43
|
type: :runtime
|
44
|
+
prerelease: false
|
45
45
|
version_requirements: *id002
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: shoulda
|
48
|
-
prerelease: false
|
49
48
|
requirement: &id003 !ruby/object:Gem::Requirement
|
50
49
|
none: false
|
51
50
|
requirements:
|
@@ -55,8 +54,52 @@ dependencies:
|
|
55
54
|
- 0
|
56
55
|
version: "0"
|
57
56
|
type: :development
|
57
|
+
prerelease: false
|
58
58
|
version_requirements: *id003
|
59
|
-
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: bundler
|
61
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ~>
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
segments:
|
67
|
+
- 1
|
68
|
+
- 0
|
69
|
+
- 0
|
70
|
+
version: 1.0.0
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: *id004
|
74
|
+
- !ruby/object:Gem::Dependency
|
75
|
+
name: jeweler
|
76
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ~>
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
segments:
|
82
|
+
- 1
|
83
|
+
- 5
|
84
|
+
- 1
|
85
|
+
version: 1.5.1
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: *id005
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rcov
|
91
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
version: "0"
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *id006
|
102
|
+
description: An ElasticSearch client with ThriftClient-like failover handling.
|
60
103
|
email: grantr@gmail.com
|
61
104
|
executables: []
|
62
105
|
|
@@ -67,11 +110,12 @@ extra_rdoc_files:
|
|
67
110
|
- README.rdoc
|
68
111
|
- TODO
|
69
112
|
files:
|
113
|
+
- Gemfile
|
114
|
+
- Gemfile.lock
|
70
115
|
- LICENSE
|
71
116
|
- README.rdoc
|
72
117
|
- Rakefile
|
73
118
|
- TODO
|
74
|
-
- VERSION
|
75
119
|
- lib/elasticsearch.rb
|
76
120
|
- lib/elasticsearch/client.rb
|
77
121
|
- lib/elasticsearch/client/abstract_client.rb
|
@@ -93,6 +137,7 @@ files:
|
|
93
137
|
- lib/elasticsearch/transport/thrift/elasticsearch_constants.rb
|
94
138
|
- lib/elasticsearch/transport/thrift/elasticsearch_types.rb
|
95
139
|
- lib/elasticsearch/transport/thrift/rest.rb
|
140
|
+
- lib/elasticsearch/version.rb
|
96
141
|
- lib/rubberband.rb
|
97
142
|
- rubberband.gemspec
|
98
143
|
- test/elasticsearch_test.rb
|
@@ -101,8 +146,8 @@ files:
|
|
101
146
|
- vendor/elasticsearch/elasticsearch.thrift
|
102
147
|
has_rdoc: true
|
103
148
|
homepage: http://github.com/grantr/rubberband
|
104
|
-
licenses:
|
105
|
-
|
149
|
+
licenses:
|
150
|
+
- Apache v2.0
|
106
151
|
post_install_message:
|
107
152
|
rdoc_options: []
|
108
153
|
|
@@ -113,6 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
158
|
requirements:
|
114
159
|
- - ">="
|
115
160
|
- !ruby/object:Gem::Version
|
161
|
+
hash: -2243995552158926682
|
116
162
|
segments:
|
117
163
|
- 0
|
118
164
|
version: "0"
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.4
|