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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6423c30e10bd3cce7b5c9553be520a618a3b1dbc
4
- data.tar.gz: 4d8f1ceccab04847564725e83db66cff7b998904
3
+ metadata.gz: b38e6f594c5ff73c9224b226f7fa0db8e8a25900
4
+ data.tar.gz: e759366eb0b826e4ba782be3206f0a22b1670809
5
5
  SHA512:
6
- metadata.gz: c6f5c361651019a1f86b4753e6359a5ba1c8d1840eccca9ab27139fd73272acf6564c9031471b4bc1a9292ff7492af6f46fb738cff19c89e279244c2762572a2
7
- data.tar.gz: 51d878220d60ea3dab49d55a3ad4e719d99f56311f025dd9b1b1557dc79e2ad8aed398028ae11b913f2427a07e2161f687f0e3ffe82486fcaf4d7bd54237bbfd
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."
@@ -30,8 +30,8 @@ module Pave
30
30
  end
31
31
 
32
32
  def clone_concrete5
33
- c5 = "concrete5.6.2.1"
34
- c5_link = "http://www.concrete5.org/download_file/-/view/58379/8497"
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 = "'{$salt}');\\n\";"
60
+ insert_pattern = "['DB_DATABASE']) . \"');\\n\";"
61
61
  file_insert config_file, insert_pattern, config_customizations
62
62
  end
63
63
 
@@ -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 "scp -r ./files #{server}:#{directory}/local_files;"
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 "scp -r #{server}:#{directory}/files ./remote_files;
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
@@ -9,9 +9,20 @@ module Pave
9
9
  end
10
10
 
11
11
  def watch(browser)
12
- system "pave livereload #{browser} &"
13
- system "sass --watch ./themes/ --style compressed &"
14
- system "coffee -wcj ./themes/#{name}/js/app.js ./themes/#{name}/js/"
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)
@@ -1,3 +1,3 @@
1
1
  module Pave
2
- VERSION = "0.14.0"
2
+ VERSION = "0.14.1"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  @import 'bourbon/bourbon';
2
2
  @import 'neat/neat';
3
- @import 'bitters/bitters';
3
+ @import 'base/base';
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.0
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-05-31 00:00:00.000000000 Z
12
+ date: 2014-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler