guard-remote-sync 0.0.7 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -1
- data/lib/guard/remote-sync.rb +12 -13
- data/lib/guard/remote-sync/command.rb +4 -3
- data/lib/guard/remote-sync/version.rb +1 -1
- data/lib/guard/{remote-sync → remotesync}/templates/Guardfile +0 -0
- metadata +28 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 89d6b9e7966e33b64eb77559e26e0267fe865bbc
|
4
|
+
data.tar.gz: f19fba4a4286a2073505b3333d47e54dac46b22d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5e82011de008dbd3973d34f20e342fcffe72ba3f77c8314f11c51ced8d671ce16853e2133a7d3f6dcbfe971c0eb14d25c324aeb9183635096b8acc22ab399fe7
|
7
|
+
data.tar.gz: 3aeed40dc6e68adc407da99dba0bf7b606349063535d169f38bf9e2fbf9ffea360f72880771ed4b9e657aec6c5528db0bc20b889ae7fd56f1213710dccc0cf6c
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#Guard::RemoteSync [![Build Status](https://
|
1
|
+
#Guard::RemoteSync [![Build Status](https://travis-ci.org/pmcjury/guard-remote-sync.svg?branch=master)](https://travis-ci.org/pmcjury/guard-remote-sync) [![Dependency Status](https://gemnasium.com/pmcjury/guard-remote-sync.png)](https://gemnasium.com/pmcjury/guard-remote-sync) [![Code Climate](https://codeclimate.com/github/pmcjury/guard-remote-sync.png)](https://codeclimate.com/github/pmcjury/guard-remote-sync) [![Gem Version](https://badge.fury.io/rb/guard-remote-sync.png)](http://badge.fury.io/rb/guard-remote-sync)
|
2
2
|
|
3
3
|
## Install
|
4
4
|
|
data/lib/guard/remote-sync.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'guard'
|
2
|
-
require 'guard/
|
2
|
+
require 'guard/compat/plugin'
|
3
3
|
|
4
4
|
module Guard
|
5
|
-
class RemoteSync <
|
5
|
+
class RemoteSync < Plugin
|
6
6
|
|
7
7
|
autoload :Command, 'guard/remote-sync/command'
|
8
8
|
autoload :Source, 'guard/remote-sync/source'
|
@@ -10,9 +10,8 @@ module Guard
|
|
10
10
|
attr_accessor :command
|
11
11
|
|
12
12
|
# Initialize a Guard.
|
13
|
-
# @param [Array<Guard::Watcher>] watchers the Guard file watchers
|
14
13
|
# @param [Hash] options the custom Guard options
|
15
|
-
def initialize(
|
14
|
+
def initialize(options = {})
|
16
15
|
super
|
17
16
|
@options = {
|
18
17
|
:source => nil,
|
@@ -49,8 +48,8 @@ module Guard
|
|
49
48
|
# @raise [:task_has_failed] when start has failed
|
50
49
|
def start
|
51
50
|
throw([:task_has_failed], "Guard::RemoteSync options invalid") unless options_valid?
|
52
|
-
UI.info "Guard::RemoteSync started in source directory '#{File.expand_path @source.directory}'"
|
53
|
-
|
51
|
+
Guard::Compat::UI.info "Guard::RemoteSync started in source directory '#{File.expand_path @source.directory}'"
|
52
|
+
Guard::Compat::UI.notify("Guard::RemoteSync is running in directory #{File.expand_path @source.directory}", notifier_options)
|
54
53
|
if @command.test
|
55
54
|
@command.sync if options[:sync_on_start]
|
56
55
|
else
|
@@ -63,15 +62,15 @@ module Guard
|
|
63
62
|
# @raise [:task_has_failed] when stop has failed
|
64
63
|
|
65
64
|
def stop
|
66
|
-
UI.info "Guard::RemoteSync stopped."
|
67
|
-
|
65
|
+
Guard::Compat::UI.info "Guard::RemoteSync stopped."
|
66
|
+
Guard::Compat::UI.notify("Guard::RemoteSync stopped.",notifier_options)
|
68
67
|
end
|
69
68
|
|
70
69
|
# Called when `reload|r|z + enter` is pressed.
|
71
70
|
# This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
|
72
71
|
# @raise [:task_has_failed] when reload has failed
|
73
72
|
def reload
|
74
|
-
|
73
|
+
Guard::Compat::UI.notify("Manual Guard::RemoteSync synchronize #{File.expand_path @source.directory} to #{@destination.directory}",notifier_options)
|
75
74
|
@command.sync
|
76
75
|
end
|
77
76
|
|
@@ -79,7 +78,7 @@ module Guard
|
|
79
78
|
# This method should be principally used for long action like running all specs/tests/...
|
80
79
|
# @raise [:task_has_failed] when run_all has failed
|
81
80
|
def run_all
|
82
|
-
|
81
|
+
Guard::Compat::UI.notify("Manual Guard::RemoteSync synchronize #{@source.directory} to #{@destination.directory}",notifier_options)
|
83
82
|
@command.sync
|
84
83
|
end
|
85
84
|
|
@@ -87,7 +86,7 @@ module Guard
|
|
87
86
|
# @param [Array<String>] paths the changes files or paths
|
88
87
|
# @raise [:task_has_failed] when run_on_change has failed
|
89
88
|
def run_on_changes(paths)
|
90
|
-
#paths.each do |p| ::Guard::UI.info("Files effect : #{p}") end
|
89
|
+
#paths.each do |p| ::Guard::Guard::Compat::UI.info("Files effect : #{p}") end
|
91
90
|
@command.sync
|
92
91
|
end
|
93
92
|
|
@@ -110,11 +109,11 @@ module Guard
|
|
110
109
|
def options_valid?
|
111
110
|
valid = true
|
112
111
|
if options[:source].nil? && options[:cli_options].nil?
|
113
|
-
UI.error("Guard::RemoteSync a source directory is required")
|
112
|
+
Guard::Compat::UI.error("Guard::RemoteSync a source directory is required")
|
114
113
|
valid = false
|
115
114
|
end
|
116
115
|
if options[:destination].nil? && options[:cli_options].nil?
|
117
|
-
UI.error("Guard::RemoteSync a source directory is required")
|
116
|
+
Guard::Compat::UI.error("Guard::RemoteSync a source directory is required")
|
118
117
|
valid = false
|
119
118
|
end
|
120
119
|
valid
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'open3'
|
2
|
+
require 'guard/compat/plugin'
|
2
3
|
|
3
4
|
module Guard
|
4
5
|
class RemoteSync
|
@@ -34,7 +35,7 @@ module Guard
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def sync
|
37
|
-
UI.info "Guard::RemoteSync `#{@command}`"
|
38
|
+
Compat::UI.info "Guard::RemoteSync `#{@command}`"
|
38
39
|
run_command @command
|
39
40
|
end
|
40
41
|
|
@@ -76,10 +77,10 @@ module Guard
|
|
76
77
|
|
77
78
|
def build_command
|
78
79
|
unless @options[:cli_options].nil?
|
79
|
-
UI.debug "Guard::RemoteSync ':cli' option was given so ignoring all other options, and outputting as is..." if @options[:verbose]
|
80
|
+
Guard::Compat::UI.debug "Guard::RemoteSync ':cli' option was given so ignoring all other options, and outputting as is..." if @options[:verbose]
|
80
81
|
command = "#{rsync_command} #{@options[:cli_options]}"
|
81
82
|
else
|
82
|
-
UI.debug "Guard::RemoteSync building rsync options from specified options" if @options[:verbose]
|
83
|
+
::Guard::Compat::UI.debug "Guard::RemoteSync building rsync options from specified options" if @options[:verbose]
|
83
84
|
@command_options = build_options
|
84
85
|
@remote_options = check_remote_options
|
85
86
|
@ssh_options = check_ssh_options
|
File without changes
|
metadata
CHANGED
@@ -1,36 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-remote-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Patrick McJury
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-03-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: guard
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 2.12.4
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.12.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard-compat
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
28
32
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: bundler
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
45
|
- - ~>
|
36
46
|
- !ruby/object:Gem::Version
|
@@ -38,7 +48,6 @@ dependencies:
|
|
38
48
|
type: :development
|
39
49
|
prerelease: false
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
51
|
requirements:
|
43
52
|
- - ~>
|
44
53
|
- !ruby/object:Gem::Version
|
@@ -46,23 +55,20 @@ dependencies:
|
|
46
55
|
- !ruby/object:Gem::Dependency
|
47
56
|
name: rake
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
58
|
requirements:
|
51
|
-
- -
|
59
|
+
- - '>='
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
- !ruby/object:Gem::Dependency
|
63
70
|
name: rspec
|
64
71
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
72
|
requirements:
|
67
73
|
- - ~>
|
68
74
|
- !ruby/object:Gem::Version
|
@@ -70,7 +76,6 @@ dependencies:
|
|
70
76
|
type: :development
|
71
77
|
prerelease: false
|
72
78
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
79
|
requirements:
|
75
80
|
- - ~>
|
76
81
|
- !ruby/object:Gem::Version
|
@@ -78,7 +83,6 @@ dependencies:
|
|
78
83
|
- !ruby/object:Gem::Dependency
|
79
84
|
name: guard-rspec
|
80
85
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
86
|
requirements:
|
83
87
|
- - ~>
|
84
88
|
- !ruby/object:Gem::Version
|
@@ -86,7 +90,6 @@ dependencies:
|
|
86
90
|
type: :development
|
87
91
|
prerelease: false
|
88
92
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
93
|
requirements:
|
91
94
|
- - ~>
|
92
95
|
- !ruby/object:Gem::Version
|
@@ -94,7 +97,6 @@ dependencies:
|
|
94
97
|
- !ruby/object:Gem::Dependency
|
95
98
|
name: rspec-mocks
|
96
99
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
100
|
requirements:
|
99
101
|
- - ~>
|
100
102
|
- !ruby/object:Gem::Version
|
@@ -102,7 +104,6 @@ dependencies:
|
|
102
104
|
type: :development
|
103
105
|
prerelease: false
|
104
106
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
107
|
requirements:
|
107
108
|
- - ~>
|
108
109
|
- !ruby/object:Gem::Version
|
@@ -116,33 +117,32 @@ extra_rdoc_files: []
|
|
116
117
|
files:
|
117
118
|
- lib/guard/remote-sync/command.rb
|
118
119
|
- lib/guard/remote-sync/source.rb
|
119
|
-
- lib/guard/remote-sync/templates/Guardfile
|
120
120
|
- lib/guard/remote-sync/version.rb
|
121
121
|
- lib/guard/remote-sync.rb
|
122
|
+
- lib/guard/remotesync/templates/Guardfile
|
122
123
|
- LICENSE
|
123
124
|
- README.md
|
124
125
|
homepage: https://github.com/pmcjury/guard-remote-sync
|
125
126
|
licenses: []
|
127
|
+
metadata: {}
|
126
128
|
post_install_message:
|
127
129
|
rdoc_options: []
|
128
130
|
require_paths:
|
129
131
|
- lib
|
130
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
133
|
requirements:
|
133
|
-
- -
|
134
|
+
- - '>='
|
134
135
|
- !ruby/object:Gem::Version
|
135
136
|
version: '0'
|
136
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: 1.3.6
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project: guard-remote-synch
|
144
|
-
rubygems_version:
|
144
|
+
rubygems_version: 2.0.14
|
145
145
|
signing_key:
|
146
|
-
specification_version:
|
146
|
+
specification_version: 4
|
147
147
|
summary: Guard gem for Remote Syncing through rsync
|
148
148
|
test_files: []
|