kstrano 0.0.36 → 0.0.37

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.
Files changed (2) hide show
  1. data/lib/kstrano.rb +25 -0
  2. metadata +1 -1
data/lib/kstrano.rb CHANGED
@@ -24,6 +24,19 @@ require 'etc'
24
24
  require 'new_relic/recipes'
25
25
  require 'new_relic/agent'
26
26
 
27
+ namespace :files do
28
+ namespace :move do
29
+
30
+ desc "Rsync uploaded files from online to local"
31
+ task :to_local do
32
+ Kumastrano.say "Copying files"
33
+ log = `rsync -qazhL --progress --del --rsh=/usr/bin/ssh -e "ssh -p #{port}" --exclude "*bak" --exclude "*~" --exclude ".*" #{domain}:#{current_path}/web/uploads/* web/uploads/`
34
+ Kumastrano.say log
35
+ end
36
+
37
+ end
38
+ end
39
+
27
40
  namespace :kuma do
28
41
 
29
42
  namespace :ssh_socket do
@@ -51,6 +64,18 @@ namespace :kuma do
51
64
  Kumastrano.say changelog, ''
52
65
  end
53
66
 
67
+
68
+ namespace :sync do
69
+
70
+ desc "sync the database and rsync the files"
71
+ task :to_local do
72
+ files.move.to_local
73
+ Kumastrano.say "Copying database"
74
+ database.move.to_local
75
+ end
76
+
77
+ end
78
+
54
79
  namespace :fix do
55
80
 
56
81
  desc "Run fixcron for the current project"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kstrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.36
4
+ version: 0.0.37
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: