capistrano-net_storage 0.2.3 → 0.3.0

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: 53e177ed090b97af1d033a7dc1fdea410c46a833
4
- data.tar.gz: 71d74fb709896d1b665bc38baf2556c42ac4bf90
3
+ metadata.gz: 84584457a37f5cd13b2380cb4d16b531ceff8c9b
4
+ data.tar.gz: 38816e35039013bceec5d90e583c4b6d8e9dc26e
5
5
  SHA512:
6
- metadata.gz: 432d338ec48a2ca45a2e4916a5f4d339dccb6602f862e83b513a4b800e4ce6a5ffdd1da0544f29c1d9a07a977cc638fd46fb84290e800afd73eeb03d9ab4b1ff
7
- data.tar.gz: a51eac7a59b4ffda32de534158ea09f63f1e837aa568a470181a55de143242134a58651159ed4a5fb2907e602f4ba0c3c1c5dd3df663e95891d7494c652ba3f4
6
+ metadata.gz: 06642197adfd2a84cd19b4fc94a364283281e537f11e04e188d3ac18fd95f2ab4085b9fbf80b1e2bd7073897f316d0e77ee63e21f4386bf478c8a5f6bd4da8fb
7
+ data.tar.gz: e60acd1bdbd64fb0b6714cc150491427beb8a3f33d8f411eeb5ef85f1aa8cc90e7621386ef7869048f19aa6026a690c1dd3d91ee41a5eb6fa86d1c59c3b6ec64
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.3.0 (2017/7/14)
2
+
3
+ Improve:
4
+
5
+ - Support capistrano's SCM plugin system (#4) @progrhyme
6
+
1
7
  ## 0.2.3 (2017/5/10)
2
8
 
3
9
  Minor Modify:
data/README.md CHANGED
@@ -46,7 +46,7 @@ Set Capistrano variables by `set name, value`.
46
46
 
47
47
  Name | Default | Description
48
48
  ------|---------|------------
49
- `:scm` | `nil` | Set `:net_storage`
49
+ `:scm` | `nil` | Set `:net_storage` for capistrano before v3.7
50
50
  `:branch` | `master` | Target branch of SCM to release
51
51
  `:keep_releases` | `5` | Numbers to keep released versions
52
52
  `:net_storage_transport` | `nil` | Transport class for _remote storage_
@@ -80,7 +80,13 @@ require 'capistrano/setup'
80
80
  require 'capistrano/deploy'
81
81
 
82
82
  # Includes tasks from other gems included in your Gemfile
83
- require 'capistrano/net_storage'
83
+ if Gem::Version.new(Capistrano::VERSION) < Gem::Version.new('3.7.0')
84
+ require 'capistrano/net_storage'
85
+ else
86
+ require "capistrano/net_storage/plugin"
87
+ install_plugin Capistrano::NetStorage::Plugin
88
+ end
89
+
84
90
  # Load transport plugin for Capistrano::NetStorage
85
91
  # require 'capistrano/net_storage/s3'
86
92
  ```
@@ -88,7 +94,9 @@ require 'capistrano/net_storage'
88
94
  Edit your `config/deploy.rb`:
89
95
 
90
96
  ```ruby
91
- set :scm, :net_storage
97
+ if Gem::Version.new(Capistrano::VERSION) < Gem::Version.new('3.7.0')
98
+ set :scm, :net_storage
99
+ end
92
100
  set :net_storage_transport, Your::TransportPluginModule
93
101
  # set :net_storage_transport, Capistrano::NetStorage::S3::Transport # w/ capistrano-net_storage-s3
94
102
  # set :net_storage_config_files, [your_config_files]
@@ -101,12 +109,6 @@ set :net_storage_transport, Your::TransportPluginModule
101
109
  You can see typical usage of this library by
102
110
  [capistrano-net_storage_demo](https://github.com/DeNADev/capistrano-net_storage_demo).
103
111
 
104
- ## TODO
105
-
106
- * Support
107
- [Capistrano SCM plugin system](http://capistranorb.com/documentation/advanced-features/custom-scm/)
108
- introduced in Capistrano v3.7
109
-
110
112
  ## License
111
113
 
112
114
  Available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,14 @@
1
+ require 'capistrano/scm/plugin'
2
+ require 'capistrano/net_storage'
3
+
4
+ module Capistrano
5
+ module NetStorage
6
+ class Plugin < ::Capistrano::SCM::Plugin
7
+ def register_hooks
8
+ after 'deploy:new_release_path', 'net_storage:create_release'
9
+ before 'deploy:check', 'net_storage:check'
10
+ before 'deploy:set_current_revision', 'net_storage:set_current_revision'
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module NetStorage
3
- VERSION = '0.2.3'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  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.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - progrhyme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-10 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -123,6 +123,7 @@ files:
123
123
  - lib/capistrano/net_storage/config.rb
124
124
  - lib/capistrano/net_storage/coordinator.rb
125
125
  - lib/capistrano/net_storage/error.rb
126
+ - lib/capistrano/net_storage/plugin.rb
126
127
  - lib/capistrano/net_storage/scm/base.rb
127
128
  - lib/capistrano/net_storage/scm/git.rb
128
129
  - lib/capistrano/net_storage/transport/base.rb