orchestration 0.6.6 → 0.6.7

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: 12b69a813bf576761bf0c72198b9bf68a9e1ce212d4dd1f1c819f50c2b3a46cf
4
- data.tar.gz: '0383c1b95a84b29fe78ab766ed6fb8f862f32f8cd33a1695b815ecb752f00be5'
3
+ metadata.gz: 9cb2b72a148e2687680311cd050b426ccd06c063e4ab01e0affc03be0afbc16d
4
+ data.tar.gz: 97210bd8c3133b7d246ed4b8cd92f56c148a91c283b3ad51f8c4d61e8d6ed690
5
5
  SHA512:
6
- metadata.gz: 8b1df8619845cdf6383360e22b051f0307665b9c7137d2e2a105595cbc9ba38b39745b9c44169c3585edabc389dab18ec61f8371e73b1899c84e6a8f2c212bc3
7
- data.tar.gz: 2d467b15257d2ce8346e9f6e9efdebbb7e23d25aed0576b205c5ec9da85dc038b81fd8d92d6dfd35cf0fbe6358aab92ef71fef94071009a941a95220741aaab7
6
+ metadata.gz: 751f8433ec5094ee87639115d4c0f43e14ed0d7f2c5382fd8d79dd050d9ae27073f962304776d83d74e2b57bb97ae3e2bf774fff9a967a0b534e950462914689
7
+ data.tar.gz: 19b986c4ec255c2f451d99616d310235e10abcf8c403f87ef02bd1b5551da4189fdf7bf72be47f07499ed12142193b7d16e3c67b803f6c0951c6227d02d9b380
data/.gitignore CHANGED
@@ -9,8 +9,6 @@
9
9
  # rspec failure tracking
10
10
  .rspec_status
11
11
 
12
- Gemfile.lock
13
-
14
12
  *.swp
15
13
  *.swo
16
14
 
@@ -34,5 +32,3 @@ docker/.build/
34
32
  docker/.context.tar
35
33
 
36
34
  .DS_Store
37
-
38
- .ruby-version
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.9
data/Gemfile.lock ADDED
@@ -0,0 +1,246 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ orchestration (0.6.7)
5
+ database_url (~> 0.1.2)
6
+ erubis (~> 2.7)
7
+ i18n (>= 0.5)
8
+ paint (~> 2.0)
9
+ rails (>= 4.1)
10
+ thor (~> 1.0)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ actioncable (6.1.4.7)
16
+ actionpack (= 6.1.4.7)
17
+ activesupport (= 6.1.4.7)
18
+ nio4r (~> 2.0)
19
+ websocket-driver (>= 0.6.1)
20
+ actionmailbox (6.1.4.7)
21
+ actionpack (= 6.1.4.7)
22
+ activejob (= 6.1.4.7)
23
+ activerecord (= 6.1.4.7)
24
+ activestorage (= 6.1.4.7)
25
+ activesupport (= 6.1.4.7)
26
+ mail (>= 2.7.1)
27
+ actionmailer (6.1.4.7)
28
+ actionpack (= 6.1.4.7)
29
+ actionview (= 6.1.4.7)
30
+ activejob (= 6.1.4.7)
31
+ activesupport (= 6.1.4.7)
32
+ mail (~> 2.5, >= 2.5.4)
33
+ rails-dom-testing (~> 2.0)
34
+ actionpack (6.1.4.7)
35
+ actionview (= 6.1.4.7)
36
+ activesupport (= 6.1.4.7)
37
+ rack (~> 2.0, >= 2.0.9)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.0)
40
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
41
+ actiontext (6.1.4.7)
42
+ actionpack (= 6.1.4.7)
43
+ activerecord (= 6.1.4.7)
44
+ activestorage (= 6.1.4.7)
45
+ activesupport (= 6.1.4.7)
46
+ nokogiri (>= 1.8.5)
47
+ actionview (6.1.4.7)
48
+ activesupport (= 6.1.4.7)
49
+ builder (~> 3.1)
50
+ erubi (~> 1.4)
51
+ rails-dom-testing (~> 2.0)
52
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
53
+ activejob (6.1.4.7)
54
+ activesupport (= 6.1.4.7)
55
+ globalid (>= 0.3.6)
56
+ activemodel (6.1.4.7)
57
+ activesupport (= 6.1.4.7)
58
+ activerecord (6.1.4.7)
59
+ activemodel (= 6.1.4.7)
60
+ activesupport (= 6.1.4.7)
61
+ activestorage (6.1.4.7)
62
+ actionpack (= 6.1.4.7)
63
+ activejob (= 6.1.4.7)
64
+ activerecord (= 6.1.4.7)
65
+ activesupport (= 6.1.4.7)
66
+ marcel (~> 1.0.0)
67
+ mini_mime (>= 1.1.0)
68
+ activesupport (6.1.4.7)
69
+ concurrent-ruby (~> 1.0, >= 1.0.2)
70
+ i18n (>= 1.6, < 2)
71
+ minitest (>= 5.1)
72
+ tzinfo (~> 2.0)
73
+ zeitwerk (~> 2.3)
74
+ addressable (2.8.0)
75
+ public_suffix (>= 2.0.2, < 5.0)
76
+ amq-protocol (2.3.2)
77
+ ast (2.4.2)
78
+ bson (4.15.0)
79
+ builder (3.2.4)
80
+ bunny (2.19.0)
81
+ amq-protocol (~> 2.3, >= 2.3.1)
82
+ sorted_set (~> 1, >= 1.0.2)
83
+ concurrent-ruby (1.1.10)
84
+ crack (0.4.5)
85
+ rexml
86
+ crass (1.0.6)
87
+ database_url (0.1.2)
88
+ devpack (0.3.3)
89
+ diff-lcs (1.5.0)
90
+ erubi (1.10.0)
91
+ erubis (2.7.0)
92
+ globalid (1.0.0)
93
+ activesupport (>= 5.0)
94
+ hashdiff (1.0.1)
95
+ i18n (1.10.0)
96
+ concurrent-ruby (~> 1.0)
97
+ loofah (2.18.0)
98
+ crass (~> 1.0.2)
99
+ nokogiri (>= 1.5.9)
100
+ mail (2.7.1)
101
+ mini_mime (>= 0.1.1)
102
+ marcel (1.0.2)
103
+ method_source (1.0.0)
104
+ mini_mime (1.1.2)
105
+ minitest (5.15.0)
106
+ mongo (2.17.1)
107
+ bson (>= 4.8.2, < 5.0.0)
108
+ mongoid (7.4.0)
109
+ activemodel (>= 5.1, < 7.1, != 7.0.0)
110
+ mongo (>= 2.10.5, < 3.0.0)
111
+ ruby2_keywords (~> 0.0.5)
112
+ mysql2 (0.5.4)
113
+ nio4r (2.5.8)
114
+ nokogiri (1.13.6-x86_64-linux)
115
+ racc (~> 1.4)
116
+ paint (2.2.1)
117
+ parallel (1.22.1)
118
+ parser (3.1.2.0)
119
+ ast (~> 2.4.1)
120
+ pg (1.3.5)
121
+ public_suffix (4.0.7)
122
+ racc (1.6.0)
123
+ rack (2.2.3)
124
+ rack-test (1.1.0)
125
+ rack (>= 1.0, < 3)
126
+ rails (6.1.4.7)
127
+ actioncable (= 6.1.4.7)
128
+ actionmailbox (= 6.1.4.7)
129
+ actionmailer (= 6.1.4.7)
130
+ actionpack (= 6.1.4.7)
131
+ actiontext (= 6.1.4.7)
132
+ actionview (= 6.1.4.7)
133
+ activejob (= 6.1.4.7)
134
+ activemodel (= 6.1.4.7)
135
+ activerecord (= 6.1.4.7)
136
+ activestorage (= 6.1.4.7)
137
+ activesupport (= 6.1.4.7)
138
+ bundler (>= 1.15.0)
139
+ railties (= 6.1.4.7)
140
+ sprockets-rails (>= 2.0.0)
141
+ rails-dom-testing (2.0.3)
142
+ activesupport (>= 4.2.0)
143
+ nokogiri (>= 1.6)
144
+ rails-html-sanitizer (1.4.2)
145
+ loofah (~> 2.3)
146
+ railties (6.1.4.7)
147
+ actionpack (= 6.1.4.7)
148
+ activesupport (= 6.1.4.7)
149
+ method_source
150
+ rake (>= 0.13)
151
+ thor (~> 1.0)
152
+ rainbow (3.1.1)
153
+ rake (10.5.0)
154
+ rbtree (0.4.5)
155
+ regexp_parser (2.4.0)
156
+ rexml (3.2.5)
157
+ rspec (3.11.0)
158
+ rspec-core (~> 3.11.0)
159
+ rspec-expectations (~> 3.11.0)
160
+ rspec-mocks (~> 3.11.0)
161
+ rspec-core (3.11.0)
162
+ rspec-support (~> 3.11.0)
163
+ rspec-expectations (3.11.0)
164
+ diff-lcs (>= 1.2.0, < 2.0)
165
+ rspec-support (~> 3.11.0)
166
+ rspec-its (1.3.0)
167
+ rspec-core (>= 3.0.0)
168
+ rspec-expectations (>= 3.0.0)
169
+ rspec-mocks (3.11.1)
170
+ diff-lcs (>= 1.2.0, < 2.0)
171
+ rspec-support (~> 3.11.0)
172
+ rspec-support (3.11.0)
173
+ rubocop (1.30.0)
174
+ parallel (~> 1.10)
175
+ parser (>= 3.1.0.0)
176
+ rainbow (>= 2.2.2, < 4.0)
177
+ regexp_parser (>= 1.8, < 3.0)
178
+ rexml (>= 3.2.5, < 4.0)
179
+ rubocop-ast (>= 1.18.0, < 2.0)
180
+ ruby-progressbar (~> 1.7)
181
+ unicode-display_width (>= 1.4.0, < 3.0)
182
+ rubocop-ast (1.18.0)
183
+ parser (>= 3.1.1.0)
184
+ rubocop-rails (2.14.2)
185
+ activesupport (>= 4.2.0)
186
+ rack (>= 1.1)
187
+ rubocop (>= 1.7.0, < 2.0)
188
+ rubocop-rake (0.5.1)
189
+ rubocop
190
+ rubocop-rspec (2.11.1)
191
+ rubocop (~> 1.19)
192
+ ruby-progressbar (1.11.0)
193
+ ruby2_keywords (0.0.5)
194
+ set (1.0.2)
195
+ sorted_set (1.0.3)
196
+ rbtree
197
+ set (~> 1.0)
198
+ sprockets (4.0.3)
199
+ concurrent-ruby (~> 1.0)
200
+ rack (> 1, < 3)
201
+ sprockets-rails (3.4.2)
202
+ actionpack (>= 5.2)
203
+ activesupport (>= 5.2)
204
+ sprockets (>= 3.0.0)
205
+ sqlite3 (1.4.2)
206
+ strong_versions (0.4.5)
207
+ i18n (>= 0.5)
208
+ paint (~> 2.0)
209
+ thor (1.2.1)
210
+ tzinfo (2.0.4)
211
+ concurrent-ruby (~> 1.0)
212
+ unicode-display_width (2.1.0)
213
+ webmock (3.14.0)
214
+ addressable (>= 2.8.0)
215
+ crack (>= 0.3.2)
216
+ hashdiff (>= 0.4.0, < 2.0.0)
217
+ websocket-driver (0.7.5)
218
+ websocket-extensions (>= 0.1.0)
219
+ websocket-extensions (0.1.5)
220
+ zeitwerk (2.5.4)
221
+
222
+ PLATFORMS
223
+ x86_64-linux
224
+
225
+ DEPENDENCIES
226
+ activerecord (~> 6.0)
227
+ bunny (~> 2.12)
228
+ devpack (~> 0.3.2)
229
+ mongoid (~> 7.0)
230
+ mysql2 (~> 0.5.2)
231
+ orchestration!
232
+ pg (~> 1.1)
233
+ rails (~> 6.0)
234
+ rake (~> 10.0)
235
+ rspec (~> 3.0)
236
+ rspec-its (~> 1.2)
237
+ rubocop (~> 1.12)
238
+ rubocop-rails (~> 2.9)
239
+ rubocop-rake (~> 0.5.1)
240
+ rubocop-rspec (~> 2.2)
241
+ sqlite3 (~> 1.3)
242
+ strong_versions (~> 0.4.5)
243
+ webmock (~> 3.4)
244
+
245
+ BUNDLED WITH
246
+ 2.3.11
data/README.md CHANGED
@@ -29,7 +29,7 @@ The below screenshot demonstrates _Orchestration_ being installed in a brand new
29
29
  Add _Orchestration_ to your Gemfile:
30
30
 
31
31
  ```ruby
32
- gem 'orchestration', '~> 0.6.6'
32
+ gem 'orchestration', '~> 0.6.7'
33
33
  ```
34
34
 
35
35
  Install:
@@ -9,7 +9,7 @@ module Orchestration
9
9
  def environment
10
10
  return @environment unless @environment.nil?
11
11
 
12
- ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
12
+ ENV.fetch('RAILS_ENV') { ENV.fetch('RACK_ENV', 'development') }
13
13
  end
14
14
 
15
15
  def web_server
@@ -20,16 +20,16 @@ module Orchestration
20
20
  def database_url
21
21
  case environment
22
22
  when 'development'
23
- ENV['DEVELOPMENT_DATABASE_URL'] || ENV['DATABASE_URL']
23
+ ENV.fetch('DEVELOPMENT_DATABASE_URL') { ENV.fetch('DATABASE_URL', nil) }
24
24
  when 'test'
25
- ENV['TEST_DATABASE_URL'] || ENV['DATABASE_URL']
25
+ ENV.fetch('TEST_DATABASE_URL') { ENV.fetch('DATABASE_URL', nil) }
26
26
  else
27
- ENV['DATABASE_URL']
27
+ ENV.fetch('DATABASE_URL', nil)
28
28
  end
29
29
  end
30
30
 
31
31
  def mongo_url
32
- ENV['MONGO_URL']
32
+ ENV.fetch('MONGO_URL', nil)
33
33
  end
34
34
 
35
35
  def mongoid_configuration_path
@@ -107,7 +107,9 @@ endif
107
107
  ifneq (${env},test)
108
108
  ifeq (,$(findstring test,$(MAKECMDGOALS)))
109
109
  ifeq (,$(findstring deploy,$(MAKECMDGOALS)))
110
- -include ${env_path}
110
+ ifeq (,$(findstring setup,$(MAKECMDGOALS)))
111
+ -include ${env_path}
112
+ endif
111
113
  endif
112
114
  endif
113
115
  endif
@@ -122,7 +124,9 @@ ifneq (,$(findstring test,$(MAKECMDGOALS)))
122
124
  env=test
123
125
  endif
124
126
 
125
- ifneq (,$(env))
127
+ ifneq (,$(RAILS_ENV))
128
+ env=$(RAILS_ENV)
129
+ else ifneq (,$(env))
126
130
  # `env` set by current shell.
127
131
  else ifneq (,$(RAILS_ENV))
128
132
  env=$(RAILS_ENV)
@@ -313,16 +317,16 @@ setup: _log-notify
313
317
  ifneq (,$(wildcard config/database.yml))
