platinum-deployer 0.2.8 → 0.2.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dacdf8eeb5e68ca36155608de081883062ba96e4
4
- data.tar.gz: afce813801e394f83fb09c33e578a62d47520350
3
+ metadata.gz: c1ff324a17358c77eda7da632621c67bec0d2ac3
4
+ data.tar.gz: 4110761f19c2133e91ab1aaabb83ceb3aa0f3ba0
5
5
  SHA512:
6
- metadata.gz: e4b2cbb6c62530fef2bb0144bbd9d00f15ff8cd61567b3c00496a0c4b4fd7a424e9e2611486e62cb517eae4b44e417d9958a72bdb4a536a213cff4ef356d7720
7
- data.tar.gz: 56b8ff89a9fac88a955f0b0477980e312757480bd0242086575756d201b1bd68ac1344abf67b7539d80aaad30f872a3dca29be0420d6f257c25dd30d86cf828f
6
+ metadata.gz: cfd5d8db2b78987aef48eb31743c568448f041705ca3a8979e18c0d7269986e54c4a1758e08509bafd16572e10003fd3a02f72a06b4986b5b97be7a6f37a4043
7
+ data.tar.gz: a34a6631f0861e971efa1a87052ad96f1abb9eda42e920233b75deb0384b2297e9374ae275649fe31ca34fcb0518eb9c9e7211783011785c3f8dd114faa65330
data/Session.vim CHANGED
@@ -34,11 +34,11 @@ set nosplitbelow
34
34
  set nosplitright
35
35
  wincmd t
36
36
  set winheight=1 winwidth=1
37
- exe '1resize ' . ((&lines * 28 + 30) / 60)
38
- exe 'vert 1resize ' . ((&columns * 52 + 92) / 185)
39
- exe '2resize ' . ((&lines * 28 + 30) / 60)
40
- exe 'vert 2resize ' . ((&columns * 132 + 92) / 185)
41
- exe '3resize ' . ((&lines * 29 + 30) / 60)
37
+ exe '1resize ' . ((&lines * 23 + 25) / 50)
38
+ exe 'vert 1resize ' . ((&columns * 52 + 69) / 138)
39
+ exe '2resize ' . ((&lines * 23 + 25) / 50)
40
+ exe 'vert 2resize ' . ((&columns * 85 + 69) / 138)
41
+ exe '3resize ' . ((&lines * 24 + 25) / 50)
42
42
  argglobal
43
43
  setlocal fdm=manual
44
44
  setlocal fde=0
@@ -49,7 +49,7 @@ setlocal fml=1
49
49
  setlocal fdn=20
50
50
  setlocal fen
51
51
  silent! normal! zE
52
- let s:l = 3 - ((2 * winheight(0) + 14) / 28)
52
+ let s:l = 3 - ((2 * winheight(0) + 11) / 23)
53
53
  if s:l < 1 | let s:l = 1 | endif
54
54
  exe s:l
55
55
  normal! zt
@@ -67,7 +67,7 @@ setlocal fml=1
67
67
  setlocal fdn=20
68
68
  setlocal fen
69
69
  silent! normal! zE
70
- let s:l = 9 - ((6 * winheight(0) + 14) / 28)
70
+ let s:l = 9 - ((5 * winheight(0) + 11) / 23)
71
71
  if s:l < 1 | let s:l = 1 | endif
72
72
  exe s:l
73
73
  normal! zt
@@ -85,19 +85,18 @@ setlocal fml=1
85
85
  setlocal fdn=20
86
86
  setlocal fen
87
87
  silent! normal! zE
88
- let s:l = 457 - ((7 * winheight(0) + 14) / 29)
88
+ let s:l = 580 - ((18 * winheight(0) + 12) / 24)
89
89
  if s:l < 1 | let s:l = 1 | endif
90
90
  exe s:l
91
91
  normal! zt
92
- 457
93
- normal! 042|
92
+ 580
93
+ normal! 011|
94
94
  wincmd w
95
- 3wincmd w
96
- exe '1resize ' . ((&lines * 28 + 30) / 60)
97
- exe 'vert 1resize ' . ((&columns * 52 + 92) / 185)
98
- exe '2resize ' . ((&lines * 28 + 30) / 60)
99
- exe 'vert 2resize ' . ((&columns * 132 + 92) / 185)
100
- exe '3resize ' . ((&lines * 29 + 30) / 60)
95
+ exe '1resize ' . ((&lines * 23 + 25) / 50)
96
+ exe 'vert 1resize ' . ((&columns * 52 + 69) / 138)
97
+ exe '2resize ' . ((&lines * 23 + 25) / 50)
98
+ exe 'vert 2resize ' . ((&columns * 85 + 69) / 138)
99
+ exe '3resize ' . ((&lines * 24 + 25) / 50)
101
100
  tabnext 1
102
101
  if exists('s:wipebuf')
103
102
  silent exe 'bwipe ' . s:wipebuf
data/exe/platinum CHANGED
@@ -261,6 +261,7 @@ end
261
261
 
262
262
  def compile_source!
263
263
  if @options[:skip_compile]; log_info 'Skipping compilation.'; return true end
264
+ ensure_mounted_as_satellite! if satellite_mode_enabled?
264
265
  log_info 'Compiling project source...'
265
266
  return false unless compile_coffeescript_files! && compile_haml_files!
266
267
  log_success 'Compilation complete!'; true
@@ -512,12 +513,38 @@ def list_things!
512
513
  end
513
514
 
514
515
  def create_satellite!
516
+ require_satellite_app_src_set!
515
517
  log_info 'Creating satellite installation...'
516
518
  log_success 'Satellite installation created!'; puts
517
519
  end
518
520
  def update_satellite!
519
- satellite_opts = @options[:satellite_mode]
520
- unless satellite_opts[:enabled]
521
+ require_satellite_mode_enabled!
522
+ require_satellite_app_src_set!
523
+ log_info 'Updating satellite installation...'; puts
524
+
525
+ log_info 'Unmounting current app_src...'
526
+ app_src_fullpath = File.expand_path File.join(Dir.pwd, 'app_src')
527
+ system %[diskutil unmount "#{app_src_fullpath}"] if mounted_as_satellite?
528
+ log_info 'Pulling changes from Git...'
529
+ git = Git.open '.'
530
+ git.reset_hard
531
+ git.pull
532
+ log_info 'Remounting app_src to remote source...'
533
+ FileUtils.rm_rf File.join(Dir.pwd, 'app_src', '*')
534
+ mount_as_satellite!
535
+
536
+ puts; log_success 'Satellite installation updated!'; puts
537
+ end
538
+ def mount_as_satellite!
539
+ require_satellite_app_src_set!
540
+ system "sudo sshfs #{satellite_opts[:app_src_source]} app_src -oallow_other"
541
+ end
542
+ def mounted_as_satellite?
543
+ return false unless satellite_mode_enabled?
544
+ `bash -c 'df | awk \'{print $9}\' | grep $(pwd)/app_src'`.strip.length > 0
545
+ end
546
+ def require_satellite_mode_enabled!
547
+ unless satellite_mode_enabled?
521
548
  warn 'You must enable Satellite Mode to use this feature.'
522
549
  warn "Add the following to your #{@config_friendly_filepath} to enable it:"
523
550
  puts
@@ -527,6 +554,8 @@ def update_satellite!
527
554
  puts
528
555
  fatal 'Satellite Mode is required!'
529
556
  end
557
+ end
558
+ def require_satellite_app_src_set!
530
559
  unless satellite_opts[:app_src_source]
531
560
  warn 'You must set your app_src_source to use this feature.'
532
561
  warn "Add the following to your #{@config_friendly_filepath} to enable it:"
@@ -537,21 +566,18 @@ def update_satellite!
537
566
  puts
538
567
  fatal 'Satellite Mode requires app_src_source to be set!'
539
568
  end
540
- log_info 'Updating satellite installation...'; puts
541
-
542
- log_info 'Unmounting current app_src...'
543
- app_src_fullpath = File.expand_path File.join(Dir.pwd, 'app_src')
544
- system %[diskutil unmount "#{app_src_fullpath}"]
545
- log_info 'Pulling changes from Git...'
546
- git = Git.open '.'
547
- git.reset_hard
548
- git.pull
549
- log_info 'Remounting app_src to remote source...'
550
- FileUtils.rm_rf File.join(Dir.pwd, 'app_src', '*')
551
- system "sudo sshfs #{satellite_opts[:app_src_source]} app_src -oallow_other"
552
-
553
- puts; log_success 'Satellite installation updated!'; puts
554
569
  end
570
+ def ensure_mounted_as_satellite!
571
+ require_satellite_mode_enabled!
572
+ require_satellite_app_src_set!
573
+ unless mounted_as_satellite?
574
+ warn 'Satellite is not mounted. Mounting now...'
575
+ mount_as_satellite!
576
+ log_success 'Satellite mounted!'
577
+ end
578
+ end
579
+ def satellite_opts; @options[:satellite_mode] end
580
+ def satellite_mode_enabled?; satellite_opts[:enabled] end
555
581
 
556
582
  if @command
557
583
  case @command
@@ -1,5 +1,5 @@
1
1
  module Platinum
2
2
  module Deployer
3
- VERSION = "0.2.8"
3
+ VERSION = "0.2.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platinum-deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-13 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler