capistrano-rails 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +20 -8
- data/capistrano-rails.gemspec +1 -1
- data/lib/capistrano/tasks/assets.rake +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b624e8b3ec6e21ad7e0bb65300ec1a8cad76d4b2
|
4
|
+
data.tar.gz: 9033a3659b7c842a674274bc82ba21e6fe6141cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc2d91c064fbf909acf22e3b8adac4c5b706584db2e77ea03f1af70c3101a29fb63d7d4ffa128173fd946ef3131f5273065067edb11edb966ac5fd4b9380b57b
|
7
|
+
data.tar.gz: 87c75a9ed69775a8bcc1f0e953c15e1a3ebd7d36130e0996e71ef946c4673b859f1171c6f713a53f3fef3298e53caddc83f300931a3210848e735b157288d840
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# master
|
2
2
|
|
3
|
+
* Your contribution here!
|
4
|
+
|
5
|
+
# 1.1.8 (Sep 13 2016)
|
6
|
+
|
7
|
+
* Handle arrays passed into `normalize_asset_timestamps` correctly (#184)
|
8
|
+
|
9
|
+
# 1.1.7 (Jun 10 2016)
|
10
|
+
|
3
11
|
* call `Array#uniq` in `deploy:set_linked_dirs` task to remove duplicated :linked_dirs
|
4
12
|
* Add `migration_servers` configuration (#168)
|
5
13
|
|
data/README.md
CHANGED
@@ -7,11 +7,11 @@ Rails specific tasks for Capistrano v3:
|
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
10
|
-
Add
|
10
|
+
Add these lines to your application's Gemfile:
|
11
11
|
|
12
12
|
```ruby
|
13
13
|
group :development do
|
14
|
-
gem 'capistrano', '~> 3.
|
14
|
+
gem 'capistrano', '~> 3.6'
|
15
15
|
gem 'capistrano-rails', '~> 1.1'
|
16
16
|
end
|
17
17
|
```
|
@@ -54,8 +54,11 @@ You can tweak some Rails-specific options in `config/deploy.rb`:
|
|
54
54
|
# If the environment differs from the stage name
|
55
55
|
set :rails_env, 'staging'
|
56
56
|
|
57
|
-
# Defaults to
|
58
|
-
set :migration_role,
|
57
|
+
# Defaults to :db role
|
58
|
+
set :migration_role, :db
|
59
|
+
|
60
|
+
# Defaults to the primary :db server
|
61
|
+
set :migration_servers, -> { primary(fetch(:migration_role)) }
|
59
62
|
|
60
63
|
# Defaults to false
|
61
64
|
# Skip migration if files in db/migrate were not modified
|
@@ -75,10 +78,6 @@ set :normalize_asset_timestamps, %w{public/images public/javascripts public/styl
|
|
75
78
|
# If you use Rails 4+ and you'd like to clean up old assets after each deploy,
|
76
79
|
# set this to the number of versions to keep
|
77
80
|
set :keep_assets, 2
|
78
|
-
|
79
|
-
# Defaults to the primary :db server
|
80
|
-
set :migration_role, :db
|
81
|
-
set :migration_servers, -> { primary(fetch(:migration_role)) }
|
82
81
|
```
|
83
82
|
|
84
83
|
### Symlinks
|
@@ -92,6 +91,19 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', '
|
|
92
91
|
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
|
93
92
|
```
|
94
93
|
|
94
|
+
### Recommendations
|
95
|
+
|
96
|
+
While migrations looks like a concern of the database layer, Rails migrations
|
97
|
+
are strictly related to the framework. Therefore, it's recommended to set the
|
98
|
+
role to `:app` instead of `:db` like:
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
set :migration_role, :app
|
102
|
+
```
|
103
|
+
|
104
|
+
The advantage is you won't need to deploy your application to your database
|
105
|
+
server, and overall a better separation of concerns.
|
106
|
+
|
95
107
|
## Contributing
|
96
108
|
|
97
109
|
1. Fork it
|
data/capistrano-rails.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "capistrano-rails"
|
7
|
-
gem.version = '1.1.
|
7
|
+
gem.version = '1.1.8'
|
8
8
|
gem.authors = ["Tom Clements", "Lee Hambley", "Kir Shatrov"]
|
9
9
|
gem.email = ["seenmyfate@gmail.com", "lee.hambley@gmail.com", "shatrov@me.com"]
|
10
10
|
gem.description = %q{Rails specific Capistrano tasks}
|
@@ -9,10 +9,10 @@ namespace :deploy do
|
|
9
9
|
desc 'Normalize asset timestamps'
|
10
10
|
task :normalize_assets => [:set_rails_env] do
|
11
11
|
on release_roles(fetch(:assets_roles)) do
|
12
|
-
assets = fetch(:normalize_asset_timestamps)
|
13
|
-
if assets
|
12
|
+
assets = Array(fetch(:normalize_asset_timestamps, []))
|
13
|
+
if assets.any?
|
14
14
|
within release_path do
|
15
|
-
execute :find, "#{assets} -exec touch -t #{asset_timestamp} {} ';'; true"
|
15
|
+
execute :find, "#{assets.join(' ')} -exec touch -t #{asset_timestamp} {} ';'; true"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Clements
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.6.6
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Rails specific Capistrano tasks
|