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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75c12c4a0292619411dff44c4780939708a61e2d5342a45b265331af0416a034
4
- data.tar.gz: 26bae3c7a0752785f8177e4ddb4b3d2a93f77197932593dbe753136827957b98
3
+ metadata.gz: 24d58725654613cef692603ccfbacf50ff39cacad3240fce74b2e39f6c49c411
4
+ data.tar.gz: a90bd485259301177f2b6e8a60e3bf188d36ce8c9052d99894f932b725cf2cf4
5
5
  SHA512:
6
- metadata.gz: b4135386cc2153bcb9b93f6f1408a48ff5bad00995ef1cbae7c1d1f8bb1b67d58845be408ae53068345d604422812cc674c9486f52ad4d68daee712a97c0a84e
7
- data.tar.gz: 6a190f81b0662d4ede69685271e7711f6517077b30ec1160c06614474832dec1793712fe4a1fdde6d69a8731577424d9c638a0ce76170b22b5f7b5bb297e15ca
6
+ metadata.gz: c7bef7976649deebf47b10cd8a0968ece0720ee33d869aaf8bfa9762871c2dd4f9e6f3145b1fcb70b7e57ccdd0d114ba4d1a179740539a99ecd014d13238e8c1
7
+ data.tar.gz: 572028d26cbe3ce429b5d86f1859dded94173d4ec51e279bcc0fc524f31df6a1469f4c4d515d449ca8faed1d9e7f6ef010205595ea5c0ca6aa7c1f0872573c5a
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.2.0 (2020-08-02)
6
+
5
7
  ## 0.1.0 (2020-07-13)
6
8
 
7
9
  * Initial release.
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
- config_dir_proc: (proc do
40
- require "#{context_directory}/config/config"
41
- MyProject::Application.config[:config_dir]
42
- end)
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 :config_dir_proc
10
+ attr_reader :config_dir
11
11
 
12
- def initialize(config_dir_proc:)
13
- @config_dir_proc = config_dir_proc
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
- config_dir = instance_exec(&template.config_dir_proc)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlameDeployToys
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
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.1.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-07-13 00:00:00.000000000 Z
11
+ date: 2020-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toys-core