capistrano-net_storage 0.2.0 → 0.2.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: 59881a14b8980789fa4ef926786337ade0361eac
4
- data.tar.gz: 0214927bf85b177f6ea64492c58cceeb84faab98
3
+ metadata.gz: 35f517a8f2ab7cee137f213f5d5877232ba6af5c
4
+ data.tar.gz: 91078627bad46801f58f3dc5b0071c65cb45f836
5
5
  SHA512:
6
- metadata.gz: 21d9e21f3c3b016195d1268f8df7984d8312238bc5f378360157504892bc84a6395344f57a07c5181b7dc60c7fd22960d6c91ec143e3f9e2f1f6e406ade43e49
7
- data.tar.gz: 67a53aa1569438d92ee71f7af8b44c153afce5e61412015ee4951e55043baeebec5044cd681f4aa31a2e6a5e92e4f9f505323aaa8a3b56c4477ea0c80912e479
6
+ metadata.gz: 85eba6d6781acbcafd6783f1ce0ee8c5c3d497b8483e9791b99b213397ec657219dc29d394ec415830377128613d691fb72eac1c150267706e3b62785d766a6d
7
+ data.tar.gz: 8a0b154bff60805eb4981aad7db737b806d2a9985316f153a2d5d2b2ba57e04594b4495edb7fb95990c6759c586f89ae5ce66837c872963b2e38361c4d725b03
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.2.1 (2017/4/21)
2
+
3
+ Internal Change:
4
+
5
+ - Use `run_locally` instead of `on :local` (#1)
6
+
1
7
  ## 0.2.0 (2017/4/12)
2
8
 
3
9
  Initial release.
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Gem Version](https://badge.fury.io/rb/capistrano-net_storage.svg)](https://badge.fury.io/rb/capistrano-net_storage)
2
+ [![Build Status](https://travis-ci.org/DeNADev/capistrano-net_storage.svg?branch=master)](https://travis-ci.org/DeNADev/capistrano-net_storage)
1
3
  # Capistrano::NetStorage
2
4
 
3
5
  **Capistrano::NetStorage** is a [Capistrano](http://capistranorb.com/) plugin to deploy application
@@ -22,11 +24,6 @@ This library goes following procedures as _capistrano tasks_:
22
24
  3. Download the archive from _remote storage_ on application servers.
23
25
  * This task is executed in parallel way.
24
26
 
25
- NOTE:
26
-
27
- * You need to prepare a _transport class_ to execute upload/download operation suitable for
28
- _remote storage_. It should inherit `Capistrano::NetStorage::Transport::Base` class.
29
-
30
27
  ## Installation
31
28
 
32
29
  Add this line to your application's Gemfile:
@@ -66,7 +63,10 @@ Set Capistrano variables by `set name, value`.
66
63
 
67
64
  Here are available plugins list which serves as `:net_storage_transport`:
68
65
 
69
- - [Capistrano::NetStorage::S3::Transport](https://github.com/DeNADev/capistrano-net_storage-s3)
66
+ - [Capistrano::NetStorage::S3::Transport](https://github.com/DeNADev/capistrano-net_storage-s3) for [Amazon S3](https://aws.amazon.com/s3/)
67
+
68
+ If you wish a plugin for other types of _remote storage_, you can develop it. It should inherit
69
+ `Capistrano::NetStorage::Transport::Base` class.
70
70
 
71
71
  ## Usage
72
72
 
@@ -81,7 +81,7 @@ require 'capistrano/deploy'
81
81
 
82
82
  # Includes tasks from other gems included in your Gemfile
83
83
  require 'capistrano/net_storage'
84
- # Load transport plugin
84
+ # Load transport plugin for Capistrano::NetStorage
85
85
  # require 'capistrano/net_storage/s3'
86
86
  ```
87
87
 
@@ -113,3 +113,6 @@ Available as open source under the terms of the [MIT License](http://opensource.
113
113
 
114
114
  Copyright (c) 2017 DeNA Co., Ltd., IKEDA Kiyoshi
115
115
 
116
+ ## Special Thanks
117
+
118
+ The previous version of this program was originally developed by @bobpp.
@@ -6,14 +6,14 @@ class Capistrano::NetStorage::Archiver::TarGzip < Capistrano::NetStorage::Archiv
6
6
  include Capistrano::NetStorage::Utils
7
7
 
8
8
  def check
9
- on :local do
9
+ run_locally do
10
10
  execute :which, 'tar'
11
11
  end
12
12
  end
13
13
 
14
14
  def archive
15
15
  c = config
16
- on :local do
16
+ run_locally do
17
17
  within c.local_release_path do
18
18
  execute :tar, 'czf', c.local_archive_path, '.'
19
19
  end
@@ -6,14 +6,14 @@ class Capistrano::NetStorage::Archiver::Zip < Capistrano::NetStorage::Archiver::
6
6
  include Capistrano::NetStorage::Utils
7
7
 
8
8
  def check
9
- on :local do
9
+ run_locally do
10
10
  execute :which, 'zip'
11
11
  end
12
12
  end
13
13
 
14
14
  def archive
15
15
  c = config
16
- on :local do
16
+ run_locally do
17
17
  within c.local_release_path do
18
18
  execute :zip, c.local_archive_path, '-r', '.'
19
19
  end
@@ -7,7 +7,7 @@ module Capistrano
7
7
  include Capistrano::NetStorage::Utils
8
8
 
9
9
  def check
10
- on :local do
10
+ run_locally do
11
11
  execute :which, 'bundle'
12
12
  end
13
13
  end
@@ -15,7 +15,7 @@ module Capistrano
15
15
  # Do bundle install locally. Installed gems are to be included to the release.
16
16
  def install
17
17
  c = config
18
- on :local do
18
+ run_locally do
19
19
  local_release_bundle_path = c.local_release_path.join('vendor', 'bundle')
20
20
  execute :mkdir, '-p', local_release_bundle_path
21
21
  execute :mkdir, '-p', "#{c.local_release_path}/.bundle"
@@ -11,7 +11,7 @@ module Capistrano
11
11
  # @see Capistrano::NetStorage::Config#local_releases_path
12
12
  def cleanup_local_release
13
13
  c = config
14
- on :local do
14
+ run_locally do
15
15
  releases = capture(:ls, '-xtr', c.local_releases_path).split
16
16
  # Contains archive files and extracted directories
17
17
  if releases.count > fetch(:keep_releases) * 2
@@ -3,14 +3,14 @@ require 'capistrano/net_storage/scm/base'
3
3
  # Internal SCM class for Git repository
4
4
  class Capistrano::NetStorage::SCM::Git < Capistrano::NetStorage::SCM::Base
5
5
  def check
6
- on :local do
6
+ run_locally do
7
7
  execute :git, 'ls-remote', repo_url, 'HEAD'
8
8
  end
9
9
  end
10
10
 
11
11
  def clone
12
12
  c = config
13
- on :local do
13
+ run_locally do
14
14
  if File.exist?("#{c.local_mirror_path}/HEAD")
15
15
  info t(:mirror_exists, at: c.local_mirror_path)
16
16
  else
@@ -21,7 +21,7 @@ class Capistrano::NetStorage::SCM::Git < Capistrano::NetStorage::SCM::Base
21
21
 
22
22
  def update
23
23
  c = config
24
- on :local do
24
+ run_locally do
25
25
  within c.local_mirror_path do
26
26
  execute :git, :remote, :update
27
27
  end
@@ -31,7 +31,7 @@ class Capistrano::NetStorage::SCM::Git < Capistrano::NetStorage::SCM::Base
31
31
  def set_current_revision
32
32
  return if fetch(:current_revision)
33
33
  c = config
34
- on :local do
34
+ run_locally do
35
35
  within c.local_mirror_path do
36
36
  set :current_revision, capture(:git, "rev-parse #{fetch(:branch)}")
37
37
  end
@@ -40,7 +40,7 @@ class Capistrano::NetStorage::SCM::Git < Capistrano::NetStorage::SCM::Base
40
40
 
41
41
  def prepare_archive
42
42
  c = config
43
- on :local do
43
+ run_locally do
44
44
  execute :mkdir, '-p', c.local_release_path
45
45
 
46
46
  within c.local_mirror_path do
@@ -28,7 +28,7 @@ module Capistrano
28
28
  if c.upload_files_by_rsync?
29
29
  Parallel.each(c.servers, in_threads: c.max_parallels) do |host|
30
30
  ssh = build_ssh_command(host)
31
- on :local do
31
+ run_locally do
32
32
  execute :rsync, "-az --rsh='#{ssh}' #{src} #{host}:#{dest}"
33
33
  end
34
34
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module NetStorage
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -94,7 +94,7 @@ namespace :net_storage do
94
94
  config.local_releases_path,
95
95
  ]
96
96
  dirs << config.local_bundle_path unless config.skip_bundle?
97
- on :local do
97
+ run_locally do
98
98
  dirs.each { |dir| execute :mkdir, '-p', dir }
99
99
  end
100
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-net_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - progrhyme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-12 00:00:00.000000000 Z
11
+ date: 2017-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano