pave 0.6.6 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pave +18 -0
- data/lib/pave/concrete.rb +8 -11
- data/lib/pave/database.rb +2 -2
- data/lib/pave/files.rb +22 -0
- data/lib/pave/version.rb +1 -1
- data/lib/pave.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7354b39224a85126b4cd03f209d204818e12f032
|
4
|
+
data.tar.gz: 997767c284e18070281dd72d852a0a4a94ab9d93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5160781b40875dbb819892172762631b3b62d4b08415af1c478519584541a090d992019db291999665c8ded5f56f2416d14299a294ae5732682fd049dd0baf01
|
7
|
+
data.tar.gz: 273e6788ccd1aea9ca961d8b8766fdf568596287a91f5cb39a01f5fad13ac0b12a8d8914d0011c3d38b35b898effb87dbd45a4a92d313e7b10f3a7a210008425
|
data/bin/pave
CHANGED
@@ -205,6 +205,24 @@ command :"db:push" do |c|
|
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
208
|
+
command :"files:pull" do |c|
|
209
|
+
c.syntax = "pave files:pull"
|
210
|
+
c.description = "Download the project's live files directory."
|
211
|
+
c.action do |args|
|
212
|
+
remote = args.first || "live"
|
213
|
+
Pave::Files.pull(remote)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
command :"files:push" do |c|
|
218
|
+
c.syntax = "pave files:push"
|
219
|
+
c.description = "Upload the project's local files directory."
|
220
|
+
c.action do |args|
|
221
|
+
remote = args.first || "live"
|
222
|
+
Pave::Files.push(remote)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
208
226
|
command :"generate:theme" do |c|
|
209
227
|
c.syntax = "pave generate:theme THEME_NAME"
|
210
228
|
c.description = "Set up a blank theme with sass."
|
data/lib/pave/concrete.rb
CHANGED
@@ -48,20 +48,17 @@ module Pave
|
|
48
48
|
def set_up_git
|
49
49
|
say "* Setting up git..."
|
50
50
|
sh "touch #{name}/.gitignore"
|
51
|
-
|
52
|
-
|
51
|
+
gitignored.each{ |ignored| sh "echo '#{ignored}' >> #{name}/.gitignore" }
|
52
|
+
gitkept_folders.each{ |folder| sh "touch #{name}/#{folder}/.keep" }
|
53
53
|
sh "touch #{name}/files/.keep"
|
54
54
|
sh "touch #{name}/updates/.keep"
|
55
55
|
end
|
56
56
|
|
57
|
-
def
|
57
|
+
def gitignored
|
58
58
|
[
|
59
|
-
"files
|
60
|
-
"files
|
61
|
-
"
|
62
|
-
"files/thumbnails/*",
|
63
|
-
"files/tmp/*",
|
64
|
-
"files/trash/*",
|
59
|
+
"files/*",
|
60
|
+
"!files/.keep",
|
61
|
+
".DS_Store",
|
65
62
|
".sass-cache",
|
66
63
|
"stylesheets"
|
67
64
|
]
|
@@ -69,7 +66,7 @@ module Pave
|
|
69
66
|
|
70
67
|
def create_virtual_host
|
71
68
|
say "* Setting up virtual host..."
|
72
|
-
if
|
69
|
+
if sh("sudo pave vh:create #{name}.site") == 0
|
73
70
|
say "Successfully setup virtual host #{name}.site."
|
74
71
|
else
|
75
72
|
say "Virtual host not set up. Run `pave vh:create #{name}.site` to create it."
|
@@ -98,7 +95,7 @@ module Pave
|
|
98
95
|
%w{ blocks config packages files }
|
99
96
|
end
|
100
97
|
|
101
|
-
def
|
98
|
+
def gitkept_folders
|
102
99
|
[
|
103
100
|
:blocks,
|
104
101
|
:elements,
|
data/lib/pave/database.rb
CHANGED
@@ -75,8 +75,8 @@ module Pave
|
|
75
75
|
server = Pave::Remote.server(remote)
|
76
76
|
directory = Pave::Remote.directory(remote)
|
77
77
|
db = remote_db
|
78
|
-
say "Remotely executing #{dump_file(:
|
79
|
-
sh "ssh #{server} \"cd #{directory}/db; gzip -dc #{dump_file(:
|
78
|
+
say "Remotely executing #{dump_file(:local)} on live #{db['name']}"
|
79
|
+
sh "ssh #{server} \"cd #{directory}/db; gzip -dc #{dump_file(:local)} | mysql -u#{db['user']} -p#{db['pass']} #{db['name']}\""
|
80
80
|
end
|
81
81
|
|
82
82
|
def upload(remote="live")
|
data/lib/pave/files.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Pave
|
2
|
+
class Files
|
3
|
+
include Pave::Shell
|
4
|
+
|
5
|
+
def self.push(remote="live")
|
6
|
+
server = Pave::Remote.server(remote)
|
7
|
+
directory = Pave::Remote.directory(remote)
|
8
|
+
sh "scp -r ./files #{server}:#{directory}/local_files;"
|
9
|
+
sh "ssh #{server} 'cd #{directory};
|
10
|
+
mv ./files ./old_files;
|
11
|
+
mv ./local_files ./files && rm -rf ./old_files;'"
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.pull(remote="live")
|
15
|
+
server = Pave::Remote.server(remote)
|
16
|
+
directory = Pave::Remote.directory(remote)
|
17
|
+
sh "scp -r #{server}:#{directory}/files ./remote_files;
|
18
|
+
mv ./files ./old_files;
|
19
|
+
mv ./remote_files ./files && rm -rf ./old_files;"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/pave/version.rb
CHANGED
data/lib/pave.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamon Holmgren
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/pave.rb
|
102
102
|
- lib/pave/concrete.rb
|
103
103
|
- lib/pave/database.rb
|
104
|
+
- lib/pave/files.rb
|
104
105
|
- lib/pave/remote.rb
|
105
106
|
- lib/pave/shell.rb
|
106
107
|
- lib/pave/theme.rb
|
@@ -145,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
146
|
version: '0'
|
146
147
|
requirements: []
|
147
148
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.0.
|
149
|
+
rubygems_version: 2.0.3
|
149
150
|
signing_key:
|
150
151
|
specification_version: 4
|
151
152
|
summary: Provides a set of command line tools for Concrete5.
|