capistrano-slug 0.1.0 → 0.1.1

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: c410eecc15c688b93ca6a7525f3b957a93e5c950
4
- data.tar.gz: bed597e554bed48fcd766216dc0d8c102830a124
3
+ metadata.gz: 6aeacc7ca16625360e2088e174b509f1012b904d
4
+ data.tar.gz: ef628070c16473db2a4dbbc43765fd46168c8191
5
5
  SHA512:
6
- metadata.gz: 7eeb8697ea54e1dc9c56c8bc283e6ee1f5830c0194db3bcfb0cc4013771b5c1fbeac6d7f5b181c473f3f215b98bda795451076f44fe4cd0e84cc9f8e5f7b8373
7
- data.tar.gz: f4319ae71b1a56db17d5066fa9d68092844359aa970eeb96e7a561c3ce32cdea9e441d7c6d90d6f5053d1495f51d95c9c4294c2cca043f21a0e0614bef58a5ab
6
+ metadata.gz: 7288b4836dcd39b6698d0931badc2cbd28823db650a0a19fabe484e18a4b78c64d10bd37f05b608f18c9b4bf32c6aa55add29dd8ed014c0f1b802ae28b256876
7
+ data.tar.gz: 8a466d9fc4a05ab49c10ecc804c8786f89f14e740d8dce1849f2bf2391feb422f8535bc4857909b23e5e00c99e54c23d5ca39834b23dcac57a176c19577aef6e
data/README.md CHANGED
@@ -2,14 +2,17 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/capistrano-slug.svg)](http://badge.fury.io/rb/capistrano-slug)
4
4
 
5
- Basically after a deploy is completed Capistrano packs up it's directory and sends it off for artifact deployment sometime else.
5
+ Basically after a deploy is completed Capistrano packs up it's directory and sends it off for artifact deployment sometime else.
6
6
 
7
- The initial use case is taking a point-in-time snapshot of Capistrano deployment, after every deployment, to use on newly bootstrapped servers.
8
- When a new server bootstraps I want it to have the current code (and config etc) that was deployed by Capistrano. This is achieved downloading and 'installing' the slug on boot of a new server.
7
+ The initial use case is taking a point-in-time snapshot of Capistrano deployment, after every deployment, to use on newly bootstrapped servers.
8
+ When a new server bootstraps I want it to have the current code (and config etc) that was deployed by Capistrano without actually having to do a `cap deploy`.
9
+ This is achieved by downloading and 'installing' the slug on boot of a new server.
9
10
 
10
11
  This enables things like automatic provisioning of new servers but still allows for Capistrano deployments.
11
12
 
12
- Slug work happens on a single server only - the primary of the configured role (default `:all`).
13
+ Slug work happens on a single server only - the primary of the configured role (default `:web`).
14
+
15
+ Here's an example of capistrano-slug in use: https://gist.github.com/rjocoleman/11268563
13
16
 
14
17
 
15
18
  ## Installation
@@ -70,7 +73,7 @@ Creates a slug:
70
73
 
71
74
  ```shell
72
75
  $ cap staging slug:create
73
- INFO Created Slug: foo-application-slug.tar.gz
76
+ INFO Slug: Successfully created foo-application-slug.tar.gz
74
77
  ```
75
78
 
76
79
 
@@ -80,7 +83,7 @@ Uploads a slug to your configured storage:
80
83
 
81
84
  ```shell
82
85
  $ cap staging slug:upload
83
- INFO Uploaded Slug: foo-application-slug.tar.gz
86
+ INFO Slug: Uploaded foo-application-slug.tar.gz
84
87
  ```
85
88
 
86
89
  #### slug:clean
@@ -89,7 +92,7 @@ Removes a slug from your server (not it's storage):
89
92
 
90
93
  ```shell
91
94
  $ cap staging slug:clean
92
- INFO Cleaned Slug: foo-application-slug.tar.gz
95
+ INFO Slug: Cleaned foo-application-slug.tar.gz
93
96
  ```
94
97
 
95
98
 
@@ -99,7 +102,7 @@ $ cap staging slug:clean
99
102
  Configurable options, shown here with defaults:
100
103
 
101
104
  ```ruby
102
- set :slug_role, :all
105
+ set :slug_role, :web
103
106
  set :slug_name, -> { fetch(:application) }
104
107
  set :slug_storage_backend, 's3'
105
108
  set :slug_s3_bucket, nil
@@ -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-slug'
7
- spec.version = '0.1.0'
7
+ spec.version = '0.1.1'
8
8
  spec.authors = ['Robert Coleman']
9
9
  spec.email = ['github@robert.net.nz']
10
10
  spec.summary = %q{Capistrano tasks to make deployment artifacts}
@@ -3,8 +3,10 @@ namespace :slug do
3
3
  desc 'Create Slug'
4
4
  task :create do
5
5
  on primary fetch(:slug_role) do
6
- slug_file = "#{fetch(:tmp_dir)}/#{fetch(:application)}/#{fetch(:slug_name)}-slug.tar.gz"
6
+ slug_dir = "#{fetch(:tmp_dir)}/#{fetch(:application)}"
7
+ slug_file = "#{slug_dir}/#{fetch(:slug_name)}-slug.tar.gz"
7
8
  info "Slug: Creating #{slug_file}"
9
+ execute :mkdir, '-p', slug_dir
8
10
  execute "tar czf #{slug_file} -C #{deploy_path} ."
9
11
  info "Slug: Successfully created #{slug_file}"
10
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-slug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Coleman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-19 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler