hem-tasks-rsync 1.3.0 → 2.0.0

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: e20d6b5ea984aebd26bb02c9922ac84a17678a60
4
- data.tar.gz: 521263ea43e06fbe6f5c9baee4e40f9a7a9c0441
3
+ metadata.gz: 4dd7b4af1434eba3ad12054fe91c082707017f8f
4
+ data.tar.gz: 844c803b83283fde9df9ebd8fac7a95ab5405988
5
5
  SHA512:
6
- metadata.gz: f8c4893f693915452f03145ecdf846c2c88a29f11642d464b78a75fae17353520a83d47f872c7e800513ece1f3369dd2da38f0604259cd72c16c17a54124314e
7
- data.tar.gz: c152b2d87a4fe03e1e746a1d2d564d2ee35bc6fae79dfd2206cbe449c34944fee8fa6943603f0c35122e674b11ff396244081cb8b019699e46ed40c4adbff1ff
6
+ metadata.gz: f75fdb8b707fad8080fdd666e4cb4e9b2c951d309633e9ef2f86c07b00fc1206e857dde6659f661d139cc51e29b96d06a92e8b720f0b9de5741653e064f0753b
7
+ data.tar.gz: 33e05149624b7a915283c3172d0a6c2afe2561037c1926c5f16454763f32cad1836a7884e99c4cf63d88643e89a225be55bc00800383cdbb461eaea8c10c8091
@@ -88,10 +88,22 @@ namespace :deps do
88
88
  from_path: 'vendor/',
89
89
  to_path: 'vendor',
90
90
  deciding_file_path: File.join('vendor', 'autoload.php'),
91
- guest_to_host_allowed: false
91
+ host_to_guest_allowed: false
92
92
  )
93
93
  end
94
94
 
95
+ desc 'Upload the vendor directory from the host to the guest'
96
+ task :vendor_directory_to_guest do
97
+ Hem.ui.title 'Uploading vendor directory changes to guest'
98
+
99
+ Rake::Task['vm:rsync_manual'].execute(
100
+ from_path: 'vendor/',
101
+ to_path: 'vendor'
102
+ )
103
+
104
+ Hem.ui.success('Uploaded vendor directory changes to guest')
105
+ end
106
+
95
107
  desc 'Reload the VM to use NFS mounts per directory, or sync rsync mounts if already enabled'
96
108
  task :reload_or_sync do
97
109
  one_mount_point = run 'grep "/vagrant " /proc/mounts || true', capture: true
@@ -1,7 +1,7 @@
1
1
  module Hem
2
2
  module Tasks
3
3
  module Rsync
4
- VERSION = '1.3.0'.freeze
4
+ VERSION = '2.0.0'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -86,7 +86,7 @@ namespace :vm do
86
86
  argument :from_path
87
87
  argument :to_path
88
88
  argument :deciding_file_path
89
- argument :guest_to_host_allowed, optional: true, default: true
89
+ argument :host_to_guest_allowed, optional: true, default: true
90
90
  task :sync_guest_changes do |_task_name, args|
91
91
  Hem.ui.title "Determining if #{args[:deciding_file_path]} is newer on the host or guest"
92
92
 
@@ -108,7 +108,7 @@ namespace :vm do
108
108
  to_path: to_path,
109
109
  is_reverse: true
110
110
  )
111
- elsif args[:guest_to_host_allowed] && local_file_modified.to_i > remote_file_modified.to_i
111
+ elsif args[:host_to_guest_allowed] && local_file_modified.to_i > remote_file_modified.to_i
112
112
  Hem.ui.success("Host file #{args[:deciding_file_path]} is newer, syncing to guest")
113
113
  from_path = File.join(Hem.project_path, args[:to_path])
114
114
  to_path = File.join(Hem.project_config.vm.project_mount_path, args[:from_path])
@@ -117,7 +117,7 @@ namespace :vm do
117
117
  from_path: from_path,
118
118
  to_path: to_path
119
119
  )
120
- elsif !args[:guest_to_host_allowed]
120
+ elsif !args[:host_to_guest_allowed]
121
121
  Hem.ui.success('Host is more up to date than the guest but syncing via another method')
122
122
  else
123
123
  Hem.ui.success("Host and guest file #{args[:deciding_file_path]} are up to date, not doing anything")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hem-tasks-rsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kieren Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-17 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler