capistrano-rails 1.1.1 → 1.1.2

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: 161fbac08b98832aad793818c97602d8877861e5
4
- data.tar.gz: 6d8f505851a89ed09a91c02fde975f7e4b48c096
3
+ metadata.gz: 9ecc06faeb5c6951f9b1dfcfafb26d2cbd75cfb6
4
+ data.tar.gz: 7d16b1965fcd7d08b459dfa94f019e4e4b067936
5
5
  SHA512:
6
- metadata.gz: 329f7f782db484f5b84c767b2b1ddad6c9f282a28642ec0a2d68c450ce7bff646756ca42317b9d0a269553c993b39117fbca6554d051b64dba8f120c2ccef4a8
7
- data.tar.gz: 007dd24abc173d288d37588518358d9332ab3740204a33ac16580c7a037b572685b80353e30bcee4639d5ad39d641db0206621a239cf518db0ae5f2402f3a517
6
+ metadata.gz: f128f8adb2ec46f5be5b6f5e951eb7b6585c15ac5f4f57aed4bafe0f543cf2b4750852411c30912b48b960eaea06e98bb0c5a381daa470fca71f1a39e1451ba9
7
+ data.tar.gz: fdbd6eb29c0b3d41fc144078869431596df9e9cb2cca9e7e65f4fa8ecdd5da254a4b161f89d23ac8f25e750c88ad6f20ecc7614d2dcde57ba95ccb8a3d560a5d
@@ -1,3 +1,13 @@
1
+ # future release
2
+
3
+ * ready for contributors
4
+
5
+ # 1.1.2 (Sep 1 2014)
6
+
7
+ * rails_env is set before deploy (https://github.com/capistrano/rails/pull/66)
8
+ * with `conditionally_migrate` option enabled you can skip `db:migrate` if there were no new migrations (https://github.com/capistrano/rails/pull/71)
9
+ * Allow early overriding of assets_* parameters (https://github.com/capistrano/rails/pull/73)
10
+
1
11
  # 1.1.1
2
12
 
3
13
  * New `asset_roles` options: https://github.com/capistrano/rails/pull/30
data/README.md CHANGED
@@ -10,6 +10,7 @@ Some rails specific options.
10
10
  ```ruby
11
11
  set :rails_env, 'staging' # If the environment differs from the stage name
12
12
  set :migration_role, 'migrator' # Defaults to 'db'
13
+ set :conditionally_migrate, true # Defaults to false
13
14
  set :assets_roles, [:web, :app] # Defaults to [:web]
14
15
  set :assets_prefix, 'prepackaged-assets' # Defaults to 'assets' this should match config.assets.prefix in your rails config/application.rb
15
16
  ```
@@ -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.1'
7
+ gem.version = '1.1.2'
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}
@@ -94,8 +94,8 @@ end
94
94
 
95
95
  namespace :load do
96
96
  task :defaults do
97
- set :assets_roles, [:web]
98
- set :assets_prefix, 'assets'
97
+ set :assets_roles, fetch(:assets_roles, [:web])
98
+ set :assets_prefix, fetch(:assets_prefix, 'assets')
99
99
  set :linked_dirs, fetch(:linked_dirs, []).push("public/#{fetch(:assets_prefix)}")
100
100
  end
101
101
  end
@@ -5,9 +5,16 @@ namespace :deploy do
5
5
  desc 'Runs rake db:migrate if migrations are set'
6
6
  task :migrate => [:set_rails_env] do
7
7
  on primary fetch(:migration_role) do
8
- within release_path do
9
- with rails_env: fetch(:rails_env) do
10
- execute :rake, "db:migrate"
8
+ conditionally_migrate = fetch(:conditionally_migrate)
9
+ info '[deploy:migrate] Checking changes in /db/migrate' if conditionally_migrate
10
+ if conditionally_migrate && test("diff -q #{release_path}/db/migrate #{current_path}/db/migrate")
11
+ info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db/migrate)'
12
+ else
13
+ info '[deploy:migrate] Run `rake db:migrate`' if conditionally_migrate
14
+ within release_path do
15
+ with rails_env: fetch(:rails_env) do
16
+ execute :rake, "db:migrate"
17
+ end
11
18
  end
12
19
  end
13
20
  end
@@ -18,6 +25,7 @@ end
18
25
 
19
26
  namespace :load do
20
27
  task :defaults do
28
+ set :conditionally_migrate, fetch(:conditionally_migrate, false)
21
29
  set :migration_role, fetch(:migration_role, :db)
22
30
  end
23
31
  end
@@ -2,4 +2,8 @@ namespace :deploy do
2
2
  task :set_rails_env do
3
3
  set :rails_env, (fetch(:rails_env) || fetch(:stage))
4
4
  end
5
- end
5
+ end
6
+
7
+ Capistrano::DSL.stages.each do |stage|
8
+ after stage, 'deploy:set_rails_env'
9
+ 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.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Clements
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-15 00:00:00.000000000 Z
12
+ date: 2014-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -85,3 +85,4 @@ signing_key:
85
85
  specification_version: 4
86
86
  summary: Rails specific Capistrano tasks
87
87
  test_files: []
88
+ has_rdoc: