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: 8f2a5bc8fcc78f4534338aae6e4d6ec39d49d8de
4
- data.tar.gz: 3324d64096b0068d588fd1bfbfd1277e14c7b3b2
3
+ metadata.gz: ed7d988cc824f8b61abcad37b463277ad7e02f96
4
+ data.tar.gz: 15d9c69dc2890eaf73ff0f35f0310ec0357caea2
5
5
  SHA512:
6
- metadata.gz: c072758652ae7d8d1a37197b1bd3a8fb6098440a22388e344692566982b07921e2511e19b4f71ef5680fc6da0dd2d75c0e9b118235cdb15607e3d30510cd19d7
7
- data.tar.gz: 82fb51d32ef90f82310546b8059d981f5be9c4c8ecbd8009b9010b5e1a901d06a955ab5099f5d9a8d6a97fe562036863dc3722e8d489e0a2aa14e6cb13402e84
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
- begin
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
- require File.expand_path('../../solr/solr', __FILE__)
1
+ begin
2
+ require 'rsolr'
3
+ require File.expand_path('../../solr/solr', __FILE__)
2
4
 
3
- def development_solr_url
4
- @development_solr_url ||= ''.tap do |s|
5
- begin
6
- s << YAML.load_file('config/settings.yml')['solr']['url']
7
- rescue
8
- puts 'Can\'t read solr settings'
9
- exit
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
- @development_core ||= development_solr_url.match('(?<=/)\w+\z').to_s
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
- desc "Synchronize your local solr using remote solr data"
20
- task :pull do
21
- puts
22
- remote_solr_url = ''
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
- on roles(:web) do
25
- ruby_expression = "puts YAML.load_file('#{current_path}/config/settings.yml')['solr']['url']"
26
- remote_solr_url = capture(:ruby, " -ryaml -e \"#{ruby_expression}\"")
27
- end
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
- Solr::Replicator.new(:remote => remote_solr_url, :local => development_solr_url).replicate
30
- end
31
+ Solr::Replicator.new(:remote => remote_solr_url, :local => development_solr_url).replicate
32
+ end
31
33
 
32
- desc 'Reload development core'
33
- task :reload do
34
- puts
35
- Solr.new(development_solr_url).send_reload_core_command(development_core)
36
- end
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
- desc 'Clear development index'
39
- task :clear do
40
- puts
41
- Solr.new(development_solr_url).send_clear_command(development_core)
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
@@ -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.9'
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.9
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-05-28 00:00:00.000000000 Z
11
+ date: 2014-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake