capistrano-rails 1.1.0 → 1.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6951518ecbf65c0683c8177586638ae12764cdc9
4
- data.tar.gz: aab574b616b287b20450adbb46e82cd3b75f044d
3
+ metadata.gz: 161fbac08b98832aad793818c97602d8877861e5
4
+ data.tar.gz: 6d8f505851a89ed09a91c02fde975f7e4b48c096
5
5
  SHA512:
6
- metadata.gz: 94abda59736ef34941085ef2a353c96f245a7b6fec21f084c0f558d51f3539f9a462ef327feeb2848e9dd96a5d6ae2a2d0e77a9a373f8568677b753001fb2989
7
- data.tar.gz: ffa784e092b0e8f416e8a13b84e9db27ca959b778a2e8b9e7258fa07b4ffbeb652989d00b8f0bab63cc4f95f92a33e59ec6e16de274169ea69548ec900dd6b1f
6
+ metadata.gz: 329f7f782db484f5b84c767b2b1ddad6c9f282a28642ec0a2d68c450ce7bff646756ca42317b9d0a269553c993b39117fbca6554d051b64dba8f120c2ccef4a8
7
+ data.tar.gz: 007dd24abc173d288d37588518358d9332ab3740204a33ac16580c7a037b572685b80353e30bcee4639d5ad39d641db0206621a239cf518db0ae5f2402f3a517
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.1.1
2
+
3
+ * New `asset_roles` options: https://github.com/capistrano/rails/pull/30
4
+ * normalized task spelling: 'deploy:normalise_assets' is now 'deploy:normalize_assets'
5
+ * depend on capistrano 3.1 to support multiple role arguments
6
+
1
7
  # 1.1.0
2
8
 
3
9
  * set rails_env even if capistrano-rails was required partly
data/README.md CHANGED
@@ -8,8 +8,10 @@ Rails specific tasks for Capistrano v3:
8
8
  Some rails specific options.
9
9
 
10
10
  ```ruby
11
- set :rails_env, 'staging' # If the environment differs from the stage name
12
- set :migration_role, 'migrator' # Defaults to 'db'
11
+ set :rails_env, 'staging' # If the environment differs from the stage name
12
+ set :migration_role, 'migrator' # Defaults to 'db'
13
+ set :assets_roles, [:web, :app] # Defaults to [:web]
14
+ set :assets_prefix, 'prepackaged-assets' # Defaults to 'assets' this should match config.assets.prefix in your rails config/application.rb
13
15
  ```
14
16
 
15
17
  If you need to touch `public/images`, `public/javascripts` and `public/stylesheets` on each deploy:
@@ -22,8 +24,8 @@ set :normalize_asset_timestamps, %{public/images public/javascripts public/style
22
24
 
23
25
  Add this line to your application's Gemfile:
24
26
 
25
- gem 'capistrano', '~> 3.0.0'
26
- gem 'capistrano-rails'
27
+ gem 'capistrano', '~> 3.1'
28
+ gem 'capistrano-rails', '~> 1.1'
27
29
 
28
30
  ## Usage
29
31
 
@@ -38,6 +40,8 @@ Or require just what you need manually:
38
40
  require 'capistrano/bundler' # Rails needs Bundler, right?
39
41
  require 'capistrano/rails/assets'
40
42
  require 'capistrano/rails/migrations'
43
+
44
+ Please note that any `require` should be placed in `Capfile`, not `config/deploy.rb`.
41
45
 
42
46
  ## Contributing
43
47
 
@@ -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.0'
7
+ gem.version = '1.1.1'
8
8
  gem.authors = ["Tom Clements", "Lee Hambley"]
9
9
  gem.email = ["seenmyfate@gmail.com", "lee.hambley@gmail.com"]
10
10
  gem.description = %q{Rails specific Capistrano tasks}
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
16
  gem.require_paths = ["lib"]
17
17
 
18
- gem.add_dependency 'capistrano', '>= 3.0.0'
19
- gem.add_dependency 'capistrano-bundler', '>= 1.0.0'
18
+ gem.add_dependency 'capistrano', '~> 3.1'
19
+ gem.add_dependency 'capistrano-bundler', '~> 1.1'
20
20
 
21
21
  end
@@ -6,13 +6,9 @@ module Capistrano
6
6
  end
7
7
 
8
8
  namespace :deploy do
9
- before :starting, :set_shared_assets do
10
- set :linked_dirs, (fetch(:linked_dirs) || []).push('public/assets')
11
- end
12
-
13
- desc 'Normalise asset timestamps'
14
- task :normalise_assets => [:set_rails_env] do
15
- on roles :web do
9
+ desc 'Normalize asset timestamps'
10
+ task :normalize_assets => [:set_rails_env] do
11
+ on roles(fetch(:assets_roles)) do
16
12
  assets = fetch(:normalize_asset_timestamps)
17
13
  if assets
18
14
  within release_path do
@@ -31,7 +27,7 @@ namespace :deploy do
31
27
  # FIXME: it removes every asset it has just compiled
32
28
  desc 'Cleanup expired assets'
33
29
  task :cleanup_assets => [:set_rails_env] do
34
- on roles :web do
30
+ on roles(fetch(:assets_roles)) do
35
31
  within release_path do
36
32
  with rails_env: fetch(:rails_env) do
37
33
  execute :rake, "assets:clean"
@@ -52,12 +48,12 @@ namespace :deploy do
52
48
  after 'deploy:updated', 'deploy:compile_assets'
53
49
  # NOTE: we don't want to remove assets we've just compiled
54
50
  # after 'deploy:updated', 'deploy:cleanup_assets'
55
- after 'deploy:updated', 'deploy:normalise_assets'
51
+ after 'deploy:updated', 'deploy:normalize_assets'
56
52
  after 'deploy:reverted', 'deploy:rollback_assets'
57
53
 
58
54
  namespace :assets do
59
55
  task :precompile do
60
- on roles :web do
56
+ on roles(fetch(:assets_roles)) do
61
57
  within release_path do
62
58
  with rails_env: fetch(:rails_env) do
63
59
  execute :rake, "assets:precompile"
@@ -67,20 +63,20 @@ namespace :deploy do
67
63
  end
68
64
 
69
65
  task :backup_manifest do
70
- on roles :web do
66
+ on roles(fetch(:assets_roles)) do
71
67
  within release_path do
72
68
  execute :cp,
73
- release_path.join('public', 'assets', 'manifest*'),
69
+ release_path.join('public', fetch(:assets_prefix), 'manifest*'),
74
70
  release_path.join('assets_manifest_backup')
75
71
  end
76
72
  end
77
73
  end
78
74
 
79
75
  task :restore_manifest do
80
- on roles :web do
76
+ on roles(fetch(:assets_roles)) do
81
77
  within release_path do
82
78
  source = release_path.join('assets_manifest_backup')
83
- target = capture(:ls, release_path.join('public', 'assets',
79
+ target = capture(:ls, release_path.join('public', fetch(:assets_prefix),
84
80
  'manifest*')).strip
85
81
  if test "[[ -f #{source} && -f #{target} ]]"
86
82
  execute :cp, source, target
@@ -94,5 +90,12 @@ namespace :deploy do
94
90
  end
95
91
 
96
92
  end
93
+ end
97
94
 
95
+ namespace :load do
96
+ task :defaults do
97
+ set :assets_roles, [:web]
98
+ set :assets_prefix, 'assets'
99
+ set :linked_dirs, fetch(:linked_dirs, []).push("public/#{fetch(:assets_prefix)}")
100
+ end
98
101
  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.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Clements
@@ -9,36 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-15 00:00:00.000000000 Z
12
+ date: 2014-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.0
20
+ version: '3.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 3.0.0
27
+ version: '3.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: capistrano-bundler
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 1.0.0
34
+ version: '1.1'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 1.0.0
41
+ version: '1.1'
42
42
  description: Rails specific Capistrano tasks
43
43
  email:
44
44
  - seenmyfate@gmail.com
@@ -47,7 +47,7 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - .gitignore
50
+ - ".gitignore"
51
51
  - CHANGELOG.md
52
52
  - Gemfile
53
53
  - LICENSE.txt
@@ -70,19 +70,18 @@ require_paths:
70
70
  - lib
71
71
  required_ruby_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.0.3
83
+ rubygems_version: 2.2.1
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Rails specific Capistrano tasks
87
87
  test_files: []
88
- has_rdoc: