meskyanichi-simple_generators 0.2.0 → 0.2.1

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
@@ -18,6 +18,7 @@ This generator will generate a simple capistrano template. You can supply some a
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
20
  repository_type:git repository_url:ssh://root@example.com/var/git/example.git reeip:/opt/ruby-enterprise-1.8.6-20090610
21
+ ssh_address:xxx.xx.xxx.xx crontab_id:a_crontab_id
21
22
 
22
23
  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
24
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -6,5 +6,6 @@ This generator will generate a simple capistrano template. You can supply some a
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
8
  repository_type:git repository_url:ssh://root@example.com/var/git/example.git reeip:/opt/ruby-enterprise-1.8.6-20090610
9
+ ssh_address:xxx.xx.xxx.xx crontab_id:a_crontab_id
9
10
 
10
11
  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.
@@ -38,6 +38,8 @@ class SimpleCapistranoRecipeGenerator < Rails::Generator::Base
38
38
  @input[:repository_type] ||= "git"
39
39
  @input[:repository_url] ||= "ssh://root@example.com/var/git/example.git"
40
40
  @input[:reeip] ||= "/opt/ruby-enterprise-1.8.6-20090610"
41
+ @input[:ssh_address] ||= nil
42
+ @input[:crontab_id] ||= nil
41
43
  end
42
44
 
43
45
  # Input Method that's available inside the generated templates
@@ -43,7 +43,25 @@ set :application, "<%= input[:domain] %>"
43
43
  role :web, application
44
44
  role :app, application
45
45
  role :db, application
46
-
46
+
47
+ # Crontab
48
+ # Change "application" to whatever you want if you wish to use a different identifier
49
+ # to reduce the chance it might conflict with another application.
50
+ <% if input[:crontab_id] -%>
51
+ set :crontab_id, "<%= input[:crontab_id] %>"
52
+ <% else -%>
53
+ set :crontab_id, application
54
+ <% end -%>
55
+
56
+ # SSH Address
57
+ # Change "application" to whatever you want if you wish to use a dfferent address to connect to.
58
+ # This can either be an IP or a URL that points at the same IP.
59
+ <% if input[:ssh_address] -%>
60
+ set :ssh_address, "<%= input[:ssh_address] %>"
61
+ <% else -%>
62
+ set :ssh_address, application
63
+ <% end -%>
64
+
47
65
  # Set the user
48
66
  # :user => Set the user that will attempt to access the remote repository
49
67
  # :deploy_to => Set the deployment location (destination) on the remote server
@@ -69,8 +87,6 @@ set :ruby_enterprise_edition_installation_path, "<%= input[:reeip] %>"
69
87
  default_run_options[:pty] = true
70
88
 
71
89
 
72
-
73
-
74
90
  # TASKS
75
91
  # You can add additional deployment tasks, or alter the ones below.
76
92
 
@@ -90,7 +106,7 @@ namespace :deploy do
90
106
 
91
107
  desc "Syncs the database.yml to the server"
92
108
  task :sync_database_yaml do
93
- system "rsync -vr --exclude='.DS_Store' config/database.yml #{user}@#{application}:#{shared_path}/config/"
109
+ system "rsync -vr --exclude='.DS_Store' config/database.yml #{user}@#{ssh_address}:#{shared_path}/config/"
94
110
  end
95
111
 
96
112
  desc "Sets up symbolic links."
@@ -114,14 +130,12 @@ namespace :deploy do
114
130
 
115
131
  desc "Update the crontab file"
116
132
  task :update_crontab, :roles => :db do
117
- run "cd #{release_path} && whenever --update-crontab #{application}"
133
+ run "cd #{release_path} && whenever --update-crontab #{crontab_id}"
118
134
  end
119
135
 
120
136
  end
121
137
 
122
138
 
123
-
124
-
125
139
  # CALLBACKS
126
140
  # By adding more tasks, you might want to add more callbacks.
127
141
  # Just append more callbacks to the existing ones below.
@@ -129,5 +143,8 @@ end
129
143
  after 'deploy:setup', 'deploy:setup_shared'
130
144
  after 'deploy:setup', 'deploy:sync_database_yaml'
131
145
  after 'deploy:update_code', 'deploy:setup_symlinks'
132
- after 'deploy:update_code', 'deploy:install_gems'
133
- #after 'deploy:symlink', 'deploy:update_crontab' (Uncomment if using Javan-Whenever Gem)
146
+
147
+ # Javan-Whenever RubyGem
148
+ # If you're using this gem and want to update the cron on the server after every deployment
149
+ # then simply uncomment the line below:
150
+ #after 'deploy:symlink', 'deploy:update_crontab'
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple_generators}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
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-09-15}
12
+ s.date = %q{2009-09-24}
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.2.0
4
+ version: 0.2.1
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-09-15 00:00:00 -07:00
12
+ date: 2009-09-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -47,6 +47,7 @@ files:
47
47
  - test/test_helper.rb
48
48
  has_rdoc: false
49
49
  homepage: http://github.com/meskyanichi/simple_generators
50
+ licenses:
50
51
  post_install_message:
51
52
  rdoc_options:
52
53
  - --charset=UTF-8
@@ -67,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
68
  requirements: []
68
69
 
69
70
  rubyforge_project:
70
- rubygems_version: 1.2.0
71
+ rubygems_version: 1.3.5
71
72
  signing_key:
72
73
  specification_version: 3
73
74
  summary: A couple of generators that supply you with some common templates to speed up the development process.