capistrano-extensions 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,14 @@
1
- # Created 2008-08-20
1
+ === v0.1.4 / 2008-09-12
2
+ * In local:restore_db, the db import would previously fail if the username was not specified in your database.yml
3
+ file. I have corrected this and set it to default to 'root' now (as rails does).
4
+
5
+ * Moved a lot of the information/instructions out of the README and onto the github wiki
6
+ (http://github.com/jtrupiano/capistrano-extensions/wikis/home).
7
+
8
+ * Started hosting the gem at rubyforge. You can now install directly from gem without downloading the source!
2
9
 
3
10
  === v0.1.3 / 2008-08-25
4
- * 2008-08-25 : VERSION BUMP
5
- Introduced a new property :shared_content, which is intended to completely replace :content_directories
11
+ * Introduced a new property :shared_content, which is intended to completely replace :content_directories
6
12
  eventually. All directories previously specified by :content_directories go through a simple transformation
7
13
  to match the new hash construct that is :shared_content. Now, we can specify non-public directories (though
8
14
  they are still limited to within RAILS_ROOT), e.g.
@@ -13,10 +19,10 @@
13
19
  Then, on successive deployments, this symlink is just recreated, and all of our feeds are still accessible
14
20
  (because they were stored outside of RAILS_ROOT and then symlinked in).
15
21
 
16
- === v0.1.2 / 2008-07-20
17
- 2008-08-20
18
22
  * Fixed a mysql bug that was encountered in "sync" operations. When passing a password on the command-line
19
23
  (e.g. mysqldump -uuser -ppass), $'s in the password need to be escaped. I also fixed the scenario where
20
24
  there was no password (common for restoring to the development environment). Previously you would be
21
25
  prompted for a password only in the case where there was no password required. This was a result of
22
- the way the mysql commands were being built: "mysql -u#{user} -p#{password}" where password was nil or ""
26
+ the way the mysql commands were being built: "mysql -u#{user} -p#{password}" where password was nil or ""
27
+
28
+ === v0.1.2 / 2008-07-20
@@ -4,8 +4,8 @@ README.txt
4
4
  Rakefile
5
5
  bin/capistrano-extensions-sync-content
6
6
  bin/capistrano-extensions-sync-db
7
+ capistrano-extensions.gemspec
7
8
  lib/capistrano-extensions.rb
8
9
  lib/capistrano-extensions/deploy.rb
9
10
  lib/capistrano-extensions/geminstaller_dependency.rb
10
11
  lib/capistrano-extensions/version.rb
11
-
data/README.txt CHANGED
@@ -12,170 +12,7 @@ This gem provides a base set of Capistrano extensions including the following:
12
12
  * tasks for working with remote logfiles
13
13
  * tasks for database/asset synchronization from production back to local environments
14
14
 
15
- == INCOMPLETE:
16
- * Missing a detailed sample config file
17
- * Describe the shortcomings (or rather my dissatisfaction) with the remote syncing executables for
18
- assets/db. It works fine for now, but is a little wasteful.
19
- * Database synchronization _only_ works for MySQL. (not sure if I intend to change this any time soon)
20
- * This has really only been tested on single-server deployments, so I'm not sure how well it will work
21
- on more complex environments -- I'll personally be able to test that in the coming month or two, but
22
- that will be dictated by necessity.
23
- * Still no support for user-uploaded assets stored outside of the public/ directory
24
- * Need to automate the generation of this document: the descriptions for each attribute/task
25
- should mirror the description in the deploy script (in other words, I should only have to update the
26
- the documentation in one place).
27
-
28
- == CAPISTRANO CODE EXTENSIONS:
29
- * new RemoteDependency type :gemfile
30
-
31
- depend(:remote, :gemfile, "config/geminstaller.yml")
32
-
33
- Aliases the depend method (with depend_without_gemfile). Proxies all calls with :type != :gemfile
34
- to the aliased method. When :type == :gemfile, the gems file is parsed (using geminstaller
35
- codebase) to iteratively call depend_without_gemfile with each gem found in the YAML file.
36
-
37
- This is still really only suitable for single-server deployments. The idea would be to add new
38
- options to the geminstaller.yml config syntax that would allow us to reference specific
39
- capistrano roles for a given gem. For instance, the database server won't need all of our rails
40
- gems. A separate ferret server may require it's own set of gems, etc.
41
-
42
- == NEW RECIPE PROPERTIES --> DEFAULTS
43
- # Provides a way to specify which uploadable asset directories (that live in public/)
44
- # should be retrievable via the local:copy_production_content and local:copy_production
45
- # tasks described below. Note that this parameter is also utilized by the
46
- # passenger-recipes gem to keep these uploadable assets in the shared/ context.
47
- :content_directories --> []
48
-
49
- # This property is similar to :content_directories, except it doesn't assume that the symlinks
50
- # exist in the public/ directory (the default location for FileColumn file storage).
51
- #
52
- # This property is a hash of remote => local mappings, e.g.
53
- #
54
- # "feeds" => "content" (or "uploaded_assets/meal" => "public/meal")
55
- #
56
- # These examples will effectively create the following symlinks in a deployable environment:
57
- # ln -sf \#{shared_path}/feeds RAILS_ROOT/content
58
- # ln -sf \#{shared_path}/uploaded_assets/meal RAILS_ROOT/public/meal
59
- #
60
- # Each key (the "remote" directory) must be a directory found in \#{shared_path} (in a deployable environment)
61
- # Each value (the "local" directory) must be a directory found in RAILS_ROOT (in a local environment)
62
- :shared_content --> {}
63
-
64
- # Which environments are deployable-- for each environment specified in this array,
65
- # a helper function by the same name is created that is executed only if RAILS_ENV
66
- # is set to that value. See examples/sample_deploy.rb for a code sample.
67
- :deployable_environments --> [:production]
68
-
69
- # We at SLS use a different config structure than rails does out of the box.
70
- # Setting this value to :sls will alter some of the expected paths. Normally,
71
- # you will not have to set this variable. To see a discussion of the SLS config
72
- # file structure, see http://blog.smartlogicsolutions.com/2008/06/02/better-setup-for-environments-in-rails/
73
- :config_structure --> :rails
74
-
75
- == NEW RECIPES:
76
- * deploy:create_shared_file_column_dirs
77
-
78
- Creates shared filecolumn directories and symbolic links to them by
79
- reading the :content_directories property. Note that this task is not invoked by default,
80
- but rather is exposed to you as a helper. To utilize, you'll want to override
81
- deploy:default and invoke this yourself.
82
-
83
- * deploy:gem_update
84
-
85
- Invokes geminstaller to ensure that the proper gem set is installed on the target server.
86
- Note that this task is not invoked by default, but rather is exposed to you as a helper.
87
-
88
- * log:pull
89
-
90
- Tarballs deployable environment's rails logfile (identified by
91
- RAILS_ENV environment variable, which defaults to 'production') and copies it to the local
92
- filesystem
93
-
94
- * local:backup_db
95
-
96
- Backs up deployable environment's database (identified by the
97
- RAILS_ENV environment variable, which defaults to 'production') and copies it to the local machine
98
-
99
- * local:restore_db
100
-
101
- Untars the backup file downloaded from local:backup_db (specified via the FROM env
102
- variable, which defalts to RAILS_ENV), and imports (via mysql command line tool) it back into the database
103
- defined in the RAILS_ENV env variable.
104
-
105
- ToDo: implement proper rollback: currently, if the mysql import succeeds, but the rm fails,
106
- the database won't be rolled back. Not sure this is even all that important or necessary, since
107
- it's a local database that doesn't demand integrity (in other words, you're still going to have to
108
- fix it, but it's not mission critical).
109
-
110
- * local:backup_content
111
-
112
- Downloads a tarball of uploaded content (that lives in public/ directory, as specified by
113
- the :content_directories property) from the production site back to the local filesystem
114
-
115
- * local:restore_content
116
-
117
- Restores the backed up content (evn var FROM specifies which environment was backed up,
118
- defaults to RAILS_ENV) to the local development environment app
119
-
120
- * local:sync_db
121
-
122
- Wrapper for local:backup_db and local:restore_db
123
-
124
- $> cap local:sync_db RAILS_ENV=production RESTORE_ENV=development
125
-
126
- * local:sync_content
127
-
128
- Wrapper for local:backup_content and local:restore_content
129
-
130
- $> cap local:sync_content RAILS_ENV=production RESTORE_ENV=development
131
-
132
- * local:sync
133
-
134
- Wrapper for local:sync_db and local:sync_content
135
-
136
- $> cap local:sync RAILS_ENV=production RESTORE_ENV=development
137
-
138
- * remote:restore_db
139
-
140
- Uploads the backup file downloaded from local:backup_db (specified via the FROM env variable),
141
- copies it to the remove environment specified by RAILS_ENV, and imports (via mysql command line
142
- tool) it back into the remote database.
143
-
144
- * remote:sync_db
145
-
146
- Backs up target deployable environment's database (identified by the FROM environment variable,
147
- which defaults to 'production') and restores it to the remote database identified by the TO
148
- environment variable, which defaults to "staging."
149
-
150
- Because multiple capistrano configurations must be loaded, an external executable
151
- (capistrano-extensions-sync_db) is invoked, which independently calls capistrano. See the
152
- executable at $GEM_HOME/capistrano-extensions-0.1.3/bin/capistrano-extensions-sync_db
153
-
154
- $> cap remote:sync_db FROM=production TO=staging
155
-
156
- * remote:restore_content
157
-
158
- Uploads the backup file downloaded from local:backup_content (specified via the FROM env variable),
159
- copies it to the remote environment specified by RAILS_ENV, and unpacks it into the shared/
160
- directory.
161
-
162
- * remote:sync_content
163
-
164
- Backs up target deployable environment's shared content (identified by the FROM environment
165
- variable, which defaults to 'production') and restores it to the remote environment identified
166
- by the TO envrionment variable, which defaults to "staging."
167
-
168
- Because multiple capistrano configurations must be loaded, an external executable
169
- (capistrano-extensions-sync_content) is invoked, which independently calls capistrano. See the
170
- executable at $GEM_HOME/capistrano-extensions-0.1.2/bin/capistrano-extensions-sync_content
171
-
172
- $> cap remote:sync_content FROM=production TO=staging
173
-
174
- * remote:sync
175
-
176
- Wrapper fro remote:sync_db and remote:sync_content.
177
-
178
- $> cap remote:sync FROM=production TO=staging
15
+ For a detailed exploration of these features, check out the wiki: http://github.com/jtrupiano/capistrano-extensions/wikis/home
179
16
 
180
17
  == SYNOPSIS:
181
18
 
@@ -183,13 +20,12 @@ This gem provides a base set of Capistrano extensions including the following:
183
20
 
184
21
  == REQUIREMENTS:
185
22
 
186
- * Capistrano = 2.4.3
23
+ * Capistrano >= 2.4.3
187
24
  * GemInstaller = 0.4.3
188
25
 
189
26
  == INSTALL:
190
27
 
191
- * rake gem
192
- * sudo gem install pkg/capistrano-extensions-0.1.3.gem --local
28
+ * sudo gem install capistrano-extensions
193
29
 
194
30
  == LICENSE:
195
31
 
data/Rakefile CHANGED
@@ -1,17 +1,3 @@
1
- # GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
2
- #
3
- # Rake::GemPackageTask.new(GEM_SPEC) do |p|
4
- # p.gem_spec = GEM_SPEC
5
- # p.need_tar = true
6
- # p.need_zip = true
7
- # end
8
- #
9
- # desc "Clean up generated directories and files"
10
- # task :clean do
11
- # rm_rf "pkg"
12
- # end
13
-
14
-
15
1
  # -*- ruby -*-
16
2
 
17
3
  require 'rubygems'
@@ -19,24 +5,26 @@ require 'hoe'
19
5
  require './lib/capistrano-extensions.rb'
