lacquer 0.6.7.pre.alpha → 0.6.7.pre.alpha1

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: 8225278545c3f3578292b862f0326c40393a07ab
4
- data.tar.gz: 7565daf9bb067c70fff1274f7974e00df71d0617
3
+ metadata.gz: f75f379e37e668629da39a75a7503380e18a8455
4
+ data.tar.gz: 5f91642759f72ae04eddbd3b32d5577132c15922
5
5
  SHA512:
6
- metadata.gz: 859335ca9872c1951b198a27177a66dd85a0a15ef2fdfcfb2a0e57092a8567ea58b3eea567c2355120e8c6382a3ae4834fb08296da0580eb42fffa20c5b57bde
7
- data.tar.gz: f8fc23ae649701a0d0f5b702f7e984cc01dea0517d323b548a308df9d974501f0d3c0107a35bbe315bee898cd94bbe83849499925cfe01d428921074852d5fcd
6
+ metadata.gz: 2f82f511c817e4052c601e74ee1a359847ffa0dacec126e09d916c520f0f7351441a59f174ebe2e2ffb2b335e4182ed7e37e5a1bc9b39cf5a942fcf04b6ddcdd
7
+ data.tar.gz: 8e01f43d8722f63302c3fc0091b408b1ca6c81df5e6044c6de6b9f27855633f2c7274c4e030850b0b3c516677a56f9c0eeaf2568b43c953da6ac748596bb0669
@@ -10,7 +10,7 @@ Capistrano::Configuration.instance(:must_exit).load do
10
10
  after "deploy:update", "lacquer:restart"
11
11
 
12
12
  namespace :lacquer do
13
- %w( start stop restart global_purge status ).each do |name|
13
+ %w( start stop restart global_purge status reload ).each do |name|
14
14
  desc "#{name} varnish"
15
15
  task name.to_sym, :roles => lacquer_roles do
16
16
  next if find_servers_for_task(current_task).empty?
@@ -5,7 +5,7 @@ namespace :load do
5
5
  end
6
6
 
7
7
  namespace :lacquer do
8
- %w( start stop restart purge global_purge status ).each do |name|
8
+ %w( start stop restart purge global_purge status reload ).each do |name|
9
9
  desc "#{name} varnish"
10
10
  task name.to_sym do
11
11
  on roles(fetch(:lacquer_roles)) do
data/lib/lacquer/tasks.rb CHANGED
@@ -22,13 +22,11 @@ namespace :lacquer do
22
22
  desc "Restart varnishd daemon using Lacquer's settings"
23
23
  task :restart => :environment do
24
24
  varnishd = Lacquer::Varnishd.new
25
- if varnishd.config_changed?
26
- if varnishd.running?
27
- varnishd.stop
28
- sleep(1)
29
- end
30
- varnishd.start
25
+ if varnishd.running?
26
+ varnishd.stop
27
+ sleep(1)
31
28
  end
29
+ varnishd.start
32
30
  end
33
31
 
34
32
  desc "Reload VCL configuration through varnishadm with Lacquer's settings"
@@ -37,13 +37,9 @@ module Lacquer
37
37
 
38
38
  def generate_vcl
39
39
  if erb_vcl_script_filename.exist?
40
- if config_changed?
41
- log "#{erb_vcl_script_filename} found rendering to #{vcl_script_filename}"
42
- File.open(vcl_script_filename, "w") do |vcl|
43
- vcl.write(render_vcl)
44
- end
45
- else
46
- log "#{erb_vcl_script_filename} has not changed"
40
+ log "#{erb_vcl_script_filename} found rendering to #{vcl_script_filename}"
41
+ File.open(vcl_script_filename, "w") do |vcl|
42
+ vcl.write(render_vcl)
47
43
  end
48
44
  end
49
45
  end
@@ -84,12 +80,6 @@ module Lacquer
84
80
  !!pid && !!execute("ps p #{pid}").include?(pid.to_s) # works with sudo
85
81
  end
86
82
 
87
- def config_changed?
88
- existing_hash = Digest::MD5.hexdigest(File.read(vcl_script_filename))
89
- new_hash = Digest::MD5.hexdigest(render_vcl)
90
- new_hash != existing_hash
91
- end
92
-
93
83
  def args
94
84
  options.map { |k, v| "#{k} #{v}" }.join(" ")
95
85
  end
@@ -1,3 +1,3 @@
1
1
  module Lacquer
2
- VERSION = '0.6.7-alpha'
2
+ VERSION = '0.6.7-alpha1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lacquer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7.pre.alpha
4
+ version: 0.6.7.pre.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russ Smith (russ@bashme.org)