pave 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pave +9 -0
- data/lib/pave/concrete.rb +3 -3
- data/lib/pave/files.rb +15 -8
- data/lib/pave/theme.rb +14 -3
- data/lib/pave/version.rb +1 -1
- data/templates/themes/blank/css/styles.scss +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b38e6f594c5ff73c9224b226f7fa0db8e8a25900
|
4
|
+
data.tar.gz: e759366eb0b826e4ba782be3206f0a22b1670809
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f996742b54dc74322a724b36a6f3a8da05a66a4af655b4b0c3101545b232a27bc341557866fe0fed7e3ea172b035761a4c944b0c746c055e887d473d1d8b64b7
|
7
|
+
data.tar.gz: 7d6490bee57bfc713ad40cd351add931f01080e9589c987de872503ccfe5a42e6fece131a4e5c4813eabc921d113b4d8539c70a9b40ab01e72eb303e29bb6ef9
|
data/bin/pave
CHANGED
@@ -242,6 +242,15 @@ command :"files:push" do |c|
|
|
242
242
|
end
|
243
243
|
end
|
244
244
|
|
245
|
+
command :"files:sync" do |c|
|
246
|
+
c.syntax = "pave files:sync"
|
247
|
+
c.description = "Syncronize local and remote files directories."
|
248
|
+
c.action do |args|
|
249
|
+
remote = args.first || "live"
|
250
|
+
Pave::Files.sync(remote)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
245
254
|
command :"generate:theme" do |c|
|
246
255
|
c.syntax = "pave generate:theme THEME_NAME"
|
247
256
|
c.description = "Set up a blank theme with Sass and CoffeeScript support."
|
data/lib/pave/concrete.rb
CHANGED
@@ -30,8 +30,8 @@ module Pave
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def clone_concrete5
|
33
|
-
c5 = "concrete5.6.
|
34
|
-
c5_link = "http://www.concrete5.org/download_file/-/view/
|
33
|
+
c5 = "concrete5.6.3.1"
|
34
|
+
c5_link = "http://www.concrete5.org/download_file/-/view/66159/8497/"
|
35
35
|
unless File.exists?(File.join(Dir.home, ".pave/#{c5}.zip"))
|
36
36
|
say "* Downloading #{c5}..."
|
37
37
|
sh "curl #{c5_link} > ~/.pave/#{c5}.zip"
|
@@ -57,7 +57,7 @@ module Pave
|
|
57
57
|
|
58
58
|
def add_config_customizations
|
59
59
|
config_file = "#{name}/concrete/core/controllers/single_pages/install.php"
|
60
|
-
insert_pattern = "'
|
60
|
+
insert_pattern = "['DB_DATABASE']) . \"');\\n\";"
|
61
61
|
file_insert config_file, insert_pattern, config_customizations
|
62
62
|
end
|
63
63
|
|
data/lib/pave/files.rb
CHANGED
@@ -2,27 +2,34 @@ module Pave
|
|
2
2
|
class Files
|
3
3
|
include Pave::Shell
|
4
4
|
|
5
|
+
def self.exclusions
|
6
|
+
" --exclude 'files/tmp' --exclude 'files/cache' "
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.flags
|
10
|
+
" -uazh -e ssh --progress "
|
11
|
+
end
|
12
|
+
|
5
13
|
def self.clear_cache
|
6
14
|
sh "rm -rf ./files/tmp/*; rm -rf ./files/cache/*;"
|
7
15
|
end
|
8
16
|
|
9
17
|
def self.push(remote="live")
|
10
|
-
clear_cache
|
11
18
|
server = Pave::Remote.server(remote)
|
12
19
|
directory = Pave::Remote.directory(remote)
|
13
|
-
sh "
|
14
|
-
sh "ssh #{server} 'cd #{directory};
|
15
|
-
mv ./files ./old_files;
|
16
|
-
mv ./local_files ./files && rm -rf ./old_files;'"
|
20
|
+
sh "rsync #{flags} #{exclusions} ./files/* #{server}:#{directory}/files/*"
|
17
21
|
end
|
18
22
|
|
19
23
|
def self.pull(remote="live")
|
20
24
|
server = Pave::Remote.server(remote)
|
21
25
|
directory = Pave::Remote.directory(remote)
|
22
|
-
sh "
|
23
|
-
mv ./files ./old_files;
|
24
|
-
mv ./remote_files ./files && rm -rf ./old_files;"
|
26
|
+
sh "rsync #{flags} #{exclusions} #{server}:#{directory}/files/* ./files/*"
|
25
27
|
clear_cache
|
26
28
|
end
|
29
|
+
|
30
|
+
def self.sync(remote="live")
|
31
|
+
pull(remote)
|
32
|
+
push(remote)
|
33
|
+
end
|
27
34
|
end
|
28
35
|
end
|
data/lib/pave/theme.rb
CHANGED
@@ -9,9 +9,20 @@ module Pave
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def watch(browser)
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
processes = []
|
13
|
+
processes << Process.spawn("pave livereload #{browser}", out: $stdout, err: $stderr)
|
14
|
+
processes << Process.spawn("sass --watch ./themes/ --style compressed", out: $stdout, err: $stderr)
|
15
|
+
processes << Process.spawn("coffee -wcj ./themes/#{name}/js/app.js ./themes/#{name}/js/", out: $stdout, err: $stderr)
|
16
|
+
|
17
|
+
Signal.trap("INT") do
|
18
|
+
processes.map do |pid|
|
19
|
+
Process.kill("INT", pid)
|
20
|
+
end
|
21
|
+
|
22
|
+
exit!
|
23
|
+
end
|
24
|
+
|
25
|
+
Process.wait processes.sample # Just wait on a random process
|
15
26
|
end
|
16
27
|
|
17
28
|
def initialize(name)
|
data/lib/pave/version.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.14.
|
4
|
+
version: 0.14.1
|
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: 2014-
|
12
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|