capistrano-bundler 1.1.4 → 1.2.0

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: 4171f4d53229aa69f9b7efe265ff11cef104fc16
4
- data.tar.gz: b845be8d3ea22e20c13dfad9b97e85b7a03fd921
3
+ metadata.gz: dad2fda55a7ff2ba45994bdb2006b580c6eb02b9
4
+ data.tar.gz: 59d5e76aa5c93e97ef4099c0cb88197851267869
5
5
  SHA512:
6
- metadata.gz: 490de12e53ac8aafe7e69f6c46a426bc47705fb7553c4bdd2c7a372ff44474737e71f8bc68da11b68892be85ae0e5c8ef0b3c6aeeb87097264c8795a855bd26c
7
- data.tar.gz: 7a26518cd23474aa1ee7a9bc0500c9dc6ab0921ec988bdf18460ff8dcd6b393fcff9d58ed8859db3935b2db731d947fb029246611db3c3d553a4561f2299e5c3
6
+ metadata.gz: f34798db9356c5c5ea4665c20bc297a9c6a373bd3277a2051543bf855e84e032a98db11f202b0b036d44e7dccc65a4f46d660eed2acdee9ea683a5188129780a
7
+ data.tar.gz: fdc68e85d87d94b2a7d1a281c5cbc5978f3e4d69459ab326bcfd852bf5c7f8019e04fe69d9f734d1d65cdeb75b7d3f4fe4fc24571dd0f00dfbfeb0c7b40e8c7c
@@ -1,4 +1,15 @@
1
- # 1.1.4 (22 Jan 2014)
1
+ # [Unreleased][] (master)
2
+
3
+ * Your contribution here!
4
+
5
+ # [1.2.0][] (1 Oct 2016)
6
+
7
+ * Added a `bundle clean` task. There are no default hooks for it.
8
+ * Use `bundle check` to check if we can skip `bundle install`
9
+ * Run `bundle:install` on rollback (`deploy:reverted`)
10
+ * You can now `require "capistrano/bundler/tasks"` to load the tasks only without the hooks
11
+
12
+ # 1.1.4 (22 Jan 2015)
2
13
 
3
14
  * Don’t generate binstubs by default (#61)
4
15
 
@@ -29,3 +40,6 @@
29
40
  # 1.0.0
30
41
 
31
42
  Initial release
43
+
44
+ [Unreleased]: https://github.com/capistrano/bundler/compare/v1.2.0...HEAD
45
+ [1.2.0]: https://github.com/capistrano/bundler/compare/v1.1.4...v1.2.0
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2013 Capistrano, your one stop deployment shop.
3
+ Copyright (c) 2016 Capistrano, your one stop deployment shop.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -53,10 +53,11 @@ set :bundle_roles, :all # this is defaul
53
53
  set :bundle_servers, -> { release_roles(fetch(:bundle_roles)) } # this is default
54
54
  set :bundle_binstubs, -> { shared_path.join('bin') } # default: nil
55
55
  set :bundle_gemfile, -> { release_path.join('MyGemfile') } # default: nil
56
- set :bundle_path, -> { shared_path.join('bundle') } # this is default
56
+ set :bundle_path, -> { shared_path.join('bundle') } # this is default. set it to nil for skipping the --path flag.
57
57
  set :bundle_without, %w{development test}.join(' ') # this is default
58
58
  set :bundle_flags, '--deployment --quiet' # this is default
59
59
  set :bundle_env_variables, {} # this is default
60
+ set :bundle_clean_options, "" # this is default. Use "--dry-run" if you just want to know what gems would be deleted, without actually deleting them
60
61
  ```
61
62
 
62
63
  You can parallelize the installation of gems with bundler's jobs feature.
@@ -86,6 +87,13 @@ $ bundle install \
86
87
 
87
88
  If any option is set to `nil` it will be excluded from the final bundle command.
88
89
 
90
+ If you want to clean up gems after a successful deploy, add `after 'deploy:published', 'bundler:clean'` to config/deploy.rb.
91
+
92
+ Downsides to cleaning:
93
+
94
+ * If a rollback requires rebuilding a Gem with a large compiled binary component, such as Nokogiri, the rollback will take a while.
95
+ * In rare cases, if a gem that was used in the previously deployed version was yanked, rollback would entirely fail.
96
+
89
97
  ### Environment Variables
90
98
 
91
99
  The `bundle_env_variables` option can be used to specify any environment variables you want present when running the `bundle` command:
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'capistrano-bundler'
7
- spec.version = '1.1.4'
7
+ spec.version = '1.2.0'
8
8
  spec.authors = ['Tom Clements', 'Lee Hambley', 'Kir Shatrov']
9
9
  spec.email = ['seenmyfate@gmail.com', 'lee.hambley@gmail.com', 'shatrov@me.com']
10
10
  spec.description = %q{Bundler support for Capistrano 3.x}
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'sshkit', '~> 1.2'
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 1.3'
24
- spec.add_development_dependency 'rake', '~> 0'
24
+ spec.add_development_dependency 'rake'
25
25
  end
@@ -1 +1,2 @@
1
- load File.expand_path('../tasks/bundler.cap', __FILE__)
1
+ require_relative 'bundler/tasks'
2
+ require_relative 'bundler/hooks'
@@ -0,0 +1 @@
1
+ load File.expand_path('../../tasks/hooks.cap', __FILE__)
@@ -0,0 +1 @@
1
+ load File.expand_path('../../tasks/bundler.cap', __FILE__)
@@ -19,20 +19,22 @@ namespace :bundler do
19
19
  set :bundle_flags, '--deployment --quiet'
20
20
  set :bundle_jobs, nil
21
21
  set :bundle_env_variables, {}
22
+ set :bundle_clean_options, ""
22
23
  DESC
23
24
  task :install do
24
25
  on fetch(:bundle_servers) do
25
26
  within release_path do
26
27
  with fetch(:bundle_env_variables, {}) do
27
- options = ["install"]
28
- options << "--binstubs #{fetch(:bundle_binstubs)}" if fetch(:bundle_binstubs)
28
+ options = []
29
29
  options << "--gemfile #{fetch(:bundle_gemfile)}" if fetch(:bundle_gemfile)
30
30
  options << "--path #{fetch(:bundle_path)}" if fetch(:bundle_path)
31
- options << "--without #{fetch(:bundle_without)}" if fetch(:bundle_without)
32
- options << "--jobs #{fetch(:bundle_jobs)}" if fetch(:bundle_jobs)
33
- options << "#{fetch(:bundle_flags)}" if fetch(:bundle_flags)
34
-
35
- execute :bundle, options
31
+ unless test(:bundle, :check, *options)
32
+ options << "--binstubs #{fetch(:bundle_binstubs)}" if fetch(:bundle_binstubs)
33
+ options << "--jobs #{fetch(:bundle_jobs)}" if fetch(:bundle_jobs)
34
+ options << "--without #{fetch(:bundle_without)}" if fetch(:bundle_without)
35
+ options << "#{fetch(:bundle_flags)}" if fetch(:bundle_flags)
36
+ execute :bundle, :install, *options
37
+ end
36
38
  end
37
39
  end
38
40
  end
@@ -50,7 +52,16 @@ namespace :bundler do
50
52
  end
51
53
  end
52
54
 
53
- before 'deploy:updated', 'bundler:install'
55
+ desc "Remove unused gems intalled by bundler"
56
+ task :clean do
57
+ on fetch(:bundle_servers) do
58
+ within release_path do
59
+ with fetch(:bundle_env_variables, {}) do
60
+ execute :bundle, :clean, fetch(:bundle_clean_options, "")
61
+ end
62
+ end
63
+ end
64
+ end
54
65
  end
55
66
 
56
67
  Capistrano::DSL.stages.each do |stage|
@@ -0,0 +1,2 @@
1
+ before 'deploy:updated', 'bundler:install'
2
+ before 'deploy:reverted', 'bundler:install'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
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-01-22 00:00:00.000000000 Z
13
+ date: 2016-10-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capistrano
@@ -58,14 +58,14 @@ dependencies:
58
58
  name: rake
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  description: Bundler support for Capistrano 3.x
@@ -86,7 +86,10 @@ files:
86
86
  - capistrano-bundler.gemspec
87
87
  - lib/capistrano-bundler.rb
88
88
  - lib/capistrano/bundler.rb
89
+ - lib/capistrano/bundler/hooks.rb
90
+ - lib/capistrano/bundler/tasks.rb
89
91
  - lib/capistrano/tasks/bundler.cap
92
+ - lib/capistrano/tasks/hooks.cap
90
93
  homepage: https://github.com/capistrano/bundler
91
94
  licenses:
92
95
  - MIT
@@ -107,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
110
  version: '0'
108
111
  requirements: []
109
112
  rubyforge_project:
110
- rubygems_version: 2.2.2
113
+ rubygems_version: 2.6.6
111
114
  signing_key:
112
115
  specification_version: 4
113
116
  summary: Bundler support for Capistrano 3.x