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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb6c57e60fd26e74432dce9a91e0d3356b623a5c
4
- data.tar.gz: a4b44a64b340ac14e56e42cb69070a1f68f25676
3
+ metadata.gz: 4da11984b48b8987ca85af88e4f17e761589ca26
4
+ data.tar.gz: 38f7781de350f0d8af8962cc39c664e86fec78a6
5
5
  SHA512:
6
- metadata.gz: 3f0e0af14d52dae19ed6e29d7a79fe43475b2d048321b39826f346e2484f60a6d4598bd59b0c89ad0a9945da8a768083ce4292349ac2da6c6da3c78bb9e5c653
7
- data.tar.gz: d10a993959109063058bf1f1fd5d349c192151137c9e527eb7135e0e56af9bad095610007c792ccde8f2850b5b48a3b8ca6267b5ecdb8f7976497f9a99ca18a4
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. 要はlockファイルさえなければあらゆる環境に自由にデプロイしたい. lockファイル作っとかないほうが悪い状態が効率が良い
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`` 後、 自分以外のユーザが24hデプロイできないようになる
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
- 1. `` cap deploy`` 時にdeploy_lock.ymlファイルをshared/systemに作成(`` cap deploy:lock:start`` フック)
45
- 1. `` cap deploy:lock:start `` 時にdeploy_lock.ymlファイルがshared/systemにないか確認(`` cap deploy:lock:start`` フック)
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{capistrano deploy lock}
12
- spec.description = %q{capistrano deploy lock}
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
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Deploylock
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  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.2
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-05 00:00:00.000000000 Z
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: '3'
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: '3'
75
- description: capistrano deploy lock
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.4
109
+ rubygems_version: 2.4.1
116
110
  signing_key:
117
111
  specification_version: 4
118
- summary: capistrano deploy lock
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: