meskyanichi-simple_generators 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -17,7 +17,7 @@ This generator will generate a simple capistrano template. You can supply some a
17
17
 
18
18
  ==== You can also provide arguments to generate an already filled in recipe:
19
19
  script/generate simple_capistrano_recipe domain:example.com user:root deploy_path:/var/rails/example.com
20
- repository_type:git repository_url:ssh://root@example.com/var/git/example.git
20
+ repository_type:git repository_url:ssh://root@example.com/var/git/example.git reeip:/opt/ruby-enterprise-1.8.6-20090610
21
21
 
22
22
  After generating the deployment recipe (RAILS_ROOT/config/deploy.rb), you might want to double check if everything is set up correctly before you actually try to deploy.
23
23
 
@@ -26,7 +26,7 @@ After generating the deployment recipe (RAILS_ROOT/config/deploy.rb), you might
26
26
 
27
27
  == Simple Git Template
28
28
 
29
- This is a very small generator that just generates a .gitignore file in the RAILS_ROOT with a couple of predefined ingore lines.
29
+ This is a very small generator that just generates a .gitignore file in the RAILS_ROOT with a couple of predefined ignore lines.
30
30
  ==== No arguments can be supplied here:
31
31
  script/generate simple_git_template
32
32
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.0
@@ -5,6 +5,6 @@ This generator will generate a simple capistrano template. You can supply some a
5
5
 
6
6
  ==== You can also provide arguments to generate an already filled in recipe:
7
7
  script/generate simple_capistrano_recipe domain:example.com user:root deploy_path:/var/rails/example.com
8
- repository_type:git repository_url:ssh://root@example.com/var/git/example.git
8
+ repository_type:git repository_url:ssh://root@example.com/var/git/example.git reeip:/opt/ruby-enterprise-1.8.6-20090610
9
9
 
10
10
  After generating the deployment recipe (RAILS_ROOT/config/deploy.rb), you might want to double check if everything is set up correctly before you actually try to deploy.
@@ -37,6 +37,7 @@ class SimpleCapistranoRecipeGenerator < Rails::Generator::Base
37
37
  @input[:deploy_path] ||= "/var/rails/example.com"
38
38
  @input[:repository_type] ||= "git"
39
39
  @input[:repository_url] ||= "ssh://root@example.com/var/git/example.git"
40
+ @input[:reeip] ||= "/opt/ruby-enterprise-1.8.6-20090610"
40
41
  end
41
42
 
42
43
  # Input Method that's available inside the generated templates
@@ -59,6 +59,9 @@ set :use_sudo, false
59
59
  set :scm, "<%= input[:repository_type] %>"
60
60
  set :repository, "<%= input[:repository_url] %>"
61
61
  set :branch, "master"
62
+
63
+ # Ruby Enterprise Edition
64
+ set :ruby_enterprise_edition_installation_path, "<%= input[:reeip] %>"
62
65
 
63
66
  # Required: default_run_options[:pty] - This will allow the user to connect to protected repository after
64
67
  # logging in when the system prompts for the server's root password
@@ -68,47 +71,47 @@ default_run_options[:pty] = true
68
71
 
69
72
 
70
73
 
71
-
72
-
73
-
74
-
75
-
76
-
77
74
  # TASKS
78
75
  # You can add additional deployment tasks, or alter the ones below.
79
76
 
80
77
  namespace :deploy do
81
-
78
+
82
79
  desc "Restart Application with Passenger and make the application writable."
83
80
  task :restart do
84
81
  run "touch #{current_path}/tmp/restart.txt"
85
82
  run "chown -R www-data:www-data #{deploy_to}"
86
83
  end
87
-
84
+
88
85
  desc "Setup the shared folder structure."
89
86
  task :setup_shared do
90
87
  run "touch #{shared_path}/log/production.log"
91
88
  run "mkdir #{shared_path}/db #{shared_path}/assets #{shared_path}/config"
92
89
  end
93
-
90
+
94
91
  desc "Syncs the database.yml to the server"
95
92
  task :sync_database_yaml do
96
93
  system "rsync -vr --exclude='.DS_Store' config/database.yml #{user}@#{application}:#{shared_path}/config/"
97
94
  end
98
-
95
+
99
96
  desc "Sets up symbolic links."
100
97
  task :setup_symlinks do
101
98
  run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
102
99
  run "ln -nfs #{shared_path}/db/production.sqlite3 #{release_path}/db/production.sqlite3"
103
100
  run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"
104
101
  end
105
-
102
+
106
103
  desc "Reset remote rails environment."
107
104
  task :reset_rails_environment do
108
105
  run "rm -rf #{deploy_to}"
109
106
  system "cap deploy:setup"
110
107
  end
111
-
108
+
109
+ desc "Installs any 'not-yet-installed' gems on the production server."
110
+ task :install_gems do
111
+ run "cd #{current_path}; #{ruby_enterprise_edition_installation_path}/bin/rake gems:install RAILS_ENV=production"
112
+ run "cd #{current_path}; rake gems:install RAILS_ENV=production"
113
+ end
114
+
112
115
  desc "Update the crontab file"
113
116
  task :update_crontab, :roles => :db do
114
117
  run "cd #{release_path} && whenever --update-crontab #{application}"
@@ -119,7 +122,6 @@ end
119
122
 
120
123
 
121
124
 
122
-
123
125
  # CALLBACKS
124
126
  # By adding more tasks, you might want to add more callbacks.
125
127
  # Just append more callbacks to the existing ones below.
@@ -127,4 +129,5 @@ end
127
129
  after 'deploy:setup', 'deploy:setup_shared'
128
130
  after 'deploy:setup', 'deploy:sync_database_yaml'
129
131
  after 'deploy:update_code', 'deploy:setup_symlinks'
132
+ after 'deploy:update_code', 'deploy:install_gems'
130
133
  #after 'deploy:symlink', 'deploy:update_crontab' (Uncomment if using Javan-Whenever Gem)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple_generators}
8
- s.version = "0.1.3"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael van Rooijen"]
12
- s.date = %q{2009-08-14}
12
+ s.date = %q{2009-09-15}
13
13
  s.description = %q{A couple of generators that supply you with some common templates to speed up the development process.}
14
14
  s.email = %q{meskyan@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meskyanichi-simple_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-14 00:00:00 -07:00
12
+ date: 2009-09-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -47,7 +47,6 @@ files:
47
47
  - test/test_helper.rb
48
48
  has_rdoc: false
49
49
  homepage: http://github.com/meskyanichi/simple_generators
50
- licenses:
51
50
  post_install_message:
52
51
  rdoc_options:
53
52
  - --charset=UTF-8
@@ -68,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
67
  requirements: []
69
68
 
70
69
  rubyforge_project:
71
- rubygems_version: 1.3.5
70
+ rubygems_version: 1.2.0
72
71
  signing_key:
73
72
  specification_version: 3
74
73
  summary: A couple of generators that supply you with some common templates to speed up the development process.