negroku 2.3.4 → 2.3.5

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: 49df8e7185364d3baa0e9cf231fd651cbd33d327
4
- data.tar.gz: dff869ebbc0b4916a9cd6d2d15265008724ae45f
3
+ metadata.gz: 14d53aec7f354efc4a17bad4e9486214fc4ff710
4
+ data.tar.gz: b6c15222c644ad3c8238b55c71ea155277cbb07a
5
5
  SHA512:
6
- metadata.gz: f058feb0b26a8efa29d1ec5fce42f4cdda51efc0af302e774c68becc7846d2c870670fd419dab2b3b2037739a687ffa8710d55cc9ba30efa1f8433e1aa79f77a
7
- data.tar.gz: c2a829026912082bf193ae5ba15af6f7c56f4c20ea61be311c8acaa2d00b1bdb0b46e22d0329972c99c1788004756692bcd5039abdba17f0599935dfbea02bdd
6
+ metadata.gz: d350d87e50c3c4063f1aeb33701addfcb61375a1132ade613ad41f5648d4cf58aeff32352ecc932cc9cb74a4c665eaea3f4eef4dac181091ca02ea0651e2345a
7
+ data.tar.gz: 1b8c3cd3b982dbcae2e5e72a07c2f607744c44792d3341ef75db350674ea57ad420964c7e717a84f12a15c0efe3bfd1d80d32f338e3c4e422cdea76961072883
@@ -20,7 +20,7 @@ namespace :thinking_sphinx do
20
20
  # Reload or restart after the application is published
21
21
  desc "using eye"
22
22
  task cmd do
23
- invoke "eye:#{cmd}", 'thinking_sphinx'
23
+ invoke "eye:#{cmd}", 'sphinx'
24
24
  end
25
25
  end
26
26
  end
@@ -13,7 +13,11 @@ namespace :log do
13
13
  task name, :lines do |t, args|
14
14
  on release_roles [:app, :web] do
15
15
  within current_path do
16
+ old_state = `stty -g`
17
+ system "stty -echoctl"
18
+
16
19
  args.with_defaults(:lines => 10)
20
+ trap("INT") { puts 'Bye!'; system "stty #{old_state}"; exit 0; }
17
21
  execute :tail, '-f', Pathname.new(shared_path).join("log", path), "-n", args[:lines]
18
22
  end
19
23
  end
@@ -10,7 +10,7 @@ namespace :load do
10
10
  # Local path to look for custom config template
11
11
  set :thinking_sphinx_template, -> { "config/deploy/#{fetch(:stage)}/thinking_sphinx.yml.erb" }
12
12
 
13
- set :thinking_sphinx_env, -> { "#{fetch(:stage)}" }
13
+ set :thinking_sphinx_env, -> { fetch(:rails_env) || fetch(:stage) }
14
14
 
15
15
  # Link thinking_sphinx.yml file
16
16
  set :linked_files, fetch(:linked_files, []) << 'config/thinking_sphinx.yml'
@@ -48,16 +48,16 @@ namespace :negroku do
48
48
  end
49
49
  end
50
50
 
51
- after 'thinking_sphinx:configure', :backup_config do
51
+ # Backup the config
52
+ task :backup_config do
52
53
  on release_roles fetch(:thinking_sphinx_roles) do
53
54
  within "#{shared_path}/config" do
54
55
  execute :cp, fetch(:thinking_sphinx_configuration_file), '/tmp/sphinx.conf.bak'
55
56
  end
56
57
  end
57
58
  end
58
- # Backup the config on every configure
59
- # Rake::Task['thinking_sphinx:configure'].enhance ['negroku:thinking_sphinx:backup_config']
60
59
 
60
+ # Check whether the conf changed
61
61
  task :check_config do
62
62
  on release_roles fetch(:thinking_sphinx_roles) do
63
63
  within "#{shared_path}/config" do
@@ -67,18 +67,33 @@ namespace :negroku do
67
67
  end
68
68
  end
69
69
 
70
+ # Backup the config on every configure
71
+ Rake::Task['thinking_sphinx:configure'].enhance ['negroku:thinking_sphinx:backup_config'] do
72
+ # Change whether the config changed or not
73
+ Rake::Task['negroku:thinking_sphinx:check_config'].invoke
74
+ end
75
+
76
+ task :rebuild do
77
+ on release_roles fetch(:thinking_sphinx_roles) do
78
+ within current_path do
79
+ with rails_env: fetch(:rails_env), index_only: true do
80
+ invoke 'thinking_sphinx:stop'
81
+ sleep 2
82
+ execute :rake, 'ts:clear'
83
+ execute :rake, 'ts:index'
84
+ invoke 'thinking_sphinx:start'
85
+ end
86
+ end
87
+ end
88
+ end
70
89
 
71
90
  # Configure and regenerate after the application is published
72
91
  after 'deploy:published', 'restart' do
73
92
  invoke 'negroku:thinking_sphinx:setup'
74
93
  invoke 'thinking_sphinx:configure'
75
94
 
76
- # Change whether the config changed or not
77
- invoke 'negroku:thinking_sphinx:check_config'
78
-
79
- if fetch(:thinking_sphinx_config_changed)
80
- invoke 'thinking_sphinx:regenerate'
81
- end
95
+ # Rebuild the index
96
+ invoke 'negroku:thinking_sphinx:rebuild' if fetch(:thinking_sphinx_config_changed)
82
97
  end
83
98
 
84
99
  define_logs(:sphinx, {
@@ -1,3 +1,3 @@
1
1
  module Negroku
2
- VERSION = '2.3.4'
2
+ VERSION = '2.3.5'
3
3
  end
data/negroku.gemspec CHANGED
@@ -28,7 +28,7 @@ spec = Gem::Specification.new do |s|
28
28
  s.add_runtime_dependency('capistrano-nc', '~> 0.1.4')
29
29
  s.add_runtime_dependency('capistrano-github', '~> 0.1.1')
30
30
 
31
- s.add_runtime_dependency('capistrano-nodenv', '~> 1.0.0')
31
+ s.add_runtime_dependency('capistrano-nodenv', '~> 1.0.1')
32
32
  s.add_runtime_dependency('capistrano-bower', '~> 1.1.0')
33
33
  s.add_runtime_dependency('capistrano3-nginx', '~> 2.1.1')
34
34
  s.add_runtime_dependency('capistrano3-unicorn', '~> 0.2.1')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: negroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ignacio Donoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-14 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - ~>
172
172
  - !ruby/object:Gem::Version
173
- version: 1.0.0
173
+ version: 1.0.1
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ~>
179
179
  - !ruby/object:Gem::Version
180
- version: 1.0.0
180
+ version: 1.0.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: capistrano-bower
183
183
  requirement: !ruby/object:Gem::Requirement