20
6
  require "./lib/capistrano-extensions/version"
21
7
 
22
-
23
8
  PKG_NAME = "capistrano-extensions"
24
9
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
25
- PKG_VERSION = CapistranoExtensions::Version::STRING + PKG_BUILD
10
+ version = CapistranoExtensions::Version::STRING.dup
11
+ if ENV['SNAPSHOT'].to_i == 1
12
+ version << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
13
+ end
14
+ PKG_VERSION = version
26
15
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
27
16
 
28
-
29
- Hoe.new('capistrano-extensions', PKG_VERSION) do |p|
30
- p.rubyforge_name = 'environmentaliz' # if different than lowercase project name
31
- # p.developer('FIX', 'FIX@example.com')
32
- p.name = "capistrano-extensions"
17
+ Hoe.new(PKG_NAME, PKG_VERSION) do |p|
18
+ p.rubyforge_name = 'johntrupiano' # if different than lowercase project name
19
+ p.developer('John Trupiano', 'jtrupiano@gmail.com')
20
+ p.name = PKG_NAME
33
21
  p.version = PKG_VERSION
34
22
  #p.platform = Gem::Platform::RUBY
35
23
  p.author = "John Trupiano"
36
24
  p.email = "jtrupiano@gmail.com"
37
25
  p.description = %q(A base set of Capistrano extensions-- aids with the file_column plugin, the GemInstaller gem, multiple deployable environments, logfile helpers, and database/asset synchronization from production to local environment)
