caravan 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +51 -0
- data/.travis.yml +11 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +46 -0
- data/LICENSE +21 -0
- data/README.md +29 -0
- data/Rakefile +10 -0
- data/caravan.gemspec +31 -0
- data/docs/_config.yml +1 -0
- data/exe/caravan +42 -0
- data/lib/caravan/command.rb +11 -0
- data/lib/caravan/config.rb +40 -0
- data/lib/caravan/deploy.rb +45 -0
- data/lib/caravan/deploy_methods/rsync.rb +13 -0
- data/lib/caravan/deploy_methods/rsync_local.rb +13 -0
- data/lib/caravan/deploy_methods/scp.rb +13 -0
- data/lib/caravan/deploy_methods/shell.rb +11 -0
- data/lib/caravan/message.rb +27 -0
- data/lib/caravan/version.rb +3 -0
- data/lib/caravan.rb +67 -0
- metadata +164 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 21f5e8e75b19d676bb4530c970b37eceaa6cab66
|
4
|
+
data.tar.gz: 10c5083012689210fe745b4ad9e5b7f13e35f217
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eaf0c5a0d1d4adb039339b82072cf694b83508856e5378e5fb561c1df015212d3d04035a8f1da03f457d5aca4a3020ae59ca0c69c6ad8fa63eeed944bff43fc1
|
7
|
+
data.tar.gz: f77c3c4033fd6146b1a748871bd164e9adf239a3417b865fa15e2c9a8f7160ff2f63385413602189510b92bebbb3c9e3223899f09b54e53068acdcb9179b3ad9
|
data/.gitignore
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
51
|
+
caravan.yml
|
data/.travis.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
rvm:
|
4
|
+
- 2.3.0
|
5
|
+
env:
|
6
|
+
- CODECLIMATE_REPO_TOKEN: b72ccd136db6874a3d5dd842c50c1dc0933a1f49a02c55ce8567ec7311600af3
|
7
|
+
after_success:
|
8
|
+
- bundle exec codeclimate-test-reporter
|
9
|
+
notifications:
|
10
|
+
email: false
|
11
|
+
slack: navyblue-team:ioO5diAGc5WUQVDKc5BH1UbE
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at zhangwanlong@bytedance.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
Caravan (0.3.0)
|
5
|
+
colorize
|
6
|
+
listen
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
codeclimate-test-reporter (1.0.8)
|
12
|
+
simplecov (<= 0.13)
|
13
|
+
colorize (0.8.1)
|
14
|
+
docile (1.1.5)
|
15
|
+
ffi (1.9.18)
|
16
|
+
json (2.1.0)
|
17
|
+
listen (3.1.5)
|
18
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
19
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
20
|
+
ruby_dep (~> 1.2)
|
21
|
+
minitest (5.10.3)
|
22
|
+
rake (10.5.0)
|
23
|
+
rb-fsevent (0.10.2)
|
24
|
+
rb-inotify (0.9.10)
|
25
|
+
ffi (>= 0.5.0, < 2)
|
26
|
+
ruby_dep (1.5.0)
|
27
|
+
shoulda-context (1.2.2)
|
28
|
+
simplecov (0.13.0)
|
29
|
+
docile (~> 1.1.0)
|
30
|
+
json (>= 1.8, < 3)
|
31
|
+
simplecov-html (~> 0.10.0)
|
32
|
+
simplecov-html (0.10.2)
|
33
|
+
|
34
|
+
PLATFORMS
|
35
|
+
ruby
|
36
|
+
|
37
|
+
DEPENDENCIES
|
38
|
+
Caravan!
|
39
|
+
bundler (~> 1.15)
|
40
|
+
codeclimate-test-reporter (~> 1.0.0)
|
41
|
+
minitest (~> 5.0)
|
42
|
+
rake (~> 10.0)
|
43
|
+
shoulda-context
|
44
|
+
|
45
|
+
BUNDLED WITH
|
46
|
+
1.15.4
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 David Zhang
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# [Caravan](https://crispgm.github.io/caravan/)
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/caravan.svg)](https://badge.fury.io/rb/Caravan)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/crispgm/caravan/badges/gpa.svg)](https://codeclimate.com/github/crispgm/caravan)
|
5
|
+
[![Test Coverage](https://codeclimate.com/github/crispgm/caravan/badges/coverage.svg)](https://codeclimate.com/github/crispgm/caravan/coverage)
|
6
|
+
|
7
|
+
(WIP) Simple watcher and deployer.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
```
|
12
|
+
$ gem install caravan
|
13
|
+
```
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
```
|
18
|
+
$ caravan --help
|
19
|
+
```
|
20
|
+
|
21
|
+
Example:
|
22
|
+
|
23
|
+
```
|
24
|
+
$ caravan -s /path/to/project/. -d /path/to/deploy -m shell
|
25
|
+
```
|
26
|
+
|
27
|
+
## LICENSE
|
28
|
+
|
29
|
+
[MIT](/LICENSE)
|
data/Rakefile
ADDED
data/caravan.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "caravan/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "caravan"
|
8
|
+
spec.version = Caravan::VERSION
|
9
|
+
spec.authors = ["David Zhang"]
|
10
|
+
spec.email = ["crispgm@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Simple watcher and deployer}
|
13
|
+
spec.description = %q{Caravan is a simple file watcher and deployer for local development.}
|
14
|
+
spec.homepage = "https://crispgm.github.io/caravan/"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency "listen"
|
25
|
+
spec.add_dependency "colorize"
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
29
|
+
spec.add_development_dependency "shoulda-context"
|
30
|
+
spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
|
31
|
+
end
|
data/docs/_config.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
theme: jekyll-theme-modernist
|
data/exe/caravan
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w(.. lib)))
|
4
|
+
|
5
|
+
require "optparse"
|
6
|
+
require "caravan"
|
7
|
+
|
8
|
+
options = {}
|
9
|
+
option_parser = OptionParser.new do |opts|
|
10
|
+
opts.banner = "Caravan #{Caravan::VERSION}\nCopyright (c) David Zhang 2017\n"
|
11
|
+
opts.separator ""
|
12
|
+
|
13
|
+
opts.on("-s SOURCE_PATH", "--source SOURCE_PATH", "Source path") do |value|
|
14
|
+
options[:src] = value
|
15
|
+
end
|
16
|
+
|
17
|
+
opts.on("-d DEST_PATH", "--dest DEST_PATH", "Destination path") do |value|
|
18
|
+
options[:dst] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
opts.on("-m DEPLOY_MODE", "--mode DEPLOY_MODE", "Deploy mode") do |value|
|
22
|
+
options[:mode] = value || "shell"
|
23
|
+
end
|
24
|
+
|
25
|
+
opts.on("-i IGNORE_FILES", "--ignore IGNORE_FILES", "Ignore files") do |value|
|
26
|
+
options[:ignore] = value || "\.(git|svn)$"
|
27
|
+
end
|
28
|
+
|
29
|
+
options[:debug] = false
|
30
|
+
opts.on("-b", "--debug", "Debug mode") do
|
31
|
+
options[:debug] = true
|
32
|
+
end
|
33
|
+
|
34
|
+
opts.on_tail("--version", "Show version") do
|
35
|
+
puts Caravan::VERSION
|
36
|
+
exit
|
37
|
+
end
|
38
|
+
end.parse!(ARGV)
|
39
|
+
|
40
|
+
if options.key?(:src) && options.key?(:dst)
|
41
|
+
Caravan.start(options)
|
42
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require "yaml"
|
2
|
+
|
3
|
+
module Caravan
|
4
|
+
class Config < Hash
|
5
|
+
DEFAULT_CONFIG = {
|
6
|
+
"deploy_mode" => "rsync_local",
|
7
|
+
"incremental" => true,
|
8
|
+
"exclude" => %w(
|
9
|
+
.git .svn
|
10
|
+
)
|
11
|
+
}.freeze
|
12
|
+
|
13
|
+
class << self
|
14
|
+
def default_conf
|
15
|
+
DEFAULT_CONFIG
|
16
|
+
end
|
17
|
+
|
18
|
+
def from(user_config_path)
|
19
|
+
if File.exist?(user_config_path)
|
20
|
+
YAML.load_file(user_config_path)
|
21
|
+
else
|
22
|
+
dump_conf(user_config_path, default_conf)
|
23
|
+
default_conf
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def dump_conf(user_config_path, user_config)
|
28
|
+
File.open(user_config_path, "w") do |f|
|
29
|
+
f.write(user_config.to_yaml)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def pretty_puts(conf)
|
34
|
+
conf.each do |k, v|
|
35
|
+
Message.info(" => #{k}: #{v}")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require "colorize"
|
2
|
+
|
3
|
+
module Caravan
|
4
|
+
module Deploy
|
5
|
+
class << self
|
6
|
+
def create_deployer(method = 'shell')
|
7
|
+
case method
|
8
|
+
when "shell"
|
9
|
+
return Caravan::DeployMethods::Shell.new
|
10
|
+
when "scp"
|
11
|
+
return Caravan::DeployMethods::Scp.new
|
12
|
+
when "rsync"
|
13
|
+
return Caravan::DeployMethods::Rsync.new
|
14
|
+
when "rsync_local"
|
15
|
+
return Caravan::DeployMethods::RsyncLocal.new
|
16
|
+
else
|
17
|
+
Message.error("Unknown deploy method \"#{method}\"")
|
18
|
+
return nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class Base
|
24
|
+
attr_accessor :debug
|
25
|
+
|
26
|
+
def initialize
|
27
|
+
Message.info("Creating #{self.class.name}...")
|
28
|
+
@debug = false
|
29
|
+
end
|
30
|
+
|
31
|
+
def run(src, dst)
|
32
|
+
time_str = Time.now.strftime("%H:%M:%S").green
|
33
|
+
Message.info("#{time_str} Deploying #{src} to #{dst}...")
|
34
|
+
|
35
|
+
status = 0
|
36
|
+
if block_given?
|
37
|
+
status, output = yield src, dst
|
38
|
+
end
|
39
|
+
|
40
|
+
Message.error("deploying block returned false") unless status == 0
|
41
|
+
return status
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "colorize"
|
2
|
+
|
3
|
+
module Caravan
|
4
|
+
module Message
|
5
|
+
class << self
|
6
|
+
def debug(msg)
|
7
|
+
puts "[DEBUG] #{msg}".light_black
|
8
|
+
end
|
9
|
+
|
10
|
+
def info(msg)
|
11
|
+
puts "[INFO] #{msg}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def error(msg)
|
15
|
+
puts "[ERROR] #{msg}".red
|
16
|
+
end
|
17
|
+
|
18
|
+
def warning(msg)
|
19
|
+
puts "[WARN] #{msg}".yellow
|
20
|
+
end
|
21
|
+
|
22
|
+
def success(msg)
|
23
|
+
puts "#{msg}".green
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/caravan.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
require "caravan/command"
|
2
|
+
require "caravan/config"
|
3
|
+
require "caravan/deploy"
|
4
|
+
require "caravan/deploy_methods/shell"
|
5
|
+
require "caravan/deploy_methods/scp"
|
6
|
+
require "caravan/deploy_methods/rsync"
|
7
|
+
require "caravan/deploy_methods/rsync_local"
|
8
|
+
require "caravan/message"
|
9
|
+
require "caravan/version"
|
10
|
+
|
11
|
+
require "listen"
|
12
|
+
|
13
|
+
DEFAULT_CONFIG_NAME = "caravan.yml".freeze
|
14
|
+
|
15
|
+
module Caravan
|
16
|
+
class << self
|
17
|
+
def start(options)
|
18
|
+
src_path = options[:src]
|
19
|
+
target_path = options[:dst]
|
20
|
+
mode = options[:mode]
|
21
|
+
ignores = options[:ignore]
|
22
|
+
debug = options[:debug]
|
23
|
+
|
24
|
+
deployer = Deploy.create_deployer(mode)
|
25
|
+
deployer.debug = true if debug
|
26
|
+
if deployer.nil?
|
27
|
+
exit -1
|
28
|
+
end
|
29
|
+
|
30
|
+
# process_conf
|
31
|
+
|
32
|
+
listener = Listen.to(src_path) do |modified, added, removed|
|
33
|
+
unless (modified.empty? && added.empty? && removed.empty?)
|
34
|
+
(added + modified + removed).each do |change|
|
35
|
+
Message.info("#{change} was changed.")
|
36
|
+
end
|
37
|
+
|
38
|
+
deployer.run(src_path, target_path)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
listener.ignore(ignores)
|
43
|
+
|
44
|
+
Message.success("Starting to watch #{src_path}...")
|
45
|
+
deployer.run(src_path, target_path)
|
46
|
+
listener.start
|
47
|
+
|
48
|
+
trap("INT") do
|
49
|
+
listener.stop
|
50
|
+
Message.success("\tHalting watching.")
|
51
|
+
exit 0
|
52
|
+
end
|
53
|
+
|
54
|
+
sleep_forever
|
55
|
+
end
|
56
|
+
|
57
|
+
def process_conf
|
58
|
+
Message.success("Reading configuration...")
|
59
|
+
conf = Caravan::Config.from(DEFAULT_CONFIG_NAME)
|
60
|
+
Config.pretty_puts(conf)
|
61
|
+
end
|
62
|
+
|
63
|
+
def sleep_forever
|
64
|
+
loop { sleep 1000 }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: caravan
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Zhang
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-09-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: listen
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: colorize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.15'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.15'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '5.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: shoulda-context
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: codeclimate-test-reporter
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.0.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.0.0
|
111
|
+
description: Caravan is a simple file watcher and deployer for local development.
|
112
|
+
email:
|
113
|
+
- crispgm@gmail.com
|
114
|
+
executables:
|
115
|
+
- caravan
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".gitignore"
|
120
|
+
- ".travis.yml"
|
121
|
+
- CODE_OF_CONDUCT.md
|
122
|
+
- Gemfile
|
123
|
+
- Gemfile.lock
|
124
|
+
- LICENSE
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- caravan.gemspec
|
128
|
+
- docs/_config.yml
|
129
|
+
- exe/caravan
|
130
|
+
- lib/caravan.rb
|
131
|
+
- lib/caravan/command.rb
|
132
|
+
- lib/caravan/config.rb
|
133
|
+
- lib/caravan/deploy.rb
|
134
|
+
- lib/caravan/deploy_methods/rsync.rb
|
135
|
+
- lib/caravan/deploy_methods/rsync_local.rb
|
136
|
+
- lib/caravan/deploy_methods/scp.rb
|
137
|
+
- lib/caravan/deploy_methods/shell.rb
|
138
|
+
- lib/caravan/message.rb
|
139
|
+
- lib/caravan/version.rb
|
140
|
+
homepage: https://crispgm.github.io/caravan/
|
141
|
+
licenses:
|
142
|
+
- MIT
|
143
|
+
metadata: {}
|
144
|
+
post_install_message:
|
145
|
+
rdoc_options: []
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 2.6.11
|
161
|
+
signing_key:
|
162
|
+
specification_version: 4
|
163
|
+
summary: Simple watcher and deployer
|
164
|
+
test_files: []
|