caravan 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +1 -1
- data/README.md +25 -1
- data/assets/civ-5-caravan.png +0 -0
- data/caravan.gemspec +1 -0
- data/exe/caravan +7 -4
- data/lib/caravan/version.rb +1 -1
- data/lib/caravan.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04165e52055b23d22aefec5a138f1dd67fc1ee74
|
4
|
+
data.tar.gz: 4546e888f93eb980f88b3b1b43908c3069b0a0d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3307a23f979a82803154973525a0aa6b31483685902180f847d102ccb7b1d7cbdabbdcfddec86bb5ec49cfbac50702ffb417b3221ec9e285d3e0c78b9647baf
|
7
|
+
data.tar.gz: a31c7fa8e58967a756ffc33bc10a32f8132b7cc4832fc2d8f145e35d431b5aaa47b2c30fac49c52d5469736678b12b846b72f7082d705de642214ee55a363a84
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at crispgm@gmail.com. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/README.md
CHANGED
@@ -9,6 +9,10 @@ Simple project files watcher and deployer.
|
|
9
9
|
|
10
10
|
The scenario is when we are developing in your local workspace and the program only runs in specific runtime environment, we have to setup by ourself to make the program run and debug on runtime folders, or remote machines. Caravan is the automation tool designed for solving such kind of problems by watching the file changes, and deploy them automatically to its destination.
|
11
11
|
|
12
|
+
![](/assets/civ-5-caravan.png)
|
13
|
+
|
14
|
+
This is the caravan in Sid Meier's Civilization V, which the project name originally comes from.
|
15
|
+
|
12
16
|
## Installation
|
13
17
|
|
14
18
|
```
|
@@ -29,12 +33,26 @@ $ caravan --help
|
|
29
33
|
--version Show version
|
30
34
|
```
|
31
35
|
|
32
|
-
|
36
|
+
## Examples
|
37
|
+
|
38
|
+
Deploy to local directory:
|
33
39
|
|
34
40
|
```
|
35
41
|
$ caravan -s /path/to/project/. -d /path/to/deploy -m shell
|
36
42
|
```
|
37
43
|
|
44
|
+
Deploy to remote machines:
|
45
|
+
|
46
|
+
```
|
47
|
+
$ caravan -s /path/to/project/. -d user@remote_machines:/path/to/deploy -m rsync
|
48
|
+
```
|
49
|
+
|
50
|
+
Deploy only once:
|
51
|
+
|
52
|
+
```
|
53
|
+
$ caravan -s /path/to/project/. -d user@remote_machines:/path/to/deploy -m rsync --once
|
54
|
+
```
|
55
|
+
|
38
56
|
## Configuration
|
39
57
|
|
40
58
|
Generate default configuration:
|
@@ -55,6 +73,12 @@ exclude:
|
|
55
73
|
- ".svn"
|
56
74
|
```
|
57
75
|
|
76
|
+
You may also write `src` and `dst` to `caravan.yml`. Hence, deployment made even easier.
|
77
|
+
|
78
|
+
```
|
79
|
+
$ caravan
|
80
|
+
```
|
81
|
+
|
58
82
|
## Plan
|
59
83
|
|
60
84
|
- [x] Basic watching and deploying
|
Binary file
|
data/caravan.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.bindir = "exe"
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
|
+
spec.required_ruby_version = '>= 2.3.0'
|
23
24
|
|
24
25
|
spec.add_dependency "listen"
|
25
26
|
spec.add_dependency "colorize"
|
data/exe/caravan
CHANGED
@@ -40,17 +40,20 @@ option_parser = OptionParser.new do |opts|
|
|
40
40
|
options[:debug] = true
|
41
41
|
end
|
42
42
|
|
43
|
+
opts.on_head("--init", "Init caravan.yml") do
|
44
|
+
Caravan.dump_default_conf
|
45
|
+
Caravan::Message.success("Generated #{Caravan::Config.default_conf_name}")
|
46
|
+
exit
|
47
|
+
end
|
48
|
+
|
43
49
|
opts.on_tail("--version", "Show version") do
|
44
50
|
puts Caravan::VERSION
|
45
51
|
exit
|
46
52
|
end
|
47
53
|
end
|
48
54
|
|
49
|
-
if ARGV.size == 1 && ARGV[0] == "init"
|
50
|
-
Caravan.dump_default_conf
|
51
|
-
end
|
52
|
-
|
53
55
|
option_parser.parse!(ARGV)
|
56
|
+
|
54
57
|
merged_conf = Caravan::Config.merge(options, Caravan.process_conf(options[:src]))
|
55
58
|
if merged_conf.key?("src") && merged_conf.key?("dst") && merged_conf.key?("deploy_mode")
|
56
59
|
Caravan.start(merged_conf)
|
data/lib/caravan/version.rb
CHANGED
data/lib/caravan.rb
CHANGED
@@ -33,7 +33,7 @@ module Caravan
|
|
33
33
|
Caravan::Message.success("Starting to watch #{src_path}...")
|
34
34
|
deployer.after_create
|
35
35
|
if merged_conf["once"]
|
36
|
-
|
36
|
+
deploy_once(deployer)
|
37
37
|
exit(0)
|
38
38
|
end
|
39
39
|
listener.start
|
@@ -48,7 +48,7 @@ module Caravan
|
|
48
48
|
sleep_forever
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
51
|
+
def deploy_once(deployer)
|
52
52
|
deployer.before_deploy
|
53
53
|
deployer.run
|
54
54
|
deployer.after_deploy
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caravan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- README.md
|
127
127
|
- Rakefile
|
128
128
|
- _config.yml
|
129
|
+
- assets/civ-5-caravan.png
|
129
130
|
- caravan.gemspec
|
130
131
|
- exe/caravan
|
131
132
|
- lib/caravan.rb
|
@@ -150,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
151
|
requirements:
|
151
152
|
- - ">="
|
152
153
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
154
|
+
version: 2.3.0
|
154
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
156
|
requirements:
|
156
157
|
- - ">="
|