38
26
  p.summary = p.description # More details later??
39
- p.remote_rdoc_dir = 'capistrano-extensions' # Release to /capistrano-extensions
27
+ p.remote_rdoc_dir = PKG_NAME # Release to /PKG_NAME
40
28
  # p.changes = p.paragraphs_of('CHANGELOG', 0..1).join("\n\n")
41
29
  p.extra_deps << ["capistrano", ">= 2.4.3"]
42
30
  p.extra_deps << ["geminstaller", ">= 0.4.3"]
@@ -0,0 +1,39 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = %q{capistrano-extensions}
3
+ s.version = "0.1.4"
4
+
5
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
+ s.authors = ["John Trupiano"]
7
+ s.date = %q{2008-09-12}
8
+ s.description = %q{A base set of Capistrano extensions-- aids with the file_column plugin, the GemInstaller gem, multiple deployable environments, logfile helpers, and database/asset synchronization from production to local environment}
9
+ s.email = %q{jtrupiano@gmail.com}
10
+ s.executables = ["capistrano-extensions-sync-content", "capistrano-extensions-sync-db"]
11
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
12
+ s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/capistrano-extensions-sync-content", "bin/capistrano-extensions-sync-db", "lib/capistrano-extensions.rb", "lib/capistrano-extensions/deploy.rb", "lib/capistrano-extensions/geminstaller_dependency.rb", "lib/capistrano-extensions/version.rb"]
13
+ s.has_rdoc = true
14
+ s.homepage = %q{http://github.com/jtrupiano/capistrano-extensions}
15
+ s.rdoc_options = ["--main", "README.txt"]
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = %q{johntrupiano}
18
+ s.rubygems_version = %q{1.2.0}
19
+ s.summary = %q{A base set of Capistrano extensions-- aids with the file_column plugin, the GemInstaller gem, multiple deployable environments, logfile helpers, and database/asset synchronization from production to local environment}
20
+
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 2
24
+
25
+ if current_version >= 3 then
26
+ s.add_runtime_dependency(%q<capistrano>, [">= 2.4.3"])
27
+ s.add_runtime_dependency(%q<geminstaller>, [">= 0.4.3"])
28
+ s.add_development_dependency(%q<hoe>, [">= 1.7.0"])
29
+ else
30
+ s.add_dependency(%q<capistrano>, [">= 2.4.3"])
31
+ s.add_dependency(%q<geminstaller>, [">= 0.4.3"])
32
+ s.add_dependency(%q<hoe>, [">= 1.7.0"])
33
+ end
34
+ else
35
+ s.add_dependency(%q<capistrano>, [">= 2.4.3"])
36
+ s.add_dependency(%q<geminstaller>, [">= 0.4.3"])
37
+ s.add_dependency(%q<hoe>, [">= 1.7.0"])
38
+ end
39
+ end
@@ -12,7 +12,7 @@ module CapistranoExtensions
12
12
 
13
13
  MAJOR = 0
14
14
  MINOR = 1
15
- TINY = 3
15
+ TINY = 4
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY].join(".")
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Trupiano
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-11 00:00:00 -04:00
12
+ date: 2008-09-12 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -60,6 +60,7 @@ files:
60
60
  - Rakefile
61
61
  - bin/capistrano-extensions-sync-content
62
62
  - bin/capistrano-extensions-sync-db
63
+ - capistrano-extensions.gemspec
63
64
  - lib/capistrano-extensions.rb
64
65
  - lib/capistrano-extensions/deploy.rb
65
66
  - lib/capistrano-extensions/geminstaller_dependency.rb
@@ -86,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  version:
87
88
  requirements: []
88
89
 
89
- rubyforge_project: environmentaliz
90
+ rubyforge_project: johntrupiano
90
91
  rubygems_version: 1.2.0
91
92
  signing_key:
92
93
  specification_version: 2