openteam-capistrano 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ class Solr
13
13
  end
14
14
 
15
15
  def replicate
16
- if remote.index_version == local.index_version
16
+ if same_versions?
17
17
  puts 'local and remote index versions are same, no need for replication'
18
18
  else
19
19
  really_replicate
@@ -24,22 +24,21 @@ class Solr
24
24
  def really_replicate
25
25
  print 'wait while solr replicated '
26
26
  local.send_replication_command :fetchindex, :masterUrl => "#{remote.url}/replication"
27
- while replicating?
27
+ while !same_versions?
28
28
  print '.'
29
29
  sleep 0.5
30
30
  end
31
31
  puts ' ok'
32
32
  end
33
33
 
34
- def replicating?
35
- # FIXME: cann't use details command due https://issues.apache.org/jira/browse/SOLR-3131
36
- local.send_replication_command(:filelist, :indexversion => remote.index_version)['status'] == 'invalid indexversion'
37
- end
38
-
39
34
  def print(*args)
40
35
  STDOUT.print *args
41
36
  STDOUT.sync
42
37
  end
38
+
39
+ def same_versions?
40
+ remote.index_version == local.index_version
41
+ end
43
42
  end
44
43
 
45
44
  attr_accessor :url
@@ -49,7 +48,7 @@ class Solr
49
48
  end
50
49
 
51
50
  def index_version
52
- send_replication_command(:details)['details']['indexVersion']
51
+ send_replication_command(:indexversion)['indexversion']
53
52
  end
54
53
 
55
54
  def send_replication_command(command, extra={})
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'openteam-capistrano'
7
- gem.version = '0.0.9'
7
+ gem.version = '0.0.10'
8
8
  gem.authors = ["OpenTeam developers"]
9
9
  gem.email = ["developers@openteam.ru"]
10
10
  gem.description = %q{OpenTeam common capistrano recipe}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openteam-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  segments:
131
131
  - 0
132
- hash: 2643949212493095317
132
+ hash: 3247049610039427968
133
133
  required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  none: false
135
135
  requirements:
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  segments:
140
140
  - 0
141
- hash: 2643949212493095317
141
+ hash: 3247049610039427968
142
142
  requirements: []
143
143
  rubyforge_project:
144
144
  rubygems_version: 1.8.24