capistrano-deploylock 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -20
- data/capistrano-deploylock.gemspec +3 -4
- data/lib/capistrano/deploylock/version.rb +1 -1
- data/lib/capistrano/deploylock.rb +15 -0
- metadata +10 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4da11984b48b8987ca85af88e4f17e761589ca26
|
4
|
+
data.tar.gz: 38f7781de350f0d8af8962cc39c664e86fec78a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4441534dec7fa164929b5d1b1b4400a8a599c45149480341b20ac6c51707b78eb88e2590131f5240fa4684438fc13980a92eaaee10a06ff327e1c5a7e5c749e8
|
7
|
+
data.tar.gz: 3143627fe20a632f345ff10d5f3ff624136007527f83d95a761e392082e186b3fb54182f2f76162a86b726baf700a324a0acf55d53d7fc41fe5c94131cc81a25
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/capistrano-deploylock.svg)](http://badge.fury.io/rb/capistrano-deploylock)
|
4
4
|
|
5
|
-
|
5
|
+
lock set to deployed server for 1 day.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -31,41 +31,36 @@ before "deploy:lock:start", "deploy:lock:check"
|
|
31
31
|
before "deploy", "deploy:lock:start"
|
32
32
|
~~~
|
33
33
|
|
34
|
-
##
|
35
|
-
1.
|
36
|
-
1.
|
37
|
-
1.
|
34
|
+
## Why
|
35
|
+
1. to ask people 'Can I deploy this server?', is almost Time-consuming.
|
36
|
+
1. not ask peoble, but sever.
|
37
|
+
1. no lockfile sets, you can always deploy. deployment runs quickly.
|
38
38
|
|
39
|
-
##
|
40
|
-
1. `` cap deploy``
|
41
|
-
1. `` cap deploy:lock:end``
|
39
|
+
## Feauture
|
40
|
+
1. after you run `` cap deploy`` command, lockfile has set to deployed server, then anyone cannot deploy 24h except you.
|
41
|
+
1. but `` cap deploy:lock:end`` command abort lock.
|
42
|
+
1. when deploy, if lockfile exits,
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
1. lockファイルが存在する場合
|
47
|
-
* 自分が作ったやつなら無視して、`` expired_at`` を今から24h後に更新
|
48
|
-
* 他人が作ったやつで`` expired_at > Time.now `` ならロック
|
49
|
-
|
50
|
-
* deploy_lock.ymlにはデプロイしたuser名と, 現在時間の24時間後が、expired_at時間として入る
|
44
|
+
* it is maked by yourself, `` expired_at`` has update to 24h after by now.
|
45
|
+
* it is not maked by yourself, `` expired_at`` not over current time, you can deploy.
|
46
|
+
* it is not maked by yourself, `` expired_at`` over current time, you can deploy.
|
51
47
|
|
52
48
|
|
53
49
|
## cmd
|
54
50
|
|
55
|
-
|
56
|
-
* ロック開始
|
51
|
+
* lock start
|
57
52
|
|
58
53
|
~~~
|
59
54
|
% bundle exec cap $STAGE deploy:lock:start
|
60
55
|
~~~
|
61
56
|
|
62
|
-
*
|
57
|
+
* lock end
|
63
58
|
|
64
59
|
~~~
|
65
60
|
% bundle exec cap $STAGE deploy:lock:end
|
66
61
|
~~~
|
67
62
|
|
68
|
-
*
|
63
|
+
* lock check
|
69
64
|
|
70
65
|
~~~
|
71
66
|
% bundle exec cap $STAGE deploy:lock:check
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Capistrano::Deploylock::VERSION
|
9
9
|
spec.authors = ["tetuyoko"]
|
10
10
|
spec.email = ["tyokoyama53@gmail.com"]
|
11
|
-
spec.summary = %q{
|
12
|
-
spec.description = %q{
|
11
|
+
spec.summary = %q{lock set to deployed server for 1 day.}
|
12
|
+
spec.description = %q{lock set to deployed server for 1 day.}
|
13
13
|
spec.homepage = "https://github.com/tetuyoko/developmentkit"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -23,6 +23,5 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
spec.add_development_dependency "minitest"
|
26
|
-
|
27
|
-
spec.add_dependency "capistrano", '>= 2', '< 3'
|
26
|
+
spec.add_dependency "capistrano", '~> 2.15.5'
|
28
27
|
end
|
@@ -51,6 +51,21 @@ module Capistrano::Deploylock
|
|
51
51
|
puts "この操作は下記のコマンドで取り消しできます。"
|
52
52
|
puts "bundle exedc cap $STAGENAME deploy:lock:end"
|
53
53
|
|
54
|
+
# 対話用
|
55
|
+
# print "\n今日から何日間ロックしますか? [1-10/n]: "
|
56
|
+
# STDOUT.flush
|
57
|
+
# ans= STDIN.gets.chomp
|
58
|
+
# if ["", 'n'].include? ans
|
59
|
+
# puts "[SKIPPED] デプロイロックをスキップしました。"
|
60
|
+
# exit
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# day = ans.to_i
|
64
|
+
# unless (1..10).include?(day)
|
65
|
+
# puts "[FAILED] days must set [1-10/n]"
|
66
|
+
# exit
|
67
|
+
# end
|
68
|
+
|
54
69
|
day = 1
|
55
70
|
expired_at = Time.now + (day * (60 * 60 * 24))
|
56
71
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-deploylock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tetuyoko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,23 +56,17 @@ dependencies:
|
|
56
56
|
name: capistrano
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2'
|
62
|
-
- - "<"
|
59
|
+
- - "~>"
|
63
60
|
- !ruby/object:Gem::Version
|
64
|
-
version:
|
61
|
+
version: 2.15.5
|
65
62
|
type: :runtime
|
66
63
|
prerelease: false
|
67
64
|
version_requirements: !ruby/object:Gem::Requirement
|
68
65
|
requirements:
|
69
|
-
- - "
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '2'
|
72
|
-
- - "<"
|
66
|
+
- - "~>"
|
73
67
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
75
|
-
description:
|
68
|
+
version: 2.15.5
|
69
|
+
description: lock set to deployed server for 1 day.
|
76
70
|
email:
|
77
71
|
- tyokoyama53@gmail.com
|
78
72
|
executables: []
|
@@ -112,11 +106,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
106
|
version: '0'
|
113
107
|
requirements: []
|
114
108
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.4.
|
109
|
+
rubygems_version: 2.4.1
|
116
110
|
signing_key:
|
117
111
|
specification_version: 4
|
118
|
-
summary:
|
112
|
+
summary: lock set to deployed server for 1 day.
|
119
113
|
test_files:
|
120
114
|
- test/minitest_helper.rb
|
121
115
|
- test/test_capistrano.rb
|
122
116
|
- test/test_capistrano/deploylock.rb
|
117
|
+
has_rdoc:
|