flame_deploy_toys 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 75c12c4a0292619411dff44c4780939708a61e2d5342a45b265331af0416a034
4
+ data.tar.gz: 26bae3c7a0752785f8177e4ddb4b3d2a93f77197932593dbe753136827957b98
5
+ SHA512:
6
+ metadata.gz: b4135386cc2153bcb9b93f6f1408a48ff5bad00995ef1cbae7c1d1f8bb1b67d58845be408ae53068345d604422812cc674c9486f52ad4d68daee712a97c0a84e
7
+ data.tar.gz: 6a190f81b0662d4ede69685271e7711f6517077b30ec1160c06614474832dec1793712fe4a1fdde6d69a8731577424d9c638a0ce76170b22b5f7b5bb297e15ca
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## master (unreleased)
4
+
5
+ ## 0.1.0 (2020-07-13)
6
+
7
+ * Initial release.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Alexander Popov
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,63 @@
1
+ # Flame Deploy Toys
2
+
3
+ [![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/flame_deploy_toys?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/flame_deploy_toys)
4
+ [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/flame_deploy_toys/master.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/flame_deploy_toys)
5
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/flame_deploy_toys.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/flame_deploy_toys)
6
+ [![Depfu](https://img.shields.io/depfu/AlexWayfer/benchmark_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/flame_deploy_toys)
7
+ [![Inline docs](https://inch-ci.org/github/AlexWayfer/flame_deploy_toys.svg?branch=master)](https://inch-ci.org/github/AlexWayfer/flame_deploy_toys)
8
+ [![license](https://img.shields.io/github/license/AlexWayfer/flame_deploy_toys.svg?style=flat-square)](https://github.com/AlexWayfer/flame_deploy_toys/blob/master/LICENSE.txt)
9
+ [![Gem](https://img.shields.io/gem/v/flame_deploy_toys.svg?style=flat-square)](https://rubygems.org/gems/flame_deploy_toys)
10
+
11
+ Toys template for deploying [Flame](https://github.com/AlexWayfer/flame)
12
+ application.
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem 'flame_deploy_toys'
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ ```shell
25
+ bundle install
26
+ ```
27
+
28
+ Or install it yourself as:
29
+
30
+ ```shell
31
+ gem install flame_deploy_toys
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ```ruby
37
+ 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)
43
+ ```
44
+
45
+ ## Development
46
+
47
+ After checking out the repo, run `bundle install` to install dependencies.
48
+
49
+ Then, run `toys rspec` to run the tests.
50
+
51
+ To install this gem onto your local machine, run `toys gem install`.
52
+
53
+ To release a new version, run `toys gem release %version%`.
54
+ See how it works [here](https://github.com/AlexWayfer/gem_toys#release).
55
+
56
+ ## Contributing
57
+
58
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/flame_deploy_toys).
59
+
60
+ ## License
61
+
62
+ The gem is available as open source under the terms of the
63
+ [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'flame_deploy_toys/template'
4
+ require_relative 'flame_deploy_toys/version'
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'toys-core'
4
+
5
+ module FlameDeployToys
6
+ ## Define toys for benchmark
7
+ class Template
8
+ include Toys::Template
9
+
10
+ attr_reader :config_dir_proc
11
+
12
+ def initialize(config_dir_proc:)
13
+ @config_dir_proc = config_dir_proc
14
+ end
15
+
16
+ on_expand do |template|
17
+ tool :deploy do
18
+ desc 'Deploy to servers'
19
+
20
+ long_desc <<~DESC
21
+ Command for deploy code from git to servers
22
+
23
+ Example:
24
+ Update from git master branch
25
+ toys deploy
26
+ Update from git development branch
27
+ toys deploy development
28
+ DESC
29
+
30
+ optional_arg :branch, default: :master
31
+
32
+ to_run do
33
+ require 'yaml'
34
+
35
+ config_dir = instance_exec(&template.config_dir_proc)
36
+
37
+ config_file = Dir[File.join(config_dir, 'deploy.y{a,}ml')].first
38
+
39
+ servers = YAML.load_file config_file
40
+
41
+ servers.each do |server|
42
+ update_command = "cd #{server[:path]} && exe/update.sh #{branch}"
43
+ sh "ssh -t #{server[:ssh]} 'bash --login -c \"#{update_command}\"'"
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FlameDeployToys
4
+ VERSION = '0.1.0'
5
+ end
metadata ADDED
@@ -0,0 +1,208 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flame_deploy_toys
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Popov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: toys-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.10.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.10.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry-byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: gem_toys
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: toys
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.10.4
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.10.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: codecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.2.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.2.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.9'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.9'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.18.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.18.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.88.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.88.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-performance
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop-rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.0'
167
+ description: 'Toys template for deploying Flame application.
168
+
169
+ '
170
+ email:
171
+ - alex.wayfer@gmail.com
172
+ executables: []
173
+ extensions: []
174
+ extra_rdoc_files: []
175
+ files:
176
+ - CHANGELOG.md
177
+ - LICENSE.txt
178
+ - README.md
179
+ - lib/flame_deploy_toys.rb
180
+ - lib/flame_deploy_toys/template.rb
181
+ - lib/flame_deploy_toys/version.rb
182
+ homepage: https://github.com/AlexWayfer/flame_deploy_toys
183
+ licenses:
184
+ - MIT
185
+ metadata:
186
+ source_code_uri: https://github.com/AlexWayfer/flame_deploy_toys
187
+ homepage_uri: https://github.com/AlexWayfer/flame_deploy_toys
188
+ changelog_uri: https://github.com/Wayfer/flame_deploy_toys/blob/master/CHANGELOG.md
189
+ post_install_message:
190
+ rdoc_options: []
191
+ require_paths:
192
+ - lib
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '2.5'
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ requirements: []
204
+ rubygems_version: 3.1.2
205
+ signing_key:
206
+ specification_version: 4
207
+ summary: Toys template for deploying Flame application.
208
+ test_files: []