mina-lock 0.0.4 → 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: f64e9de1f9e6f262c8a8bf459b60dafcb5b248ff
4
- data.tar.gz: a31dbd1ee373a8a8ad066f1ce6169ab500a91dd2
3
+ metadata.gz: e79325b230c4d88696545f6435d49ef9f906e330
4
+ data.tar.gz: 51a78f938e1cbd4b61fecca1d003eb3508baa575
5
5
  SHA512:
6
- metadata.gz: 9226e23bfd8ac7534d14315136f87b6d94e0a724f765adef309f284906f33c04d4d2af083fe58213cb295c8d5f8983789e725dc81bfa49d0bcc72ab1d1af1af2
7
- data.tar.gz: f10b62d82a0772617307a928823248eb7f29db68855450b6ea233bebc19f25329c01d489f002d5184ad52683de7f8192b5d568c0be69c240ae506073c3009c55
6
+ metadata.gz: 7ee93350acba6e659a6cd62a0f1001c2ed09d65acfe4d4f4bd6fb87c7c70da092236a09aac412f4c00ced3d6f32013e206c13f10672d28ea54005338074e614e
7
+ data.tar.gz: 3831f7427f5d751bbf44d04d7d13ef132ba69e2d04be8479421000b0acc63a3cfe0cdcf566f4f0ce2876e3c6ce7cf895e2790bf2038e79f05bdd46b9ec3110f4
data/README.md CHANGED
@@ -41,10 +41,6 @@ mina lock:deployment # Locks the deployment
41
41
  mina unlock:deployment # Unlocks the deployment
42
42
  ```
43
43
 
44
- ## TODOs
45
-
46
- - write in the lock file the name of the user who locked the deployment (reading it from the context)
47
-
48
44
  ## Contributing
49
45
 
50
46
  Feel free to contribute!
@@ -1,10 +1,12 @@
1
1
  require 'mina/bundler'
2
2
 
3
+ set :lock_user, ENV['USER']
4
+
3
5
  namespace :lock do
4
6
  desc 'Lock deployment'
5
7
  task deployment: :environment do
6
8
  queue %[echo '-----> Locking deployment (manually)']
7
- queue! "touch #{deploy_to}/#{current_path}/deployment.lock"
9
+ queue! "echo \"The deployment of this project was locked by #{lock_user} at $(date). Run mina unlock:deployment\" > #{deploy_to}/#{current_path}/deployment.lock"
8
10
  end
9
11
  end
10
12
 
@@ -24,7 +26,7 @@ namespace :fail do
24
26
  FILE=#{deploy_to}/#{current_path}/deployment.lock
25
27
  if [ -f "$FILE" ];
26
28
  then
27
- echo "The deployment of this project is currently locked. File $FILE exist. Run mina unlock:deployment"
29
+ cat $FILE
28
30
  exit 17
29
31
  fi
30
32
  ]
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Lock
3
- VERSION = '0.0.4'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-lock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenzo Sinisi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-21 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler