orchestration 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +73 -52
- data/README.md +4 -19
- data/lib/orchestration/file_helpers.rb +1 -1
- data/lib/orchestration/terminal.rb +4 -0
- data/lib/orchestration/version.rb +1 -1
- data/lib/orchestration.rb +58 -19
- data/orchestration.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12e2e03dddf05c889b4938735bb407532671c958ad7e1e39ce37ad7ee07a4eec
|
|
4
|
+
data.tar.gz: 1a0fc371d1230959b7869094cb4cc13a59f9c8e2129c1f62b295d954218a1d75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73d3df8af18ce92fce2e837bab16ca6f9be03051240a6f89e9e3e549aad659ec5bdb0d03eb11ca3f4ba8ae2ab839ddbf121ab14abf1d63e13267faac4672b325
|
|
7
|
+
data.tar.gz: 9779cef3d3d921dfc34ba41bdb29ef94642c08d7c92967c742bd52ca8d6527826bf3e040504228a4dd4dfc53c6a8d1e7334af4ebf6f98c247bbb06a820e6e0f8
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
orchestration (0.6.
|
|
4
|
+
orchestration (0.6.9)
|
|
5
5
|
database_url (~> 0.1.2)
|
|
6
|
+
dotenv-rails (~> 2.8)
|
|
6
7
|
erubis (~> 2.7)
|
|
7
8
|
i18n (>= 0.5)
|
|
8
9
|
paint (~> 2.0)
|
|
@@ -71,13 +72,13 @@ GEM
|
|
|
71
72
|
minitest (>= 5.1)
|
|
72
73
|
tzinfo (~> 2.0)
|
|
73
74
|
zeitwerk (~> 2.3)
|
|
74
|
-
addressable (2.8.
|
|
75
|
-
public_suffix (>= 2.0.2, <
|
|
75
|
+
addressable (2.8.1)
|
|
76
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
76
77
|
amq-protocol (2.3.2)
|
|
77
78
|
ast (2.4.2)
|
|
78
79
|
bson (4.15.0)
|
|
79
80
|
builder (3.2.4)
|
|
80
|
-
bunny (2.
|
|
81
|
+
bunny (2.20.1)
|
|
81
82
|
amq-protocol (~> 2.3, >= 2.3.1)
|
|
82
83
|
sorted_set (~> 1, >= 1.0.2)
|
|
83
84
|
concurrent-ruby (1.1.10)
|
|
@@ -85,44 +86,62 @@ GEM
|
|
|
85
86
|
rexml
|
|
86
87
|
crass (1.0.6)
|
|
87
88
|
database_url (0.1.2)
|
|
89
|
+
date (3.3.3)
|
|
88
90
|
devpack (0.3.3)
|
|
89
91
|
diff-lcs (1.5.0)
|
|
90
|
-
|
|
92
|
+
dotenv (2.8.1)
|
|
93
|
+
dotenv-rails (2.8.1)
|
|
94
|
+
dotenv (= 2.8.1)
|
|
95
|
+
railties (>= 3.2)
|
|
96
|
+
erubi (1.12.0)
|
|
91
97
|
erubis (2.7.0)
|
|
92
98
|
globalid (1.0.0)
|
|
93
99
|
activesupport (>= 5.0)
|
|
94
100
|
hashdiff (1.0.1)
|
|
95
|
-
i18n (1.
|
|
101
|
+
i18n (1.12.0)
|
|
96
102
|
concurrent-ruby (~> 1.0)
|
|
97
|
-
|
|
103
|
+
json (2.6.3)
|
|
104
|
+
loofah (2.19.1)
|
|
98
105
|
crass (~> 1.0.2)
|
|
99
106
|
nokogiri (>= 1.5.9)
|
|
100
|
-
mail (2.
|
|
107
|
+
mail (2.8.0)
|
|
101
108
|
mini_mime (>= 0.1.1)
|
|
109
|
+
net-imap
|
|
110
|
+
net-pop
|
|
111
|
+
net-smtp
|
|
102
112
|
marcel (1.0.2)
|
|
103
113
|
method_source (1.0.0)
|
|
104
114
|
mini_mime (1.1.2)
|
|
105
|
-
minitest (5.
|
|
106
|
-
mongo (2.
|
|
107
|
-
bson (>= 4.
|
|
108
|
-
mongoid (7.
|
|
115
|
+
minitest (5.17.0)
|
|
116
|
+
mongo (2.18.2)
|
|
117
|
+
bson (>= 4.14.1, < 5.0.0)
|
|
118
|
+
mongoid (7.5.2)
|
|
109
119
|
activemodel (>= 5.1, < 7.1, != 7.0.0)
|
|
110
120
|
mongo (>= 2.10.5, < 3.0.0)
|
|
111
121
|
ruby2_keywords (~> 0.0.5)
|
|
112
122
|
mysql2 (0.5.4)
|
|
123
|
+
net-imap (0.3.4)
|
|
124
|
+
date
|
|
125
|
+
net-protocol
|
|
126
|
+
net-pop (0.1.2)
|
|
127
|
+
net-protocol
|
|
128
|
+
net-protocol (0.2.1)
|
|
129
|
+
timeout
|
|
130
|
+
net-smtp (0.3.3)
|
|
131
|
+
net-protocol
|
|
113
132
|
nio4r (2.5.8)
|
|
114
|
-
nokogiri (1.13.
|
|
133
|
+
nokogiri (1.13.10-x86_64-linux)
|
|
115
134
|
racc (~> 1.4)
|
|
116
|
-
paint (2.
|
|
135
|
+
paint (2.3.0)
|
|
117
136
|
parallel (1.22.1)
|
|
118
|
-
parser (3.1.
|
|
137
|
+
parser (3.1.3.0)
|
|
119
138
|
ast (~> 2.4.1)
|
|
120
|
-
pg (1.
|
|
121
|
-
public_suffix (
|
|
122
|
-
racc (1.6.
|
|
123
|
-
rack (2.2.
|
|
124
|
-
rack-test (
|
|
125
|
-
rack (>= 1.
|
|
139
|
+
pg (1.4.5)
|
|
140
|
+
public_suffix (5.0.1)
|
|
141
|
+
racc (1.6.2)
|
|
142
|
+
rack (2.2.5)
|
|
143
|
+
rack-test (2.0.2)
|
|
144
|
+
rack (>= 1.3)
|
|
126
145
|
rails (6.1.4.7)
|
|
127
146
|
actioncable (= 6.1.4.7)
|
|
128
147
|
actionmailbox (= 6.1.4.7)
|
|
@@ -141,8 +160,8 @@ GEM
|
|
|
141
160
|
rails-dom-testing (2.0.3)
|
|
142
161
|
activesupport (>= 4.2.0)
|
|
143
162
|
nokogiri (>= 1.6)
|
|
144
|
-
rails-html-sanitizer (1.4.
|
|
145
|
-
loofah (~> 2.
|
|
163
|
+
rails-html-sanitizer (1.4.4)
|
|
164
|
+
loofah (~> 2.19, >= 2.19.1)
|
|
146
165
|
railties (6.1.4.7)
|
|
147
166
|
actionpack (= 6.1.4.7)
|
|
148
167
|
activesupport (= 6.1.4.7)
|
|
@@ -151,73 +170,75 @@ GEM
|
|
|
151
170
|
thor (~> 1.0)
|
|
152
171
|
rainbow (3.1.1)
|
|
153
172
|
rake (10.5.0)
|
|
154
|
-
rbtree (0.4.
|
|
155
|
-
regexp_parser (2.
|
|
173
|
+
rbtree (0.4.6)
|
|
174
|
+
regexp_parser (2.6.1)
|
|
156
175
|
rexml (3.2.5)
|
|
157
|
-
rspec (3.
|
|
158
|
-
rspec-core (~> 3.
|
|
159
|
-
rspec-expectations (~> 3.
|
|
160
|
-
rspec-mocks (~> 3.
|
|
161
|
-
rspec-core (3.
|
|
162
|
-
rspec-support (~> 3.
|
|
163
|
-
rspec-expectations (3.
|
|
176
|
+
rspec (3.12.0)
|
|
177
|
+
rspec-core (~> 3.12.0)
|
|
178
|
+
rspec-expectations (~> 3.12.0)
|
|
179
|
+
rspec-mocks (~> 3.12.0)
|
|
180
|
+
rspec-core (3.12.0)
|
|
181
|
+
rspec-support (~> 3.12.0)
|
|
182
|
+
rspec-expectations (3.12.1)
|
|
164
183
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
165
|
-
rspec-support (~> 3.
|
|
184
|
+
rspec-support (~> 3.12.0)
|
|
166
185
|
rspec-its (1.3.0)
|
|
167
186
|
rspec-core (>= 3.0.0)
|
|
168
187
|
rspec-expectations (>= 3.0.0)
|
|
169
|
-
rspec-mocks (3.
|
|
188
|
+
rspec-mocks (3.12.1)
|
|
170
189
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
171
|
-
rspec-support (~> 3.
|
|
172
|
-
rspec-support (3.
|
|
173
|
-
rubocop (1.
|
|
190
|
+
rspec-support (~> 3.12.0)
|
|
191
|
+
rspec-support (3.12.0)
|
|
192
|
+
rubocop (1.41.1)
|
|
193
|
+
json (~> 2.3)
|
|
174
194
|
parallel (~> 1.10)
|
|
175
|
-
parser (>= 3.1.
|
|
195
|
+
parser (>= 3.1.2.1)
|
|
176
196
|
rainbow (>= 2.2.2, < 4.0)
|
|
177
197
|
regexp_parser (>= 1.8, < 3.0)
|
|
178
198
|
rexml (>= 3.2.5, < 4.0)
|
|
179
|
-
rubocop-ast (>= 1.
|
|
199
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
|
180
200
|
ruby-progressbar (~> 1.7)
|
|
181
201
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
182
|
-
rubocop-ast (1.
|
|
202
|
+
rubocop-ast (1.24.1)
|
|
183
203
|
parser (>= 3.1.1.0)
|
|
184
|
-
rubocop-rails (2.
|
|
204
|
+
rubocop-rails (2.17.4)
|
|
185
205
|
activesupport (>= 4.2.0)
|
|
186
206
|
rack (>= 1.1)
|
|
187
|
-
rubocop (>= 1.
|
|
207
|
+
rubocop (>= 1.33.0, < 2.0)
|
|
188
208
|
rubocop-rake (0.5.1)
|
|
189
209
|
rubocop
|
|
190
|
-
rubocop-rspec (2.
|
|
191
|
-
rubocop (~> 1.
|
|
210
|
+
rubocop-rspec (2.16.0)
|
|
211
|
+
rubocop (~> 1.33)
|
|
192
212
|
ruby-progressbar (1.11.0)
|
|
193
213
|
ruby2_keywords (0.0.5)
|
|
194
|
-
set (1.0.
|
|
214
|
+
set (1.0.3)
|
|
195
215
|
sorted_set (1.0.3)
|
|
196
216
|
rbtree
|
|
197
217
|
set (~> 1.0)
|
|
198
|
-
sprockets (4.0
|
|
218
|
+
sprockets (4.2.0)
|
|
199
219
|
concurrent-ruby (~> 1.0)
|
|
200
|
-
rack (
|
|
220
|
+
rack (>= 2.2.4, < 4)
|
|
201
221
|
sprockets-rails (3.4.2)
|
|
202
222
|
actionpack (>= 5.2)
|
|
203
223
|
activesupport (>= 5.2)
|
|
204
224
|
sprockets (>= 3.0.0)
|
|
205
|
-
sqlite3 (1.4
|
|
225
|
+
sqlite3 (1.5.4-x86_64-linux)
|
|
206
226
|
strong_versions (0.4.5)
|
|
207
227
|
i18n (>= 0.5)
|
|
208
228
|
paint (~> 2.0)
|
|
209
229
|
thor (1.2.1)
|
|
210
|
-
|
|
230
|
+
timeout (0.3.1)
|
|
231
|
+
tzinfo (2.0.5)
|
|
211
232
|
concurrent-ruby (~> 1.0)
|
|
212
|
-
unicode-display_width (2.
|
|
213
|
-
webmock (3.
|
|
233
|
+
unicode-display_width (2.3.0)
|
|
234
|
+
webmock (3.18.1)
|
|
214
235
|
addressable (>= 2.8.0)
|
|
215
236
|
crack (>= 0.3.2)
|
|
216
237
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
217
238
|
websocket-driver (0.7.5)
|
|
218
239
|
websocket-extensions (>= 0.1.0)
|
|
219
240
|
websocket-extensions (0.1.5)
|
|
220
|
-
zeitwerk (2.
|
|
241
|
+
zeitwerk (2.6.6)
|
|
221
242
|
|
|
222
243
|
PLATFORMS
|
|
223
244
|
x86_64-linux
|
data/README.md
CHANGED
|
@@ -162,30 +162,15 @@ make push
|
|
|
162
162
|
|
|
163
163
|
### Development
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
A [`.env` file](https://docs.docker.com/compose/env-file/) is created automatically in your project root. This file is _not_ stored in version control. Set all application environment variables in this file.
|
|
166
166
|
|
|
167
167
|
#### Launching a development server
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
Use vanilla _Rails_ commands to load a server or console. If present, a `.env` file will be read and loaded (via the [dotenv](https://github.com/bkeepers/dotenv) gem) to populate the environment.
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
To load a _Rails_ console:
|
|
176
|
-
```bash
|
|
177
|
-
make console
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
The application environment will be output on launch for convenience.
|
|
181
|
-
|
|
182
|
-
To pass extra commands to the _Rails_ server:
|
|
183
|
-
```bash
|
|
184
|
-
# Custom server, custom port
|
|
185
|
-
make serve server='webrick -p 3001'
|
|
186
|
-
|
|
187
|
-
# Default server, custom port, custom bind address
|
|
188
|
-
make serve server='-p 3001 -b 192.168.0.1'
|
|
172
|
+
bundle exec rails s # Launch a server
|
|
173
|
+
bundle exec rails c # Launch a console
|
|
189
174
|
```
|
|
190
175
|
|
|
191
176
|
### Testing
|
|
@@ -47,6 +47,10 @@ module Orchestration
|
|
|
47
47
|
@settings.set(setting, read(prompt, default))
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
def print_variable(variable, value)
|
|
51
|
+
$stdout.print "#{Paint[variable, :blue]}#{Paint['=', :white]}#{Paint[value, :cyan]}"
|
|
52
|
+
end
|
|
53
|
+
|
|
50
54
|
private
|
|
51
55
|
|
|
52
56
|
def prompt(message, default)
|
data/lib/orchestration.rb
CHANGED
|
@@ -33,28 +33,67 @@ require 'orchestration/terminal'
|
|
|
33
33
|
require 'orchestration/version'
|
|
34
34
|
|
|
35
35
|
module Orchestration
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
class << self
|
|
37
|
+
def root
|
|
38
|
+
Pathname.new(File.dirname(__dir__))
|
|
39
|
+
end
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
def makefile
|
|
42
|
+
root.join('lib', 'orchestration', 'make', 'orchestration.mk')
|
|
43
|
+
end
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
def rakefile
|
|
46
|
+
root.join('lib', 'Rakefile')
|
|
47
|
+
end
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
def error(key, options = {})
|
|
50
|
+
warn('# Orchestration Error')
|
|
51
|
+
warn("# #{I18n.t("orchestration.#{key}", options)}")
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def random_local_port
|
|
55
|
+
socket = Socket.new(:INET, :STREAM, 0)
|
|
56
|
+
socket.bind(Addrinfo.tcp('127.0.0.1', 0))
|
|
57
|
+
port = socket.local_address.ip_port
|
|
58
|
+
socket.close
|
|
59
|
+
port
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def print_environment
|
|
63
|
+
return unless File.exist?('.env')
|
|
52
64
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
$stdout.puts
|
|
66
|
+
$stdout.puts("#{prefix} #{Paint['Loading environment from', :cyan]} #{Paint['.env', :green]}")
|
|
67
|
+
$stdout.puts
|
|
68
|
+
environment_variables.each do |variable, value|
|
|
69
|
+
terminal.print_variable(variable, value)
|
|
70
|
+
end
|
|
71
|
+
$stdout.puts
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
private
|
|
75
|
+
|
|
76
|
+
def terminal
|
|
77
|
+
@terminal ||= Terminal.new(Environment.new.settings)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def prefix
|
|
81
|
+
"#{Paint['[', :white]}#{Paint['orchestration', :cyan]}#{Paint[']', :white]}"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def environment_variables
|
|
85
|
+
File.readlines('.env').reject { |line| line.match(/^\s*#/) }
|
|
86
|
+
.select { |line| line.include?('=') }
|
|
87
|
+
.map do |line|
|
|
88
|
+
variable, _, value = line.partition('=')
|
|
89
|
+
[variable, value]
|
|
90
|
+
end
|
|
91
|
+
end
|
|
59
92
|
end
|
|
60
93
|
end
|
|
94
|
+
|
|
95
|
+
if ENV['RAILS_ENV'] == 'development'
|
|
96
|
+
require 'dotenv-rails'
|
|
97
|
+
Dotenv::Railtie.load
|
|
98
|
+
Orchestration.print_environment
|
|
99
|
+
end
|
data/orchestration.gemspec
CHANGED
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.require_paths = ['lib']
|
|
29
29
|
|
|
30
30
|
spec.add_runtime_dependency 'database_url', '~> 0.1.2'
|
|
31
|
+
spec.add_runtime_dependency 'dotenv-rails', '~> 2.8'
|
|
31
32
|
spec.add_runtime_dependency 'erubis', '~> 2.7'
|
|
32
33
|
spec.add_runtime_dependency 'i18n', '>= 0.5'
|
|
33
34
|
spec.add_runtime_dependency 'paint', '~> 2.0'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: orchestration
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bob Farrell
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: database_url
|
|
@@ -24,6 +24,20 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 0.1.2
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: dotenv-rails
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.8'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '2.8'
|
|
27
41
|
- !ruby/object:Gem::Dependency
|
|
28
42
|
name: erubis
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|