standup 0.3.6 → 0.3.7

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.
data/README.md CHANGED
@@ -61,7 +61,7 @@ Script params are merged in `node-specific || global || script-defaults` manner.
61
61
  0. Script file `config/standup/<script_name>.rb` will be copied from gem.
62
62
  0. Script's own files, like configs etc. under `config/standup/<script_name>`, if any, will be copied from gem too.
63
63
  0. You can edit them and standup will use them instead of default.
64
- 0. You can delete local script's own files, then default ones will be used.
64
+ 0. You can delete local script file or its own files, then default ones will be used.
65
65
 
66
66
  ## Creating new scripts
67
67
 
@@ -90,8 +90,6 @@ For example, if you want to add `rescue` to your configuration, you need to:
90
90
 
91
91
  - **?** Script sequences: rework default script as script sequence
92
92
 
93
- - ERB processing for script files
94
-
95
93
  ## Copyright
96
94
 
97
95
  Copyright (c) 2010 Ilia Ablamonov, Cloud Castle Inc.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.6
1
+ 0.3.7
@@ -34,6 +34,17 @@ module Standup
34
34
  nil
35
35
  end
36
36
 
37
+ def with_processed_file filename
38
+ Dir.mktmpdir do |dir|
39
+ erb = ERB.new File.read(filename)
40
+ erb.filename = filename
41
+ result = erb.result get_binding
42
+ tmp_filename = File.expand_path File.basename(filename), dir
43
+ File.open(tmp_filename, 'w') {|f| f.write result}
44
+ yield tmp_filename
45
+ end
46
+ end
47
+
37
48
  def self.execute
38
49
  new.run
39
50
  end
@@ -83,6 +94,10 @@ module Standup
83
94
  end
84
95
  result
85
96
  end
97
+
98
+ def get_binding
99
+ binding
100
+ end
86
101
  end
87
102
  end
88
103
  end
@@ -27,7 +27,8 @@ http {
27
27
 
28
28
  client_max_body_size 100m;
29
29
 
30
- passenger_max_pool_size 10;
30
+ passenger_max_pool_size 20;
31
+ passenger_max_instances_per_app 15;
31
32
 
32
33
  include servers/*.conf;
33
34
  }
@@ -1,9 +1,11 @@
1
1
  server {
2
- server_name "";
2
+ server_name _;
3
3
  listen 80;
4
4
 
5
5
  root /opt/webapp/public;
6
6
 
7
+ rails_env <%= params.rails_env %>;
8
+
7
9
  passenger_enabled on;
8
10
  passenger_min_instances 3;
9
11
  }
data/scripts/webapp.rb CHANGED
@@ -24,7 +24,9 @@ Standup.script :node do
24
24
 
25
25
  sudo 'chown -R nobody:nogroup /opt/webapp'
26
26
 
27
- scripts.passenger.add_server_conf script_file('webapp.conf')
27
+ with_processed_file script_file('webapp.conf') do |file|
28
+ scripts.passenger.add_server_conf file
29
+ end
28
30
  end
29
31
 
30
32
  protected
data/standup.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{standup}
8
- s.version = "0.3.6"
8
+ s.version = "0.3.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ilia Ablamonov", "Cloud Castle Inc."]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 7
10
+ version: 0.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilia Ablamonov