broadside 2.0.0 → 3.0.0.pre.prerelease
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +0 -3
- data/.hound.yml +2 -0
- data/.rubocop.yml +1080 -0
- data/CHANGELOG.md +41 -3
- data/README.md +54 -66
- data/bin/broadside +2 -174
- data/broadside.gemspec +6 -6
- data/lib/broadside.rb +32 -22
- data/lib/broadside/command.rb +130 -0
- data/lib/broadside/configuration/aws_configuration.rb +25 -0
- data/lib/broadside/configuration/configuration.rb +74 -0
- data/lib/broadside/configuration/invalid_configuration.rb +9 -0
- data/lib/broadside/deploy.rb +7 -99
- data/lib/broadside/ecs/ecs_deploy.rb +114 -179
- data/lib/broadside/ecs/ecs_manager.rb +68 -24
- data/lib/broadside/error.rb +3 -8
- data/lib/broadside/gli/commands.rb +147 -0
- data/lib/broadside/gli/global.rb +72 -0
- data/lib/broadside/logging_utils.rb +9 -0
- data/lib/broadside/target.rb +59 -73
- data/lib/broadside/version.rb +1 -1
- metadata +43 -28
- data/lib/broadside/configuration.rb +0 -58
- data/lib/broadside/configuration/aws_config.rb +0 -14
- data/lib/broadside/configuration/ecs_config.rb +0 -13
- data/lib/broadside/configuration/verify_instance_variables.rb +0 -11
- data/lib/broadside/predeploy_commands.rb +0 -7
- data/lib/broadside/utils.rb +0 -27
data/lib/broadside/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: broadside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0.pre.prerelease
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Leung
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -31,6 +31,26 @@ dependencies:
|
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '5'
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: activemodel
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3'
|
41
|
+
- - "<"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '5'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '3'
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '5'
|
34
54
|
- !ruby/object:Gem::Dependency
|
35
55
|
name: aws-sdk
|
36
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +72,9 @@ dependencies:
|
|
52
72
|
- - ">="
|
53
73
|
- !ruby/object:Gem::Version
|
54
74
|
version: 0.9.0
|
75
|
+
- - "<"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '3.0'
|
55
78
|
type: :runtime
|
56
79
|
prerelease: false
|
57
80
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -59,6 +82,9 @@ dependencies:
|
|
59
82
|
- - ">="
|
60
83
|
- !ruby/object:Gem::Version
|
61
84
|
version: 0.9.0
|
85
|
+
- - "<"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '3.0'
|
62
88
|
- !ruby/object:Gem::Dependency
|
63
89
|
name: gli
|
64
90
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,19 +100,19 @@ dependencies:
|
|
74
100
|
- !ruby/object:Gem::Version
|
75
101
|
version: '2.13'
|
76
102
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
103
|
+
name: tty
|
78
104
|
requirement: !ruby/object:Gem::Requirement
|
79
105
|
requirements:
|
80
106
|
- - "~>"
|
81
107
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
108
|
+
version: '0.5'
|
83
109
|
type: :runtime
|
84
110
|
prerelease: false
|
85
111
|
version_requirements: !ruby/object:Gem::Requirement
|
86
112
|
requirements:
|
87
113
|
- - "~>"
|
88
114
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
115
|
+
version: '0.5'
|
90
116
|
- !ruby/object:Gem::Dependency
|
91
117
|
name: rspec
|
92
118
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,20 +141,6 @@ dependencies:
|
|
115
141
|
- - "~>"
|
116
142
|
- !ruby/object:Gem::Version
|
117
143
|
version: '1.9'
|
118
|
-
- !ruby/object:Gem::Dependency
|
119
|
-
name: fakefs
|
120
|
-
requirement: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
type: :development
|
126
|
-
prerelease: false
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
144
|
description:
|
133
145
|
email:
|
134
146
|
- leung.mattp@gmail.com
|
@@ -139,7 +151,9 @@ extra_rdoc_files: []
|
|
139
151
|
files:
|
140
152
|
- ".gitignore"
|
141
153
|
- ".gitmodules"
|
154
|
+
- ".hound.yml"
|
142
155
|
- ".rspec"
|
156
|
+
- ".rubocop.yml"
|
143
157
|
- ".travis.yml"
|
144
158
|
- AUTHORS
|
145
159
|
- CHANGELOG.md
|
@@ -149,17 +163,18 @@ files:
|
|
149
163
|
- bin/broadside
|
150
164
|
- broadside.gemspec
|
151
165
|
- lib/broadside.rb
|
152
|
-
- lib/broadside/
|
153
|
-
- lib/broadside/configuration/
|
154
|
-
- lib/broadside/configuration/
|
155
|
-
- lib/broadside/configuration/
|
166
|
+
- lib/broadside/command.rb
|
167
|
+
- lib/broadside/configuration/aws_configuration.rb
|
168
|
+
- lib/broadside/configuration/configuration.rb
|
169
|
+
- lib/broadside/configuration/invalid_configuration.rb
|
156
170
|
- lib/broadside/deploy.rb
|
157
171
|
- lib/broadside/ecs/ecs_deploy.rb
|
158
172
|
- lib/broadside/ecs/ecs_manager.rb
|
159
173
|
- lib/broadside/error.rb
|
160
|
-
- lib/broadside/
|
174
|
+
- lib/broadside/gli/commands.rb
|
175
|
+
- lib/broadside/gli/global.rb
|
176
|
+
- lib/broadside/logging_utils.rb
|
161
177
|
- lib/broadside/target.rb
|
162
|
-
- lib/broadside/utils.rb
|
163
178
|
- lib/broadside/version.rb
|
164
179
|
homepage: https://github.com/lumoslabs/broadside
|
165
180
|
licenses:
|
@@ -176,12 +191,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
191
|
version: '0'
|
177
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
193
|
requirements:
|
179
|
-
- - "
|
194
|
+
- - ">"
|
180
195
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
196
|
+
version: 1.3.1
|
182
197
|
requirements: []
|
183
198
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.2
|
199
|
+
rubygems_version: 2.5.2
|
185
200
|
signing_key:
|
186
201
|
specification_version: 4
|
187
202
|
summary: A command-line tool for EC2 Container Service deployment.
|
@@ -1,58 +0,0 @@
|
|
1
|
-
require 'logger'
|
2
|
-
|
3
|
-
module Broadside
|
4
|
-
class Configuration
|
5
|
-
extend Gem::Deprecate
|
6
|
-
include VerifyInstanceVariables
|
7
|
-
include Utils
|
8
|
-
|
9
|
-
attr_accessor(
|
10
|
-
:application,
|
11
|
-
:docker_image,
|
12
|
-
:file,
|
13
|
-
:git_repo,
|
14
|
-
:logger,
|
15
|
-
:prehook,
|
16
|
-
:posthook,
|
17
|
-
:ssh,
|
18
|
-
:timeout,
|
19
|
-
:type
|
20
|
-
)
|
21
|
-
attr_reader :targets
|
22
|
-
|
23
|
-
def initialize
|
24
|
-
@logger = ::Logger.new(STDOUT)
|
25
|
-
@logger.level = ::Logger::DEBUG
|
26
|
-
@logger.datetime_format = '%Y-%m-%d_%H:%M:%S'
|
27
|
-
@timeout = 600
|
28
|
-
end
|
29
|
-
|
30
|
-
def aws
|
31
|
-
@aws ||= AwsConfig.new
|
32
|
-
end
|
33
|
-
|
34
|
-
def ecs
|
35
|
-
@ecs ||= EcsConfig.new
|
36
|
-
end
|
37
|
-
|
38
|
-
def targets=(_targets)
|
39
|
-
raise ArgumentError, "Targets must be a hash" unless _targets.is_a?(Hash)
|
40
|
-
@targets = _targets.map { |name, config| Target.new(name, config) }
|
41
|
-
end
|
42
|
-
|
43
|
-
def verify(*args)
|
44
|
-
super(*([:application, :docker_image] + args))
|
45
|
-
end
|
46
|
-
|
47
|
-
# Maintain backward compatibility
|
48
|
-
def deploy
|
49
|
-
self
|
50
|
-
end
|
51
|
-
deprecate :deploy, 'config.deploy.option should be configured directly as config.option', 2017, 4
|
52
|
-
|
53
|
-
def base
|
54
|
-
self
|
55
|
-
end
|
56
|
-
deprecate :base, 'config.base.option should be configured directly as config.option', 2017, 4
|
57
|
-
end
|
58
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Broadside
|
2
|
-
module VerifyInstanceVariables
|
3
|
-
def verify(*args)
|
4
|
-
args.each do |var|
|
5
|
-
if self.send(var).nil?
|
6
|
-
raise Broadside::MissingVariableError, "Missing required #{self.class.to_s.split("::").last} variable '#{var}' !"
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Here rest some commonly used predeploy commands, so they can be included by constant name instead of
|
2
|
-
# having to retype them in every config file.
|
3
|
-
module Broadside
|
4
|
-
module PredeployCommands
|
5
|
-
RAKE_DB_MIGRATE = ['bundle', 'exec', 'rake', '--trace', 'db:migrate']
|
6
|
-
end
|
7
|
-
end
|
data/lib/broadside/utils.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
module Broadside
|
2
|
-
module Utils
|
3
|
-
def debug(*args)
|
4
|
-
config.logger.debug(args.join(' '))
|
5
|
-
end
|
6
|
-
|
7
|
-
def info(*args)
|
8
|
-
config.logger.info(args.join(' '))
|
9
|
-
end
|
10
|
-
|
11
|
-
def warn(*args)
|
12
|
-
config.logger.warn(args.join(' '))
|
13
|
-
end
|
14
|
-
|
15
|
-
def error(*args)
|
16
|
-
config.logger.error(args.join(' '))
|
17
|
-
end
|
18
|
-
|
19
|
-
def exception(*args)
|
20
|
-
raise Broadside::Error, args.join("\n")
|
21
|
-
end
|
22
|
-
|
23
|
-
def config
|
24
|
-
Broadside.config
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|