capitate 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.3.4 2008-05-05
2
+
3
+ * Removed upload plugin (obsolete)
4
+ * Fixing nginx host recipe
5
+
1
6
  == 0.3.3 2008-04-29
2
7
 
3
8
  * Adding merb init script (for Centos)
data/Manifest.txt CHANGED
@@ -19,7 +19,6 @@ lib/capitate/plugins/gem.rb
19
19
  lib/capitate/plugins/prompt.rb
20
20
  lib/capitate/plugins/script.rb
21
21
  lib/capitate/plugins/templates.rb
22
- lib/capitate/plugins/upload.rb
23
22
  lib/capitate/plugins/utils.rb
24
23
  lib/capitate/plugins/yum.rb
25
24
  lib/capitate/recipes.rb
@@ -2,7 +2,7 @@ module Capitate #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/capitate.rb CHANGED
@@ -20,7 +20,6 @@ require 'capitate/plugins/utils'
20
20
  require 'capitate/plugins/script'
21
21
  require 'capitate/plugins/prompt'
22
22
  require 'capitate/plugins/templates'
23
- require 'capitate/plugins/upload'
24
23
  require 'capitate/plugins/yum'
25
24
 
26
25
  # Extensions + Patches
@@ -46,7 +46,7 @@ namespace :memcached do
46
46
  fetch_or_default(:memcached_servers, [ "localhost:11211" ])
47
47
  fetch_or_default(:memcached_yml_template, "memcached/memcached.yml.erb")
48
48
 
49
- utils.install_template(memcached_yml_template, "#{shared_path}/config/memcached.yml")
49
+ put(memcached_yml_template, "#{shared_path}/config/memcached.yml")
50
50
  end
51
51
 
52
52
  desc "Symlink memcached configuration after deploy."
data/lib/recipes/nginx.rb CHANGED
@@ -32,13 +32,10 @@ namespace :nginx do
32
32
  fetch(:nginx_upstream_size)
33
33
  fetch(:nginx_upstream_port)
34
34
 
35
- set :ports, (0...nginx_upstream_size).collect { |i| nginx_upstream_port + i }
35
+ set :nginx_upstream_ports, (0...nginx_upstream_size.to_i).collect { |i| nginx_upstream_port.to_i + i }
36
36
  set :public_path, current_path + "/public"
37
37
 
38
- run "mkdir -p #{shared_path}/config"
39
- put template.load("nginx/nginx_vhost_generic.conf.erb"), "/tmp/nginx_#{nginx_upstream_name}.conf"
40
-
41
- sudo "install -o root /tmp/nginx_#{nginx_upstream_name}.conf /etc/nginx/vhosts/#{nginx_upstream_name}.conf"
38
+ utils.install_template("nginx/nginx_vhost_generic.conf.erb", "/etc/nginx/vhosts/#{nginx_upstream_name}.conf")
42
39
  end
43
40
 
44
41
  end
@@ -55,7 +55,7 @@ server {
55
55
  # For iphone unique url
56
56
  if ($http_user_agent ~* "(iPhone|iPod)") {
57
57
  rewrite ^/$ /iphone break;
58
- proxy_pass http://<%= nginx_upstream %>;
58
+ proxy_pass http://<%= nginx_upstream_name %>;
59
59
  break;
60
60
  }
61
61
 
@@ -76,7 +76,7 @@ server {
76
76
  }
77
77
 
78
78
  if (!-f $request_filename) {
79
- proxy_pass http://<%= nginx_upstream %>;
79
+ proxy_pass http://<%= nginx_upstream_name %>;
80
80
  break;
81
81
  }
82
82
  }
data/website/index.html CHANGED
@@ -35,7 +35,7 @@
35
35
 
36
36
  <div id="version" class="clickable box" onclick='document.location = "http://rubyforge.org/projects/capitate"; return false'>
37
37
  <p>Get Version</p>
38
- <a href="http://rubyforge.org/projects/capitate" class="numbers">0.3.3</a>
38
+ <a href="http://rubyforge.org/projects/capitate" class="numbers">0.3.4</a>
39
39
  </div>
40
40
 
41
41
  <div id="recipes">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capitate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ""
6
6
  authors:
7
7
  - Gabriel Handford
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-29 00:00:00 -04:00
12
+ date: 2008-05-05 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -56,7 +56,6 @@ files:
56
56
  - lib/capitate/plugins/prompt.rb
57
57
  - lib/capitate/plugins/script.rb
58
58
  - lib/capitate/plugins/templates.rb
59
- - lib/capitate/plugins/upload.rb
60
59
  - lib/capitate/plugins/utils.rb
61
60
  - lib/capitate/plugins/yum.rb
62
61
  - lib/capitate/recipes.rb
@@ -1,62 +0,0 @@
1
- module Capitate::Plugins::Upload
2
-
3
- # Upload file with source path.
4
- #
5
- # Data is streamed.
6
- #
7
- # ==== Options
8
- # +src_path+:: Source path
9
- # +dest_path+:: Remote destination path
10
- # +options+:: Options (see capistrano 'put')
11
- #
12
- # ==== Examples
13
- # upload.file("/tmp/large_file.tgz", "#{shared_path}/tmp/large_file.tgz")
14
- #
15
- def file(src_path, dest_path, options = {})
16
- data = FileData.new(src_path)
17
- put(data, dest_path, options)
18
- end
19
-
20
- # Stream data with Net::SFTP by looking like an Array
21
- class FileData
22
-
23
- def initialize(path)
24
- @path = path
25
- @next_start = 0
26
- end
27
-
28
- def [](start, length)
29
-
30
- if start != @next_start
31
- raise <<-EOS
32
-
33
- Can only access data sequentially; so we can stream it (The next start position should have been: #{@next_start})
34
-
35
- EOS
36
- end
37
-
38
- data = file.read(length)
39
-
40
- @next_start = start + length
41
- close if @next_start >= self.length
42
-
43
- data
44
- end
45
-
46
- def length
47
- @file_size ||= File.size(@path)
48
- end
49
-
50
- def file
51
- @file ||= File.open(@path, "r")
52
- end
53
-
54
- def close
55
- @file.close if @file
56
- end
57
-
58
- end
59
-
60
- end
61
-
62
- Capistrano.plugin :upload, Capitate::Plugins::Upload