thinking-sphinx-monit 1.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 884effdadddb405bce9d24ece788efc47531302a
4
- data.tar.gz: d41ed4279a601cc0b8af51fcf13b5d661ea7b8e1
3
+ metadata.gz: 300dc2fd9d4e326914bcb2b2afc79ee0965bd4b3
4
+ data.tar.gz: 66197d1062459534c8a169b4f76c743c462a22ca
5
5
  SHA512:
6
- metadata.gz: ed6641f639ed18da81a9ec034bad3b3812794d2111c80abfe0ca2a8f396955a2a2599c37d62a9fa0ff775cef49eb64d67a8339f3cd13c1e5c91df96ce0e62616
7
- data.tar.gz: 6fbdaf8417067c0348b6f2fe789671aab2dce9fa6b344345fa5d90db372818f14d09e52534930dea792fc311576a989ffc2346d977e618af1f5c14ba5bf24e42
6
+ metadata.gz: 50888d55d11726142c0f950f156b916c3786ce944c29a655dae04952d47f359e3810227e4cdf9029fea2062e591cc8822451ae1244ef911d95b380177f2da10c
7
+ data.tar.gz: c4dc3b147b66dae5af424d6594cfa1f6ad46d7a527f2f32620879d94b6ab2de16a021b105392ed3f25b5edd78aa2e1c856112d84f60d32a2ddde30d71984bae1
data/README.md CHANGED
@@ -18,7 +18,12 @@ Add to your capfile following line:
18
18
  # Capfile
19
19
  require 'thinking_sphinx_monit/capistrano'
20
20
  ```
21
- It's also needed to specify thinking sphinx hooks in your deploy.rb, for example like this:
21
+ Before any other action please first deploy your app to server (needed for all stages which you want to use):
22
+ ```ruby
23
+ cap <stage> deploy
24
+ ```
25
+
26
+ Then you can specify thinking sphinx hooks in your deploy.rb, for example like this:
22
27
  ```ruby
23
28
  before 'deploy:updating', 'thinking_sphinx:stop'
24
29
  after 'deploy:published', 'thinking_sphinx:start'
@@ -31,7 +36,7 @@ before 'thinking_sphinx:stop', 'thinking_sphinx_monit:unmonitor'
31
36
  after 'thinking_sphinx:start', 'thinking_sphinx_monit:monitor'
32
37
  ```
33
38
 
34
- Of course you can do everything manually, but remember to do ```cap <stage> deploy``` before any following tasks (just once per stage):
39
+ Of course you can do everything manually:
35
40
  ```ruby
36
41
  cap thinking_sphinx_monit:config # Generates Thinking Sphinx monit-service
37
42
  cap thinking_sphinx_monit:monitor # Monitor Thinking Sphinx monit-service
@@ -12,7 +12,7 @@ namespace :thinking_sphinx_monit do
12
12
  on roles(fetch(:thinking_sphinx_roles)) do |role|
13
13
  within current_path do
14
14
  with rails_env: fetch(:thinking_sphinx_rails_env) do
15
- execute :rake, "ts_monit:config[#{role.user},#{fetch(:thinking_sphinx_use_sudo)},#{fetch(:tmp_dir)},#{fetch(:thinking_sphinx_monit_conf_dir)},#{fetch(:thinking_sphinx_monit_bin)},#{ts_monit_service_name},#{fetch(:rails_env)}]"
15
+ execute :rake, "ts_monit:config[#{role.user},#{fetch(:thinking_sphinx_use_sudo)},#{fetch(:tmp_dir)},#{fetch(:thinking_sphinx_monit_conf_dir)},#{fetch(:thinking_sphinx_monit_bin)},#{ts_monit_service_name}]"
16
16
  end
17
17
  end
18
18
  end
@@ -3,13 +3,12 @@ require 'thinking-sphinx'
3
3
  namespace :ts_monit do
4
4
 
5
5
  desc 'Generates Thinking Sphinx monit-service'
6
- task :config, [:user, :sudo, :tmp_dir, :monit_conf_dir, :monit_bin, :service_name, :env] => [:environment] do |_, args|
6
+ task :config, [:user, :sudo, :tmp_dir, :monit_conf_dir, :monit_bin, :service_name] => [:environment] do |_, args|
7
7
  @searchd = searchd
8
8
  @config_path = config.configuration_file
9
9
  @ts_pid_file = config.searchd.pid_file
10
10
  @user = args.user
11
11
  @service_name = args.service_name
12
- @rails_env = args.env
13
12
  template_sphinx 'ts_monit.conf', "#{args.tmp_dir}/ts_monit.conf"
14
13
  sudo_if_needed args.sudo, "mv #{args.tmp_dir}/ts_monit.conf #{args.monit_conf_dir}"
15
14
  sudo_if_needed args.sudo, "#{args.monit_bin} reload"
@@ -3,5 +3,5 @@
3
3
  #
4
4
  check process <%= @service_name %>
5
5
  with pidfile "<%= @ts_pid_file %>"
6
- start program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %> --environment <%= @rails_env%>'"
7
- stop program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %> --stopwait --environment <%= @rails_env%>'"
6
+ start program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %>'"
7
+ stop program = "/usr/bin/sudo -iu <%= @user %> /bin/bash -c '<%= @searchd %> --pidfile --config <%= @config_path %> --stopwait'"
@@ -1,3 +1,3 @@
1
1
  module ThinkingSphinxMonit
2
- VERSION = '1.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thinking-sphinx-monit
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Mrozek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-01 00:00:00.000000000 Z
11
+ date: 2017-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano