auser-poolparty-extensions 0.0.1 → 0.0.3

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.rdoc CHANGED
@@ -10,10 +10,23 @@
10
10
 
11
11
  = Available extensions
12
12
 
13
- dynomite
14
- Installs edge dynomite from the git repository
15
- rails_deploy
16
- Installs rails_deploy
13
+ == dynomite
14
+ Installs edge dynomite from the git repository
15
+
16
+ == rails_deploy
17
+ Deploy a rails application using chef_deploy
18
+
19
+ Usage:
20
+ has_rails_deploy "app_name" do
21
+ dir "/var/www"
22
+ repo "git://github.com/auser/paparazzi.git"
23
+ user "www-data"
24
+ database_yml /path/to/database.yml
25
+ end
26
+
27
+ Sets up the filesystem structure (similar to capistrano deploy) and uses ezra's
28
+ chef-deploy to deploy the application
29
+
17
30
 
18
31
  == Copyright
19
32
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 1
4
+ :patch: 3
@@ -1,38 +1,55 @@
1
1
  =begin rdoc
2
2
  Deploy a rails application using chef_deploy
3
3
 
4
-
4
+ Usage:
5
+ has_rails_deploy "app_name" do
6
+ dir "/var/www"
7
+ repo "git://github.com/auser/paparazzi.git"
8
+ user "www-data"
9
+ database_yml /path/to/database.yml # or a string
10
+ end
11
+
12
+ Sets up the filesystem structure (similar to capistrano deploy) and uses ezra's
13
+ chef-deploy to deploy the application
5
14
  =end
6
15
  module PoolParty
7
16
  class Rails
8
17
 
9
- define_resource :rails_deploy_structure do
18
+ plugin :rails_deploy do
19
+
10
20
  default_options(
11
- :create => true,
12
- :to => "/var/www",
21
+ :dir => "/var/www",
13
22
  :owner => "www-data"
14
23
  )
15
24
 
16
25
  def loaded(o={}, &block)
26
+ raise "You must include the directory to deploy the rails app" unless dir?
27
+ raise "You must include the repo to deploy the rails app" unless repo?
17
28
 
18
- has_directory ::File.dirname(to)
19
- has_directory "#{::File.dirname(to)}/#{name}"
20
- has_directory "#{::File.dirname(to)}/#{name}/shared", :owner => owner
29
+ has_package "git-core"
30
+ has_directory dir
31
+ has_directory release_directory
32
+ has_directory "#{release_directory}/shared", :owner => owner
33
+
34
+ %w(config pids log).each do |d|
35
+ has_directory "#{release_directory}/shared/#{d}", :owner => owner
36
+ end
21
37
 
22
- %w(config pids log).each do |dir|
23
- has_directory "#{::File.dirname(to)}/#{name}/shared/#{dir}"
38
+ has_file "#{release_directory}/shared/config/database.yml", :owner => owner do
39
+ content ::File.file?(database_yml) ? open(database_yml).read : database_yml
24
40
  end
25
41
 
42
+ # Should these be here?
43
+ has_chef_recipe "apache2"
44
+ has_chef_recipe "apache2::mod_rails"
45
+
46
+ dopts = options.choose {|k,v| [:repo, :user].include?(k)}
47
+ has_chef_deploy dopts.merge(:name => "#{release_directory}")
48
+
26
49
  end
27
- end
28
-
29
- plugin :rails_deploy do
30
50
 
31
- def loaded(o={}, &block)
32
- raise "You must include the directory to deploy the rails app" unless to?
33
- raise "You must include the repo to deploy the rails app" unless repo?
34
- has_chef_deploy o, &block
35
- has_rails_deploy_structure o, &block
51
+ def release_directory
52
+ "#{dir}/#{name}"
36
53
  end
37
54
 
38
55
  end
@@ -0,0 +1 @@
1
+ # stub test for now
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auser-poolparty-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Lerner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-30 00:00:00 -07:00
12
+ date: 2009-05-02 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,7 +28,9 @@ files:
28
28
  - lib/extensions
29
29
  - lib/extensions/dynomite.rb
30
30
  - lib/extensions/rails_deploy.rb
31
- - lib/poolparty_extensions.rb
31
+ - lib/poolparty-extensions.rb
32
+ - test/extensions
33
+ - test/extensions/rails_deploy_test.rb
32
34
  - test/poolparty_extensions_test.rb
33
35
  - test/test_helper.rb
34
36
  - LICENSE
@@ -58,6 +60,6 @@ rubyforge_project:
58
60
  rubygems_version: 1.2.0
59
61
  signing_key:
60
62
  specification_version: 3
61
- summary: TODO
63
+ summary: Extensions on to of poolparty
62
64
  test_files: []
63
65