rsync-deploy 0.0.16 → 0.1.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: 3717284c1b26d927d0e36696e2539e5964165f75
4
- data.tar.gz: df5757be4cec9ed087d0b3295d187aadb6b9c856
3
+ metadata.gz: d7099df327d321811dbc7056ecf72b193192b8f6
4
+ data.tar.gz: 20ae2c3b2bbf1efc270f990435d868f1c2725c81
5
5
  SHA512:
6
- metadata.gz: 9856b050bbfa3c7f53b0203428d77467054f772ee28772ff2be04314c9cf9b3a9456d395c6edc56c51cc6a153b50c659327f291554eb2c1a5bb0adbd700b5a1a
7
- data.tar.gz: 3159216a6de8b0d6d451080b8f866e318d96a92e0b14d7060f0339fe1780e164ac102ffd9bf28d0a631bfdfe2d044971ce230c561394a636a15b1b3d74363521
6
+ metadata.gz: adbd2c994dd599b7d93e63e36a6136134971cb9380f7fdc0a261583b2c94c4a7889d0b0fbae8c8b5515a500ea52f6ebe1d65b0f459dbae1b092071a163d71e48
7
+ data.tar.gz: 085119d2dbc794f42fb42c92bc98142180341fa9ceea5bd0e483accd4c5b1245003721fa4ae43b7c7eae1bd7b06f514efd62725345fc4e52f0c4e0f97b643e03
data/.gitignore CHANGED
@@ -15,4 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
- .DS_Store
18
+ .DS_Store
19
+ resources/
data/README.md CHANGED
@@ -23,13 +23,16 @@ This will create a `deploy.yml` file that controls how the deployment should tak
23
23
  Fill in your server details. For example:
24
24
 
25
25
  ```
26
- # Server
27
26
  server_name:
28
27
  host: "server.com"
29
28
  user: "user"
29
+ sync: true
30
30
  path:
31
31
  local: "deploy/"
32
32
  remote: "www/"
33
+ exclude:
34
+ - ".DS_Store"
35
+ - "resources/"
33
36
  ```
34
37
 
35
38
  Once your `deploy.yml` is set up, simply deploy by running:
@@ -60,7 +63,7 @@ deploy dev staging production
60
63
 
61
64
  #### deploy download [env...]
62
65
 
63
- Will download from the environment(s) listed. This works in reverse, so files from `path.remote` will go into `path.local`
66
+ Will download from the environment(s) listed. This works in reverse, so files from `path.remote` will go into `path.local`. This will never delete files that aren't on the server, but will likely overwrite your local copies, so be careful.
64
67
 
65
68
  This command is also aliased as `down` and `d`, so it can be run like:
66
69
 
@@ -79,7 +82,7 @@ Will change the name of deployment configuration files. By default they are name
79
82
 
80
83
  #### deploy help
81
84
 
82
- Will output a list of all commands
85
+ Will output a list of all commands.
83
86
 
84
87
 
85
88
  ## Config
@@ -217,6 +220,23 @@ deploy staging production
217
220
 
218
221
  If you don't specify an environment, it's assumed that the first environment in `deploy.yml` should be used. So, with the above configuration, running `deploy` would upload to `staging` by default.
219
222
 
223
+ ## Autocompletion
224
+
225
+ To enable tab-completion based for commands and the current directory's environments, put in your `~/.bash_profile` the following code:
226
+
227
+ ```
228
+ # Add tab completion for `deploy` configurations in current directory
229
+ _dply()
230
+ {
231
+ local cur=${COMP_WORDS[COMP_CWORD]}
232
+ local file=$(cat $(ruby -e "puts Gem::Specification.find_by_name('rsync-deploy').gem_dir + '/lib/config.yml'") | awk '{print $2}')
233
+ if [ -f $file ]; then
234
+ ENVS=$(ls $PWD | grep ":$" $file | sed '/^ /d' | tr -d ':')
235
+ fi
236
+ COMPREPLY=($(compgen -W "${ENVS} install config list help version" -- $cur))
237
+ }
238
+ complete -o "default" -F _dply deploy
239
+ ```
220
240
 
221
241
  ## Mentions
222
242
 
data/bin/deploy CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'deploy'
4
- require 'fileutils'
5
4
 
6
5
  # TODO: Allow creation of environments from install command, for example
7
6
  # `deploy install live dev` would create a file with live and dev
@@ -142,6 +141,5 @@ when 'config'
142
141
  exit
143
142
  end
144
143
 
145
-
146
144
  # Run the deploy straight if nothing else triggered
147
145
  go(false)
@@ -1,5 +1,5 @@
1
1
  module Deploy
2
2
 
3
- VERSION = "0.0.16"
3
+ VERSION = "0.1.0"
4
4
 
5
5
  end
data/lib/deploy.rb CHANGED
@@ -68,7 +68,7 @@ module Deploy
68
68
  end
69
69
 
70
70
  end
71
-
71
+
72
72
  end
73
73
 
74
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsync-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Zurowski