capistrano-rails 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7065170b7a368f7095b8c03cb8c1cf79351a1cc6
4
- data.tar.gz: e15b821f871fd65299ba87df3b46daa099efcf5f
3
+ metadata.gz: 45a9dad70b2ce330f6fef57d0d1bfb633a50e57b
4
+ data.tar.gz: 9a7e56761759025fefda6d1ae96d388ac873fa77
5
5
  SHA512:
6
- metadata.gz: 97634bcd7e7a043c3bc1f0bcc0f8ea21a0704a904cd02501eabd88cc0e602f375b3d522330b97375e20c00408b353141018e6e0fea543448bfc47f53123b99e9
7
- data.tar.gz: dd80fa91b3b846cb78a13484e29cce1a7a86b412a0f07dec191becf8fd80c62fc7c035c96f01b670b1552ee9c7b256f667f5d99c6082b1266fe068697a56cb25
6
+ metadata.gz: 1355a3af7d085d8dd7add88db62a81958cea0fa368e4f26e61a2d5418ae0a73a8306317b9ce75383b9c3e845f5fa14e450c5dd77e3665d0f1e54623215b38615
7
+ data.tar.gz: 21b5cb0fdc2b1fa18714f5aae1b4e6822890f8fe808472943dca07fed304dd2c72af9ae3f551a62a3c86e7f2a8005c69e4c41e79ae84414d15026f11dab92eed
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.1.4 (Oct 10 2015)
2
+
3
+ * Fixing bug with normalize_assets typo #138
4
+ * Cleanup assets after:updated (#136)
5
+ * Fixed linked_dirs containing default value of assets_prefix (#125)
6
+
1
7
  # 1.1.3 (Apr 18 2015)
2
8
 
3
9
  * Fixed no_release behaviour (https://github.com/capistrano/rails/pull/95)
data/README.md CHANGED
@@ -5,53 +5,69 @@ Rails specific tasks for Capistrano v3:
5
5
  - `cap deploy:migrate`
6
6
  - `cap deploy:compile_assets`
7
7
 
8
- Some rails specific options.
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
9
11
 
10
12
  ```ruby
11
- set :rails_env, 'staging' # If the environment differs from the stage name
12
- set :migration_role, 'migrator' # Defaults to 'db'
13
- set :conditionally_migrate, true # Defaults to false. If true, it's skip migration if files in db/migrate not modified
14
- set :assets_roles, [:web, :app] # Defaults to [:web]
15
- set :assets_prefix, 'prepackaged-assets' # Defaults to 'assets' this should match config.assets.prefix in your rails config/application.rb
13
+ gem 'capistrano', '~> 3.1'
14
+ gem 'capistrano-rails', '~> 1.1'
16
15
  ```
17
16
 
18
- If you need to touch `public/images`, `public/javascripts` and `public/stylesheets` on each deploy:
17
+ ## Usage
18
+
19
+ Require everything (`bundler`, `rails/assets` and `rails/migrations`):
19
20
 
20
21
  ```ruby
21
- set :normalize_asset_timestamps, %{public/images public/javascripts public/stylesheets}
22
+ # Capfile
23
+ require 'capistrano/rails'
22
24
  ```
23
25
 
24
- ## Installation
26
+ Or require just what you need manually:
25
27
 
26
- Add this line to your application's Gemfile:
28
+ ```ruby
29
+ # Capfile
30
+ require 'capistrano/bundler' # Rails needs Bundler, right?
31
+ require 'capistrano/rails/assets'
32
+ require 'capistrano/rails/migrations'
33
+ ```
27
34
 
28
- gem 'capistrano', '~> 3.1'
29
- gem 'capistrano-rails', '~> 1.1'
35
+ Please note that any `require`s should be placed in `Capfile`, not in `config/deploy.rb`.
30
36
 
31
- ## Usage
37
+ You can tweak some Rails-specific options in `config/deploy.rb`:
32
38
 
33
- Require everything (bundler, rails/assets and rails/migrations)
39
+ ```ruby
40
+ # If the environment differs from the stage name
41
+ set :rails_env, 'staging'
34
42
 
35
- # Capfile
36
- require 'capistrano/rails'
43
+ # Defaults to 'db'
44
+ set :migration_role, 'migrator'
37
45
 
38
- Or require just what you need manually:
46
+ # Defaults to false
47
+ # Skip migration if files in db/migrate were not modified
48
+ set :conditionally_migrate, true
39
49
 
40
- # Capfile
41
- require 'capistrano/bundler' # Rails needs Bundler, right?
42
- require 'capistrano/rails/assets'
43
- require 'capistrano/rails/migrations'
50
+ # Defaults to [:web]
51
+ set :assets_roles, [:web, :app]
44
52
 
45
- Please note that any `require` should be placed in `Capfile`, not `config/deploy.rb`.
53
+ # Defaults to 'assets'
54
+ # This should match config.assets.prefix in your rails config/application.rb
55
+ set :assets_prefix, 'prepackaged-assets'
56
+
57
+ # If you need to touch public/images, public/javascripts, and public/stylesheets on each deploy
58
+ set :normalize_asset_timestamps, %{public/images public/javascripts public/stylesheets}
59
+ ```
46
60
 
47
61
  ### Symlinks
48
62
 
49
63
  You'll probably want to symlink Rails shared files and directories like `log`, `tmp` and `public/uploads`.
50
64
  Make sure you enable it by setting `linked_dirs` and `linked_files` options:
51
65
 
52
- # deploy.rb
53
- set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
54
- set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
66
+ ```ruby
67
+ # deploy.rb
68
+ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
69
+ set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
70
+ ```
55
71
 
56
72
  ## Contributing
57
73
 
@@ -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.3'
7
+ gem.version = '1.1.4'
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}
@@ -24,7 +24,6 @@ namespace :deploy do
24
24
  invoke 'deploy:assets:backup_manifest'
25
25
  end
26
26
 
27
- # FIXME: it removes every asset it has just compiled
28
27
  desc 'Cleanup expired assets'
29
28
  task :cleanup_assets => [:set_rails_env] do
30
29
  on release_roles(fetch(:assets_roles)) do
@@ -46,8 +45,7 @@ namespace :deploy do
46
45
  end
47
46
 
48
47
  after 'deploy:updated', 'deploy:compile_assets'
49
- # NOTE: we don't want to remove assets we've just compiled
50
- # after 'deploy:updated', 'deploy:cleanup_assets'
48
+ after 'deploy:updated', 'deploy:cleanup_assets'
51
49
  after 'deploy:updated', 'deploy:normalize_assets'
52
50
  after 'deploy:reverted', 'deploy:rollback_assets'
53
51
 
@@ -106,10 +104,19 @@ namespace :deploy do
106
104
  end
107
105
  end
108
106
 
107
+ # we can't set linked_dirs in load:defaults,
108
+ # as assets_prefix will always have a default value
109
+ namespace :deploy do
110
+ task :set_linked_dirs do
111
+ set :linked_dirs, fetch(:linked_dirs, []).push("public/#{fetch(:assets_prefix)}")
112
+ end
113
+ end
114
+
115
+ after 'deploy:set_rails_env', 'deploy:set_linked_dirs'
116
+
109
117
  namespace :load do
110
118
  task :defaults do
111
119
  set :assets_roles, fetch(:assets_roles, [:web])
112
120
  set :assets_prefix, fetch(:assets_prefix, 'assets')
113
- set :linked_dirs, fetch(:linked_dirs, []).push("public/#{fetch(:assets_prefix)}")
114
121
  end
115
122
  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.3
4
+ version: 1.1.4
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: 2015-04-18 00:00:00.000000000 Z
13
+ date: 2015-10-10 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.2.2
85
+ rubygems_version: 2.4.5
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Rails specific Capistrano tasks