314
318
  @$(call echo,Preparing ${env_human} database)
315
319
  @$(call system,rake db:create RAILS_ENV="${env}")
316
- @${rake} db:create RAILS_ENV=${env} ${log} || : ${log}
320
+ @${rake} db:create RAILS_ENV=${env} DATABASE_URL='${url}' ${log} || : ${log}
317
321
  ifneq (,$(wildcard db/structure.sql))
318
- @$(call system,rake db:structure:load RAILS_ENV="${env}" DATABASE_URL="${url}")
322
+ @$(call system,rake db:structure:load RAILS_ENV="${env}" ${url_prefix}DATABASE_URL="${url}")
319
323
  @${rake} db:structure:load RAILS_ENV="${env}" DATABASE_URL='${url}' ${log} || ${exit_fail}
320
324
  else ifneq (,$(wildcard db/schema.rb))
321
- @$(call system,rake db:schema:load RAILS_ENV="${env}" DATABASE_URL="${url}")
325
+ @$(call system,rake db:schema:load RAILS_ENV="${env}" ${url_prefix}DATABASE_URL="${url}")
322
326
  @${rake} db:schema:load RAILS_ENV="${env}" DATABASE_URL='${url}' ${log} || ${exit_fail}
323
327
  endif
324
- @$(call system,rake db:migrate RAILS_ENV="${env}" DATABASE_URL="${url}")
325
- @${rake} db:migrate RAILS_ENV=${env} ${log} || ${exit_fail}
328
+ @$(call system,rake db:migrate RAILS_ENV="${env}" ${url_prefix}DATABASE_URL="${url}")
329
+ @${rake} db:migrate RAILS_ENV="${env}" DATABASE_URL='${url}' ${log} || ${exit_fail}
326
330
  endif
327
331
  @if $(MAKE) -n post-setup >/dev/null 2>&1; then \
328
332
  $(call system,make post-setup RAILS_ENV="${env}") \
@@ -12,4 +12,4 @@ test:
12
12
 
13
13
  production:
14
14
  url: <%%= ENV['RABBITMQ_URL'] %>
15
- url: <%%= ENV['RABBITMQ_MANAGEMENT_URL'] %>
15
+ management_url: <%%= ENV['RABBITMQ_MANAGEMENT_URL'] %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orchestration
4
- VERSION = '0.6.6'
4
+ VERSION = '0.6.7'
5
5
  end
@@ -110,6 +110,9 @@ post-setup:
110
110
  namespace :db do
111
111
  desc I18n.t('orchestration.rake.db.url')
112
112
  task :url do
113
+ ENV['DATABASE_URL'] = nil
114
+ ENV['DEVELOPMENT_DATABASE_URL'] = nil
115
+ ENV['TEST_DATABASE_URL'] = nil
113
116
  config = Rails.application.config_for(:database).transform_keys(&:to_sym)
114
117
 
115
118
  if config[:adapter] == 'sqlite3'
@@ -161,7 +164,7 @@ post-setup:
161
164
  end
162
165
 
163
166
  adapter::Healthcheck.start(
164
- nil, nil, config_path: path, service_name: name, sidecar: ENV['sidecar']
167
+ nil, nil, config_path: path, service_name: name, sidecar: ENV.fetch('sidecar', nil)
165
168
  )
166
169
  end
167
170
  end
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.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-17 00:00:00.000000000 Z
11
+ date: 2022-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: database_url
@@ -342,9 +342,11 @@ files:
342
342
  - ".gitignore"
343
343
  - ".rspec"
344
344
  - ".rubocop.yml"
345
+ - ".ruby-version"
345
346
  - ".strong_versions.yml"
346
347
  - ".travis.yml"
347
348
  - Gemfile
349
+ - Gemfile.lock
348
350
  - LICENSE
349
351
  - Makefile
350
352
  - README.md