theme-juice 0.15.0 → 0.16.0

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: bc9f5f43c93ff5eb88affc110a83189271692ef3
4
- data.tar.gz: f9990180256f556f432288ea9a6a891a23c6ae84
3
+ metadata.gz: 3c6fd4c46c15c5350fc438862375cefa9ee727cf
4
+ data.tar.gz: f4e00958d8c72788e1b96deca20621c8c41c2eec
5
5
  SHA512:
6
- metadata.gz: 4ca6c2ae7933ec894ce5f09d70bd70cf4c506fdc7819887b2203b62d37e2007eec9334e86524241c9879a61b42a29bf00728e8f397105f4a064ab7c4bfe6b60b
7
- data.tar.gz: e4480e92a7f07ea34136606c07efd8c39027d20719f49a707ddeb78ffaf8b99b589f080bd32b5f13a3000ece57ec2563b5412cd969230099d38ab6305ce82b05
6
+ metadata.gz: c060dc006706bf7a3f03627ced4658105eed5967405f7a38428a8aba89f12f995f9bc43f4518dc1f63c6ec1cbf4022577787b6dfb447f42981e55d12d89c252d
7
+ data.tar.gz: 850dc79e8e571ad4263f300f95052b27f6360c979963d06ca5e394bc925370b67fad2f53d2b77c421ff4d07e54b02590d481f697ed58b05be303df3d1b997fd4
@@ -81,12 +81,20 @@ Pull the current \fBstage\fR\'s uploads folder from the passed \fBstage\fR to th
81
81
  Push the uploads folder from the development environment to the passed \fBstage\fR\'s uploads folder
82
82
  .
83
83
  .TP
84
- \fBfile:pull\fR=\fIfile\fR
85
- Pull an arbitrary relative file from the passed \fBstage\fR to the development environment\.
84
+ \fBfile:pull\fR=\fIpath\fR
85
+ Pull a relative file from the passed \fBstage\fR to the development environment\.
86
86
  .
87
87
  .TP
88
- \fBfile:push\fR=\fIfile\fR
89
- Push an arbitrary relative file from the development environment to the passed \fBstage\fR\.
88
+ \fBfile:push\fR=\fIpath\fR
89
+ Push a relative file from the development environment to the passed \fBstage\fR\.
90
+ .
91
+ .TP
92
+ \fBdir:pull\fR=\fIpath\fR
93
+ Recursively pull a relative directory from the passed \fBstage\fR to the development environment\.
94
+ .
95
+ .TP
96
+ \fBdir:push\fR=\fIpath\fR
97
+ Recursively push a relative directory from the development environment to the passed \fBstage\fR\.
90
98
  .
91
99
  .SH "CONFIG FILE"
92
100
  The YAML Juicefile(5) configuration may be used to store deployment\-related settings\. Below you will find the various block sequences you may use to define your project\'s deployment settings\. All of these will be passed to capistrano(1) to invoke a deployment\.
@@ -72,13 +72,21 @@ SECONDARY COMMANDS
72
72
  Push the uploads folder from the development environment to the
73
73
  passed stage's uploads folder
74
74
 
75
- file:pull=file
76
- Pull an arbitrary relative file from the passed stage to the
77
- development environment.
75
+ file:pull=path
76
+ Pull a relative file from the passed stage to the development
77
+ environment.
78
78
 
79
- file:push=file
80
- Push an arbitrary relative file from the development environment
81
- to the passed stage.
79
+ file:push=path
80
+ Push a relative file from the development environment to the
81
+ passed stage.
82
+
83
+ dir:pull=path
84
+ Recursively pull a relative directory from the passed stage to
85
+ the development environment.
86
+
87
+ dir:push=path
88
+ Recursively push a relative directory from the development envi-
89
+ ronment to the passed stage.
82
90
 
83
91
  CONFIG FILE
84
92
  The YAML Juicefile(5) configuration may be used to store deploy-
@@ -0,0 +1,24 @@
1
+ namespace :dir do
2
+
3
+ desc "Recursively push directory to remote"
4
+ task :push, [:dir] do |t, args|
5
+ on roles(:app) do
6
+ if File.exist? args[:dir]
7
+ upload! args[:dir], release_path.join(Pathname.new(args[:dir]).parent), {
8
+ recursive: true
9
+ }
10
+ else
11
+ error "Could not locate local directory '#{args[:dir]}'"
12
+ end
13
+ end
14
+ end
15
+
16
+ desc "Recursively pull directory from remote"
17
+ task :pull, [:dir] do |t, args|
18
+ on roles(:app) do
19
+ download! release_path.join(args[:dir]), Pathname.new(args[:dir]).parent, {
20
+ recursive: true
21
+ }
22
+ end
23
+ end
24
+ end
@@ -6,6 +6,11 @@ namespace :file do
6
6
  task :push, [:file] do |t, args|
7
7
  on roles(:app) do
8
8
  if File.exist? args[:file]
9
+
10
+ within release_path do
11
+ execute :mkdir, "-p", File.dirname(args[:file])
12
+ end
13
+
9
14
  upload! args[:file], release_path.join(args[:file])
10
15
  else
11
16
  error "Could not locate local file '#{args[:file]}'"
@@ -16,6 +21,11 @@ namespace :file do
16
21
  desc "Pull file from remote"
17
22
  task :pull, [:file] do |t, args|
18
23
  on roles(:app) do
24
+
25
+ run_locally do
26
+ execute :mkdir, "-p", File.dirname(args[:file])
27
+ end
28
+
19
29
  download! release_path.join(args[:file]), args[:file]
20
30
  end
21
31
  end
@@ -29,7 +29,7 @@ module ThemeJuice
29
29
  @io.log "Loading Capistrano tasks"
30
30
 
31
31
  tasks_dir = "#{File.dirname(__FILE__)}/capistrano"
32
- tasks = %w[db uploads file env rsync]
32
+ tasks = %w[db uploads file dir env rsync]
33
33
 
34
34
  tasks.each { |task| load "#{tasks_dir}/#{task}.rb" }
35
35
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.15.0"
4
+ VERSION = "0.16.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme-juice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2015-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -158,6 +158,7 @@ files:
158
158
  - lib/theme-juice/task.rb
159
159
  - lib/theme-juice/tasks/apache.rb
160
160
  - lib/theme-juice/tasks/capistrano/db.rb
161
+ - lib/theme-juice/tasks/capistrano/dir.rb
161
162
  - lib/theme-juice/tasks/capistrano/env.rb
162
163
  - lib/theme-juice/tasks/capistrano/file.rb
163
164
  - lib/theme-juice/tasks/capistrano/rsync.rb