openteam-capistrano 1.0.9 → 1.0.10
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: ed7d988cc824f8b61abcad37b463277ad7e02f96
|
4
|
+
data.tar.gz: 15d9c69dc2890eaf73ff0f35f0310ec0357caea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61eeed14190d47db2d847da281b93a3d4942544e114baaa601e38f9a9c07a87ef34c4c2883000dd0bee07231ced7893cabc1644af855d6ede4ea7bd9f7fe803
|
7
|
+
data.tar.gz: ef48c3ec9546560773ce9d39d5438f67aaadbafdd63884b1f468fc90ec248376d923d1a06b7e43234f47191fc599c1f268a5e0fddc97f47a078e563d1f56dd45
|
@@ -11,9 +11,5 @@ if fetch(:stage) && !fetch(:stage).empty?
|
|
11
11
|
require 'openteam/capistrano/tagging'
|
12
12
|
require 'openteam/capistrano/unicorn' if used_unicorn?
|
13
13
|
require 'openteam/capistrano/whenever' if used_whenever?
|
14
|
-
|
15
|
-
require "rsolr"
|
16
|
-
require "openteam/capistrano/sunspot"
|
17
|
-
rescue LoadError
|
18
|
-
end
|
14
|
+
require "openteam/capistrano/sunspot" if used_solr?
|
19
15
|
end
|
@@ -2,5 +2,5 @@ after 'deploy', 'deploy:tagging:create'
|
|
2
2
|
after 'deploy:publishing', 'unicorn:restart'
|
3
3
|
after 'unicorn:restart', 'airbrake:deploy'
|
4
4
|
before 'deploy:cleanup', 'deploy:tagging:clean'
|
5
|
-
after 'sunspot:pull', 'sunspot:reload'
|
6
|
-
after 'sunspot:clear', 'sunspot:reload'
|
5
|
+
after 'sunspot:pull', 'sunspot:reload' if used_solr?
|
6
|
+
after 'sunspot:clear', 'sunspot:reload' if used_solr?
|
@@ -1,43 +1,47 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require 'rsolr'
|
3
|
+
require File.expand_path('../../solr/solr', __FILE__)
|
2
4
|
|
3
|
-
def development_solr_url
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
def development_solr_url
|
6
|
+
@development_solr_url ||= ''.tap do |s|
|
7
|
+
begin
|
8
|
+
s << YAML.load_file('config/settings.yml')['solr']['url']
|
9
|
+
rescue
|
10
|
+
puts 'Can\'t read solr settings'
|
11
|
+
exit
|
12
|
+
end
|
10
13
|
end
|
11
14
|
end
|
12
|
-
end
|
13
15
|
|
14
|
-
def development_core
|
15
|
-
|
16
|
-
end
|
16
|
+
def development_core
|
17
|
+
@development_core ||= development_solr_url.match('(?<=/)\w+\z').to_s
|
18
|
+
end
|
17
19
|
|
18
|
-
namespace :sunspot do
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
namespace :sunspot do
|
21
|
+
desc "Synchronize your local solr using remote solr data"
|
22
|
+
task :pull do
|
23
|
+
puts
|
24
|
+
remote_solr_url = ''
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
on roles(:web) do
|
27
|
+
ruby_expression = "puts YAML.load_file('#{current_path}/config/settings.yml')['solr']['url']"
|
28
|
+
remote_solr_url = capture(:ruby, " -ryaml -e \"#{ruby_expression}\"")
|
29
|
+
end
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
+
Solr::Replicator.new(:remote => remote_solr_url, :local => development_solr_url).replicate
|
32
|
+
end
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
desc 'Reload development core'
|
35
|
+
task :reload do
|
36
|
+
puts
|
37
|
+
Solr.new(development_solr_url).send_reload_core_command(development_core)
|
38
|
+
end
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
desc 'Clear development index'
|
41
|
+
task :clear do
|
42
|
+
puts
|
43
|
+
Solr.new(development_solr_url).send_clear_command(development_core)
|
44
|
+
end
|
42
45
|
end
|
46
|
+
rescue LoadError
|
43
47
|
end
|
data/openteam-capistrano.gemspec
CHANGED
@@ -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 = '1.0.
|
7
|
+
gem.version = '1.0.10'
|
8
8
|
gem.authors = ["OpenTeam developers"]
|
9
9
|
gem.email = ["developers@openteam.ru"]
|
10
10
|
gem.description = %q{OpenTeam common capistrano3 recipe}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openteam-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTeam developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake
|