flame_deploy_toys 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +9 -5
- data/lib/flame_deploy_toys/template.rb +6 -6
- data/lib/flame_deploy_toys/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24d58725654613cef692603ccfbacf50ff39cacad3240fce74b2e39f6c49c411
|
4
|
+
data.tar.gz: a90bd485259301177f2b6e8a60e3bf188d36ce8c9052d99894f932b725cf2cf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7bef7976649deebf47b10cd8a0968ece0720ee33d869aaf8bfa9762871c2dd4f9e6f3145b1fcb70b7e57ccdd0d114ba4d1a179740539a99ecd014d13238e8c1
|
7
|
+
data.tar.gz: 572028d26cbe3ce429b5d86f1859dded94173d4ec51e279bcc0fc524f31df6a1469f4c4d515d449ca8faed1d9e7f6ef010205595ea5c0ca6aa7c1f0872573c5a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -34,12 +34,16 @@ gem install flame_deploy_toys
|
|
34
34
|
## Usage
|
35
35
|
|
36
36
|
```ruby
|
37
|
+
## .toys/.toys.rb
|
37
38
|
require 'flame_deploy_toys'
|
38
|
-
expand FlameDeployToys::Template,
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
expand FlameDeployToys::Template, config_dir: "#{__dir__}/../config"
|
40
|
+
```
|
41
|
+
|
42
|
+
Then it will look for `deploy.yaml` file in config directory with such structure:
|
43
|
+
|
44
|
+
```yaml
|
45
|
+
- :ssh: 'server alias from ~/.ssh/config (or user@host)'
|
46
|
+
:path: '/path/to/root/of/project'
|
43
47
|
```
|
44
48
|
|
45
49
|
## Development
|
@@ -7,10 +7,10 @@ module FlameDeployToys
|
|
7
7
|
class Template
|
8
8
|
include Toys::Template
|
9
9
|
|
10
|
-
attr_reader :
|
10
|
+
attr_reader :config_dir
|
11
11
|
|
12
|
-
def initialize(
|
13
|
-
@
|
12
|
+
def initialize(config_dir:)
|
13
|
+
@config_dir = config_dir
|
14
14
|
end
|
15
15
|
|
16
16
|
on_expand do |template|
|
@@ -29,12 +29,12 @@ module FlameDeployToys
|
|
29
29
|
|
30
30
|
optional_arg :branch, default: :master
|
31
31
|
|
32
|
+
include :exec, exit_on_nonzero_status: true, log_level: Logger::UNKNOWN
|
33
|
+
|
32
34
|
to_run do
|
33
35
|
require 'yaml'
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
config_file = Dir[File.join(config_dir, 'deploy.y{a,}ml')].first
|
37
|
+
config_file = Dir[File.join(template.config_dir, 'deploy.y{a,}ml')].first
|
38
38
|
|
39
39
|
servers = YAML.load_file config_file
|
40
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame_deploy_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toys-core
|